You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many implementations of scores have their own parameters, for example for setting the significance level, a bin size, or whether or not to exclude NANs, but per default, there is no way to pass such parameters to the score.
This could be integrated by simply passing the test parameters also to compute_score() (pro: score and test can make use of the same parameters; contra: potential for conflicting namespaces), or have an additional test attribute score_params={}.
The text was updated successfully, but these errors were encountered:
@rgutzen
The way we have implemented these sorts of score manipulations is via "converters" which automatically get applied after compute_score is run during the judge phase. See here for the entry point. The converter is a class from here (or your own, extending from that base Converter class), and is set as the converter attribute of the test in order to activate it. Examples include things like setting a threshold on a ZScore to turn it into a True/FalseBooleanScore (see the unit tests for converters here for examples).
This does not cover examples that occur before earlier in score computation, such as filtering of data. For those you'd still have to override compute_score in your test, or compute in your score class if you have no compute_score in your test. Since there are an infinite number of things a person might want to do in compute_score, I've left that pretty open-ended.
Many implementations of scores have their own parameters, for example for setting the significance level, a bin size, or whether or not to exclude NANs, but per default, there is no way to pass such parameters to the score.
This could be integrated by simply passing the test parameters also to
compute_score()
(pro: score and test can make use of the same parameters; contra: potential for conflicting namespaces), or have an additional test attributescore_params={}
.The text was updated successfully, but these errors were encountered: