Problem description
I wanted to test quality metrics of several different algorithms from crowdkit.aggregation.classification and found myself writing such kind of function:
def get_scores(model, data, fit=True):
if fit:
model.fit(data)
probas = getattr(model, "probas_", None)
if probas is not None:
return probas
predictor = getattr(model, "predict_score", None)
if predictor is None:
predictor = model.predict_proba
return predictor(data)
That's because different models have different methods for retrieving scores. For example, MMSR has predict_score while almost all others have predict_proba. Some have field probas_ , while others don't.
This seems strange and inconsistent.
Feature description
Unify naming of predict_score functions and presence of probas_ field
Problem description
I wanted to test quality metrics of several different algorithms from
crowdkit.aggregation.classificationand found myself writing such kind of function:That's because different models have different methods for retrieving scores. For example,
MMSRhaspredict_scorewhile almost all others havepredict_proba. Some have fieldprobas_, while others don't.This seems strange and inconsistent.
Feature description
Unify naming of
predict_scorefunctions and presence ofprobas_field