make_scorer¶
yohou.metrics.make_scorer(name, **params)
¶
Create a scorer instance with custom parameters.
Parameters¶
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Name of the scorer (e.g., |
required |
**params
|
dict
|
Parameters passed to the scorer constructor. |
{}
|
Returns¶
| Type | Description |
|---|---|
BaseScorer
|
A configured scorer instance. |
Raises¶
| Type | Description |
|---|---|
ValueError
|
If the name is not in the registry. |
Examples¶
>>> scorer = make_scorer("mae", aggregation_method=["stepwise", "vintagewise"])
>>> scorer.aggregation_method
['stepwise', 'vintagewise']