예제 #1
0
def test_sklearn_pipe_fit_predict1():
    p = Pipe() +\
        Segment(anova_filter, 'anova') +\
        Segment(clf, 'svc')

    p.fit(X, y)
    p.predict(X)
예제 #2
0
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)
예제 #3
0
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)