Exemplo n.º 1
0
def test_ratio_errors_diff_classifiers():
    ratio = ratio_errors(y_real, y_pred_classifier1, y_pred_classifier2)
    assert np.isclose(ratio, 1.66, atol=0.01)
Exemplo n.º 2
0
def test_ratio_errors_zeros():
    ratio = ratio_errors(y_dsel_ex1, y_pred_zeros, y_pred_zeros)
    assert ratio == 0.0
Exemplo n.º 3
0
def test_ratio_ones_zeros():
    ratio = ratio_errors(y_dsel_ex1, y_pred_ones, y_pred_zeros)
    assert ratio == sys.float_info.max
Exemplo n.º 4
0
def test_ratio_order():
    ratio1 = ratio_errors(y_dsel_ex1, y_pred_ones, y_pred_zeros)
    ratio2 = ratio_errors(y_dsel_ex1, y_pred_zeros, y_pred_ones)
    assert ratio1 == ratio2
Exemplo n.º 5
0
def test_ratio_errors_ones():
    ratio = ratio_errors(y_dsel_ex1, y_pred_ones, y_pred_ones)
    assert ratio == 0.0
Exemplo n.º 6
0
def test_ratio_errors_diff_classifiers(example_diversity):
    y_pred_classifier1, y_pred_classifier2, y_real, y_ex1 = example_diversity
    ratio = ratio_errors(y_real, y_pred_classifier1, y_pred_classifier2)
    assert np.isclose(ratio, 1.66, atol=0.01)
Exemplo n.º 7
0
def test_ratio_order(example_diversity_ones_zeros):
    y, y_pred_ones, y_pred_zeros = example_diversity_ones_zeros
    ratio1 = ratio_errors(y, y_pred_ones, y_pred_zeros)
    ratio2 = ratio_errors(y, y_pred_zeros, y_pred_ones)
    assert ratio1 == ratio2
Exemplo n.º 8
0
def test_ratio_ones_zeros(example_diversity_ones_zeros):
    y, y_pred_ones, y_pred_zeros = example_diversity_ones_zeros
    ratio = ratio_errors(y, y_pred_ones, y_pred_zeros)
    assert ratio == sys.float_info.max
Exemplo n.º 9
0
def test_ratio_errors_ones(example_diversity_ones_zeros):
    y, y_pred_ones, y_pred_zeros = example_diversity_ones_zeros
    ratio = ratio_errors(y, y_pred_ones, y_pred_ones)
    assert ratio == 0.0