On 07/30/2013 05:35 PM, Wifi Gi wrote: > I'm having trouble figuring out how to use the cross validation > scoring function. As far as I can tell, I'm exactly following the > tutorial given here: > http://scikit-learn.org/0.13/modules/cross_validation.html#computing-cross-validated-metrics > > > Could anyone tell me what I'm doing wrong? Does cross_val_score only > work with certain classifiers? > You are not using the example you linked to, you are using 0.14-rc, right?
You are using 0.14-rc features, but not in the correct way ;) The old interface was to give a scoring function to the ``score_func`` parameter. The new interface is to give a string from this list as the ``scoring`` parameter: http://scikit-learn.org/dev/modules/model_evaluation.html#the-scoring-parameter-defining-model-evaluation-rules so valid lines are score = cross_validation.cross_val_score(alg, x, y, cv=folds, score_func=metrics.accuracy_score) (old) score = cross_validation.cross_val_score(alg, x, y, cv=folds, scoring='accuracy') (new) Hth, Andy ------------------------------------------------------------------------------ Get your SQL database under version control now! Version control is standard for application code, but databases havent caught up. So what steps can you take to put your SQL databases under version control? Why should you start doing it? Read more to find out. http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk _______________________________________________ Scikit-learn-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
