def test_sklearn_pipe_fit_predict1(): p = Pipe() +\ Segment(anova_filter, 'anova') +\ Segment(clf, 'svc') p.fit(X, y) p.predict(X)
def test_save_fitted_load_predict(resource_tmp_file): p = Pipe() +\ Segment(anova_filter, 'anova') +\ Segment(clf, 'svc') p.fit(X, y) p._save(resource_tmp_file) p = Pipe._load(resource_tmp_file) p.predict(X)
def test_sklearn_pipe_serialize(): def dummy(*args): return args p = Pipe() +\ Segment(anova_filter, 'anova') +\ Segment(dummy) +\ Segment(clf, 'svc') p.fit(X, y) p.predict(X, y=None)