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_save(resource_tmp_file): p = Pipe() +\ Segment(lambda x: x+1, "step1") + \ Segment(lambda x: x+1, "step2") p._save(resource_tmp_file)