How to define a classifiers parameters from a dictionary .
using grid search I get the best parameters which is a dictionary.
clf = svm.SVC()
grid_search = GridSearchCV(clf, param_grid=param_grid)
grid_search.fit(X, y)
best_para_ = grid_search.best_params_
# best_para_ is a dictionary which contains parameter for best performance
Now I am trying to define a new classifier with these best parameters
clf2 = svm.SVC(best_para_) #clf2 with best parameters
But this does not work.
What is the proper way?
Thanks
--
Sheila
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck®
Code Sight™ - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general