def test_multiclass_f1(): f1_score_name, f1_score_result = f1(multiclass_preds, multiclass_dtrain) assert f1_score_name == 'f1' assert f1_score_result == 2 / 9
def test_multiclass_f1_softprob(): f1_score_name, f1_score_result = f1(multiclass_preds_softprob, multiclass_dtrain) assert f1_score_name == 'f1' assert f1_score_result == 1 / 15
def test_binary_f1_logistic(): f1_score_name, f1_score_result = f1(binary_preds_logistic, binary_dtrain) assert f1_score_name == 'f1' assert f1_score_result == 1 / 3