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)
def test_ratio_errors_zeros(): ratio = ratio_errors(y_dsel_ex1, y_pred_zeros, y_pred_zeros) assert ratio == 0.0
def test_ratio_ones_zeros(): ratio = ratio_errors(y_dsel_ex1, y_pred_ones, y_pred_zeros) assert ratio == sys.float_info.max
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
def test_ratio_errors_ones(): ratio = ratio_errors(y_dsel_ex1, y_pred_ones, y_pred_ones) assert ratio == 0.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)
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
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
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