Axel-Bravo / 18_project_auto-ml

Automatic: Machine Learning project
GNU General Public License v3.0
2 stars 0 forks source link

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

Open Axel-Bravo opened 6 years ago

Axel-Bravo commented 6 years ago

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 commented 5 years ago

use: mode.cvresults (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