Skip to content
This repository has been archived by the owner on Sep 15, 2019. It is now read-only.

## Retrive "n" best models from sklearn "SearchGrid" #1

Open
Axel-Bravo opened this issue Jul 28, 2018 · 1 comment
Open

## Retrive "n" best models from sklearn "SearchGrid" #1

Axel-Bravo opened this issue Jul 28, 2018 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@Axel-Bravo
Copy link
Owner

Axel-Bravo commented Jul 28, 2018

Create a fork that is able to extract from the original "GridSearch" a version that returns the best "n" evaluators found during the Gridsearch

@Axel-Bravo Axel-Bravo self-assigned this Jul 28, 2018
@Axel-Bravo Axel-Bravo added the enhancement New feature or request label Jul 28, 2018
@Axel-Bravo
Copy link
Owner Author

use:
mode.cv_results_ (look at documentation)

search_results = pd.DataFrame.from_dict({
... 'bow': bow_search.cv_results_['mean_test_score'],
... 'tfidf': tfidf_search.cv_results_['mean_test_score'],
... 'l2': l2_search.cv_results_['mean_test_score']
... })
# Our usual matplotlib incantations. Seaborn is used here to make
# the plot pretty.
>>> import matplotlib.pyplot as plt
>>> import seaborn as sns
>>> sns.set_style("whitegrid")
>>> ax = sns.boxplot(data=search_results, width=0.4)
>>> ax.set_ylabel('Accuracy', size=14)
>>> ax.tick_params(labelsize=14)
Figure

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant