Exemple #1
0
def test_init_regression():
    from EvoDAG.model import Ensemble
    m = Ensemble.init(n_estimators=4, n_jobs=4, seed=10,
                      classifier=False).fit(X, cl)
    hy = m.predict(X)
    assert np.unique(hy).shape[0] > 3
    default_nargs()
Exemple #2
0
def test_init2():
    from EvoDAG.model import Ensemble
    m = Ensemble.init(n_estimators=4, n_jobs=1, seed=10, early_stopping_rounds=100).fit(X, cl)
    hy = m.predict(X)
    print((cl == hy).mean(), cl, hy)
    assert (cl == hy).mean() > 0.9
    default_nargs()
Exemple #3
0
def test_init2():
    from EvoDAG.model import Ensemble
    m = Ensemble.init(n_estimators=4, n_jobs=1, seed=10).fit(X, cl)
    hy = m.predict(X)
    print([x.full_array() for x in m.decision_function(X)])
    print((cl == hy).mean(), cl, hy)
    assert (cl == hy).mean() > 0.9
    default_nargs()
Exemple #4
0
def test_init():
    from EvoDAG.model import Ensemble
    m = Ensemble.init(n_estimators=4, n_jobs=4, seed=10).fit(X, cl)
    hy = m.predict(X)
    assert (cl == hy).mean() > 0.9
    default_nargs()