Re: [Scikit-learn-general] Get Other Classification Metrics For GridSearch

2015-05-18 Thread Adam Goodkind
That makes sense. It was just confusing from the documentation, since it looked like I needed to pass the predictions into the f1_score(), and since f1_score() specifically mentioned a pos_label parameter. On Mon, May 18, 2015 at 12:05 PM, Andreas Mueller wrote: > make_scorer takes **kwargs whi

Re: [Scikit-learn-general] Get Other Classification Metrics For GridSearch

2015-05-18 Thread Andreas Mueller
make_scorer takes **kwargs which will then be passed on. On 05/18/2015 11:50 AM, Adam Goodkind wrote: Thanks Andy, I was confused because the documentation for make_scorer() doesn't show it taking a pos_label parameter. The documentation for f1_score(), though, does show it taking a pos_labe

Re: [Scikit-learn-general] Get Other Classification Metrics For GridSearch

2015-05-18 Thread Adam Goodkind
Thanks Andy, I was confused because the documentation for make_scorer() doesn't show it taking a pos_label parameter. The documentation for f1_score(), though, does show it taking a pos_label parameter. On Mon, May 18, 2015 at 11:32 AM, Andreas Mueller wrote: > You need to do: > min_f_scorer =

Re: [Scikit-learn-general] Get Other Classification Metrics For GridSearch

2015-05-18 Thread Andreas Mueller
You need to do: min_f_scorer = make_scorer(f1_score, pos_label=1) See the example here: http://scikit-learn.org/dev/modules/generated/sklearn.metrics.make_scorer.html#sklearn.metrics.make_scorer and http://scikit-learn.org/dev/modules/model_evaluation.html#defining-your-scoring-strategy-from-metr

Re: [Scikit-learn-general] Get Other Classification Metrics For GridSearch

2015-05-17 Thread Adam Goodkind
Hi Andy, I'm following up on this from a while ago, because I finally got around to trying to implement it. To get the minority f1 score from my grid search, I have: min_f_scorer = make_scorer(f1_score(pos_label=1)) grid_search = GridSearchCV(pipeline, parameters, verbose=1, cv=3, scoring=min_f1_

Re: [Scikit-learn-general] Get Other Classification Metrics For GridSearch

2015-05-08 Thread Andreas Mueller
Hi Adam. You can get the f_score by setting ``GridSearchCV(..., scoring='f1_score')``. By default, the "positive" class if the one labeled "1": http://scikit-learn.org/dev/modules/generated/sklearn.metrics.f1_score.html#sklearn.metrics.f1_score If you want more control, you can do my_f_scoring

[Scikit-learn-general] Get Other Classification Metrics For GridSearch

2015-05-08 Thread Adam Goodkind
In performing a grid search, I know we can get overall accuracy, but I'm also interested in the minority F score. Is there a way to get that for each parameter setting combination? Thanks, Adam -- *Adam Goodkind * adamgoodkind.com @adamgreatkind