check_scorer_lower_is_better¶
yohou.testing.scorer.check_scorer_lower_is_better(scorer)
¶
Check lower_is_better convention matches scoring direction.
Validates that the lower_is_better tag is a boolean and that
the tag's value is consistent with the scorer's actual behavior:
for lower_is_better=True scorers, a perfect prediction should
yield a score less than or equal to a noisy prediction; for
lower_is_better=False scorers, the opposite.
Parameters¶
| Name | Type | Description | Default |
|---|---|---|---|
scorer
|
BaseScorer
|
Scorer instance |
required |
Raises¶
| Type | Description |
|---|---|
AssertionError
|
If lower_is_better doesn't match expected convention |