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
Right now I'm using GridSearchCV to determine the optimal classifier parameters for a binary classification problem. I'm using the Matthews correlation coefficient as the scorer for GridSearchCV. However, I also need to know the average precision and recall of the best classifier (as determined by the Matthews correlation coefficient) on the validation data.
Given the way that GridSearchCV works, after calling it I have to make two calls to cross_validation.cross_val_score to get the precision and recall. Under the hood this involves repeating the same time-consuming fitting of my validation data 3 times over - once in GridSearchCV, and then in each cross_val_score call. It's true that by rolling my own cross-validation code I could reduce this duplication to a factor of 2 (rather than 3), but fundamentally I should be able to get this information from GridSearchCV. Perhaps its initializer should take a parameter named something like report_scorers that would take a list of scoring functions, and instances could have a corresponding list attribute report_scores_ that the average values would be dumped into?
The text was updated successfully, but these errors were encountered:
Right now I'm using GridSearchCV to determine the optimal classifier parameters for a binary classification problem. I'm using the Matthews correlation coefficient as the scorer for GridSearchCV. However, I also need to know the average precision and recall of the best classifier (as determined by the Matthews correlation coefficient) on the validation data.
Given the way that GridSearchCV works, after calling it I have to make two calls to cross_validation.cross_val_score to get the precision and recall. Under the hood this involves repeating the same time-consuming fitting of my validation data 3 times over - once in GridSearchCV, and then in each cross_val_score call. It's true that by rolling my own cross-validation code I could reduce this duplication to a factor of 2 (rather than 3), but fundamentally I should be able to get this information from GridSearchCV. Perhaps its initializer should take a parameter named something like
report_scorers
that would take a list of scoring functions, and instances could have a corresponding list attributereport_scores_
that the average values would be dumped into?The text was updated successfully, but these errors were encountered: