2013/6/9 Joel Nothman <jnoth...@student.usyd.edu.au>: > Again, it's probably over the top, but I think it's a useful interface > (prototyped at > https://github.com/jnothman/scikit-learn/tree/search_results): > >>>> from __future__ import print_function >>>> from sklearn.grid_search import GridSearchCV >>>> from sklearn.datasets import load_iris >>>> from sklearn.svm import SVC >>>> iris = load_iris() >>>> grid = {'C': [0.01, 0.1, 1], 'degree': [1, 2, 3]} >>>> search = GridSearchCV(SVC(kernel='poly'), >>>> param_grid=grid).fit(iris.data, iris.target) >>>> res = search.results_ >>>> res.best().mean_test_score > 0.97333333333333338 >>>> res > <9 candidates. Best results: > <0.973 for {'C': 0.10000000000000001, 'degree': 3}>, > <0.967 for {'C': 1.0, 'degree': 3}>, > <0.967 for {'C': 1.0, 'degree': 2}>, ...> >>>> for tup in res.zipped('parameters', 'mean_test_score', >>>> 'std_test_score'): > ... print(*tup) > ... > {'C': 0.01, 'degree': 1} 0.673333333333 0.033993463424 > {'C': 0.01, 'degree': 2} 0.926666666667 0.00942809041582 > {'C': 0.01, 'degree': 3} 0.966666666667 0.0188561808316 > {'C': 0.10000000000000001, 'degree': 1} 0.94 0.0163299316186 > {'C': 0.10000000000000001, 'degree': 2} 0.966666666667 0.0188561808316 > {'C': 0.10000000000000001, 'degree': 3} 0.973333333333 0.00942809041582 > {'C': 1.0, 'degree': 1} 0.966666666667 0.0249443825785 > {'C': 1.0, 'degree': 2} 0.966666666667 0.00942809041582 > {'C': 1.0, 'degree': 3} 0.966666666667 0.0188561808316
I very much like that but I still think that we should keep the raw evaluation log to make it easier to implement future extensions. -- Olivier http://twitter.com/ogrisel - http://github.com/ogrisel ------------------------------------------------------------------------------ How ServiceNow helps IT people transform IT departments: 1. A cloud service to automate IT design, transition and operations 2. Dashboards that offer high-level views of enterprise services 3. A single system of record for all IT processes http://p.sf.net/sfu/servicenow-d2d-j _______________________________________________ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general