def _gs_SVC_r0( xM, yVc, params):
"""
Since classification is considered, we use yVc which includes digital values
whereas yV can include float point values.
"""
print(xM.shape, yVc.shape)
clf = svm.SVC()
#parmas = {'alpha': np.logspace(1, -1, 9)}
kf5 = cross_validation.KFold( xM.shape[0], n_folds=5, shuffle=True)
gs = grid_search.GridSearchCV( clf, params, cv = kf5, n_jobs = -1)
gs.fit( xM, yVc)
return gs
评论列表
文章目录