Esempio n. 1
0
def test_predict():
    X = X_dsel_ex1
    y = y_dsel_ex1
    oracle_test = Oracle(create_pool_classifiers())
    predicted_labels = oracle_test.predict(X, y)
    assert np.equal(predicted_labels, y).all()

    assert oracle_test.score(X, y) == 1.0
Esempio n. 2
0
def test_predict(create_X_y, create_pool_classifiers):
    X, y = create_X_y

    oracle_test = Oracle(create_pool_classifiers)
    oracle_test.fit(X, y)
    predicted_labels = oracle_test.predict(X, y)
    assert np.equal(predicted_labels, y).all()

    assert oracle_test.score(X, y) == 1.0
Esempio n. 3
0
def test_oracle():
    pool_classifiers, X_dsel, y_dsel, X_test, y_test = setup_classifiers()

    oracle = Oracle(pool_classifiers)
    assert np.isclose(oracle.score(X_test, y_test), 0.98787878787878791)
Esempio n. 4
0
def test_oracle():
    pool_classifiers, X_dsel, y_dsel, X_test, y_test = setup_classifiers()

    oracle = Oracle(pool_classifiers)
    oracle.fit(X_dsel, y_dsel)
    assert np.isclose(oracle.score(X_test, y_test), 0.99468085106382975)