def test_process_predictions_diff_sizes(example_diversity_ones_zeros): y_pred1 = np.ones(10) y_pred2 = np.ones(15) y, _, _ = example_diversity_ones_zeros with pytest.raises(ValueError): _ = _process_predictions(y, y_pred1, y_pred2)
def test_process_predictions_diff_sizes(): y_pred1 = np.ones(10) y_pred2 = np.ones(15) with pytest.raises(ValueError): _ = _process_predictions(y_dsel_ex1, y_pred1, y_pred2)
def test_process_predictions_ones(): N00, N10, N01, N11 = _process_predictions(y_dsel_ex1, y_pred_ones, y_pred_ones) assert N00 == 9.0 / 15.0 and N11 == 6.0 / 15.0 and N01 == 0.0 and N10 == 0.0
def test_process_predictions_zeros(): N00, N10, N01, N11 = _process_predictions(y_dsel_ex1, y_pred_zeros, y_pred_zeros) assert (N00 == 6.0 / 15.0 and N11 == 9.0 / 15.0 and N01 == 0.0 and N10 == 0.0)
def test_process_predictions_ones(example_diversity_ones_zeros): y, y_pred_ones, y_pred_zeros = example_diversity_ones_zeros N00, N10, N01, N11 = _process_predictions(y, y_pred_ones, y_pred_ones) assert N00 == 9.0 / 15.0 and N11 == 6.0 / 15.0 and N01 == 0.0 and N10 == 0.0