From 2e22639a888bf5327ccfd0f8e40f6abedbd42186 Mon Sep 17 00:00:00 2001 From: TraderLife <62692145+traderlife8@users.noreply.github.com> Date: Wed, 5 Jan 2022 09:43:49 +0800 Subject: [PATCH] Update custom_loss_and_metric_tutorial.ipynb model2.predict(X_test) File "_catboost.pyx", line 4546, in _catboost._CatBoost._base_predict File "_catboost.pyx", line 1609, in _catboost.transform_predictions File "_catboost.pyx", line 5350, in _catboost._convert_to_visible_labels IndexError: index 0 is out of bounds for axis 0 with size 0 --- custom_loss/custom_loss_and_metric_tutorial.ipynb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/custom_loss/custom_loss_and_metric_tutorial.ipynb b/custom_loss/custom_loss_and_metric_tutorial.ipynb index cb5c005..6982f8e 100644 --- a/custom_loss/custom_loss_and_metric_tutorial.ipynb +++ b/custom_loss/custom_loss_and_metric_tutorial.ipynb @@ -280,6 +280,7 @@ " learning_rate=0.03, bootstrap_type='Bayesian', boost_from_average=False,\n", " leaf_estimation_iterations=1, leaf_estimation_method='Gradient')\n", "model1.fit(X_train, y_train, eval_set=(X_test, y_test))" + "model1.predict(X_test)" ] }, { @@ -323,6 +324,7 @@ " learning_rate=0.03, bootstrap_type='Bayesian', boost_from_average=False,\n", " leaf_estimation_iterations=1, leaf_estimation_method='Gradient')\n", "model2.fit(X_train, y_train, eval_set=(X_test, y_test))" + "model2.predict(X_test)" ] }, { @@ -455,6 +457,7 @@ " learning_rate=0.03, bootstrap_type='Bayesian', boost_from_average=False,\n", " leaf_estimation_iterations=1, leaf_estimation_method='Gradient')\n", "model1.fit(X_train, y_train, eval_set=(X_test, y_test))" + "model1.predict(X_test)" ] }, { @@ -498,6 +501,7 @@ " learning_rate=0.03, bootstrap_type='Bayesian', boost_from_average=False,\n", " leaf_estimation_iterations=1, leaf_estimation_method='Gradient')\n", "model2.fit(X_train, y_train, eval_set=(X_test, y_test))" + "model2.predict(X_test)" ] }, { @@ -652,6 +656,7 @@ " learning_rate=0.03, bootstrap_type='Bayesian', boost_from_average=False,\n", " leaf_estimation_iterations=1, leaf_estimation_method='Newton', classes_count=5)\n", "model1.fit(X_train, y_train, eval_set=(X_test, y_test))" + "model1.predict(X_test)" ] }, { @@ -695,6 +700,7 @@ " learning_rate=0.03, bootstrap_type='Bayesian', boost_from_average=False,\n", " leaf_estimation_iterations=1, leaf_estimation_method='Newton', classes_count=5)\n", "model2.fit(X_train, y_train, eval_set=(X_test, y_test))" + "model2.predict(X_test)" ] } ],