Skip to content

Commit 55e3077

Browse files
author
Maksym Sydorchuk
committed
add test
Signed-off-by: Maksym Sydorchuk <[email protected]>
1 parent 51cb819 commit 55e3077

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/test_sklearn_gradient_boosting_converters.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,24 @@ def test_gradient_boosting_regressor_bool(self):
370370
X, model, model_onnx, basename="SklearnGradientBoostingRegressorBool-Dec4"
371371
)
372372

373+
def test_gradient_boosting_classifier_exponential(self):
374+
model, X = fit_classification_model(
375+
GradientBoostingClassifier(n_estimators=4, loss="exponential", random_state=42), 2
376+
)
377+
model_onnx = convert_sklearn(
378+
model,
379+
"gradient boosting classifier with exponential loss",
380+
[("input", FloatTensorType([None, X.shape[1]]))],
381+
target_opset=TARGET_OPSET,
382+
)
383+
self.assertIsNotNone(model_onnx)
384+
dump_data_and_model(
385+
X,
386+
model,
387+
model_onnx,
388+
basename="SklearnGradientBoostingClassifierExponentialLoss"
389+
)
390+
373391

374392
if __name__ == "__main__":
375393
unittest.main()

0 commit comments

Comments
 (0)