2011/11/6 Sami Liedes <[email protected]>: > clf = GridSearchCV(svm.sparse.SVC(C=1), TUNED_PARAMS, n_jobs=10) > clf.fit(tf, tc, cv=StratifiedKFold(tc, 5, indices=True))
Reproduced with a much smaller set of TUNED_PARAMS. With n_jobs=1, the problem does not occur. One solution is to clone(best_estimator) at grid_search.py, before line 341 (in the if self.refit block). Currently, the code assumes that a fit estimator can simply be re-fit on a new dataset, which is not true of sparse SVMs due to the ndarray.resize calls (and probably not of my NB estimators either, since I hadn't considered this possibility). -- Lars Buitinck Scientific programmer, ILPS University of Amsterdam ------------------------------------------------------------------------------ RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 _______________________________________________ Scikit-learn-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
