def test_invalid_classification_loss():
    binary_clf = HistGradientBoostingClassifier(loss='binary_crossentropy')
    err_msg = "loss='binary_crossentropy' is not defined for multiclass classification with n_classes=3, use loss='categorical_crossentropy' instead"
    with pytest.raises(ValueError, match=err_msg):
        binary_clf.fit(np.zeros(shape=(3, 2)), np.arange(3))
def test_invalid_classification_loss():
    binary_clf = HistGradientBoostingClassifier(loss='binary_crossentropy')
    err_msg = "loss='binary_crossentropy' is not defined for multiclass classification with n_classes=3, use loss='categorical_crossentropy' instead"
    with pytest.raises(ValueError, match=err_msg):
        binary_clf.fit(np.zeros(shape=(3, 2)), np.arange(3))