| Conditions | 2 |
| Total Lines | 19 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | """Base class for experiment.""" |
||
| 36 | def score(self, **params): |
||
| 37 | """Score the parameters. |
||
| 38 | |||
| 39 | Parameters |
||
| 40 | ---------- |
||
| 41 | params : dict with string keys |
||
| 42 | Parameters to score. |
||
| 43 | |||
| 44 | Returns |
||
| 45 | ------- |
||
| 46 | float |
||
| 47 | The score of the parameters. |
||
| 48 | dict |
||
| 49 | Additional metadata about the search. |
||
| 50 | """ |
||
| 51 | paramnames = self.paramnames() |
||
| 52 | if not set(paramnames) == set(params.keys()): |
||
| 53 | raise ValueError("Parameters do not match.") |
||
| 54 | return self._score(**params) |
||
| 55 | |||
| 72 |