def test_surfstar_pipeline_parallel():
"""Ensure that SURF* works in a sklearn pipeline where cross_val_score is parallelized"""
np.random.seed(9238745)
clf = make_pipeline(SURFstar(n_features_to_select=2),
RandomForestClassifier(n_estimators=100, n_jobs=-1))
assert np.mean(cross_val_score(clf, features, labels, cv=3, n_jobs=-1)) > 0.7
评论列表
文章目录