Friday, 15 July 2011

python - Scikit-learn Custom Scoring Function -



python - Scikit-learn Custom Scoring Function -

i'm using development branch of scikit-learn: 0.15-git.

trying initialize ridgeclassifiercv object custom scoring function failing error message typeerror: __init__() got unexpected keyword argument 'scoring'.

model = ridgeclassifiercv(scoring=make_scorer(score_func))

according docs, ridgeclassifier takes scoring parameter. according function signature, argument score_func. however, passing output of sklearn.metrics.maker_scorer score_func fails. ideas?

the end goal ridgeclassifiercv working multiclass (one vs. all) roc auc scores used scoring function.

score_func opposed standard scikit-learn scoring objects take arguments y_true, y_pred, instead of estimator, x, y_true. if have written own scoring function can work predictions coming out of ridge classifier, signature need.

although score_func deprecated, seems alternative in current state of master branch. certainly alter 0.15 release , scoring objects available. fact documented wrongly discrepancy should fixed then.

python scikit-learn

No comments:

Post a Comment