Skip to content

Commit

Permalink
Merge pull request #2106 from recommenders-team/bug/log_loss_breaking…
Browse files Browse the repository at this point in the history
…_change

Fix breaking change in sklearn in log_loss
  • Loading branch information
miguelgfierro committed Jun 5, 2024
2 parents d849dc6 + a92b31a commit 058300d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/00_quick_start/lightgbm_tinycriteo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@
"source": [
"test_preds = lgb_model.predict(test_x)\n",
"auc = roc_auc_score(np.asarray(test_y.reshape(-1)), np.asarray(test_preds))\n",
"logloss = log_loss(np.asarray(test_y.reshape(-1)), np.asarray(test_preds), eps=1e-12)\n",
"logloss = log_loss(np.asarray(test_y.reshape(-1)), np.asarray(test_preds))\n",
"res_basic = {\"auc\": auc, \"logloss\": logloss}\n",
"print(res_basic)\n"
]
Expand Down Expand Up @@ -904,7 +904,7 @@
],
"source": [
"auc = roc_auc_score(np.asarray(test_y.reshape(-1)), np.asarray(test_preds))\n",
"logloss = log_loss(np.asarray(test_y.reshape(-1)), np.asarray(test_preds), eps=1e-12)\n",
"logloss = log_loss(np.asarray(test_y.reshape(-1)), np.asarray(test_preds))\n",
"res_optim = {\"auc\": auc, \"logloss\": logloss}\n",
"\n",
"print(res_optim)"
Expand Down Expand Up @@ -959,7 +959,7 @@
],
"source": [
"auc = roc_auc_score(np.asarray(test_y.reshape(-1)), np.asarray(test_preds))\n",
"logloss = log_loss(np.asarray(test_y.reshape(-1)), np.asarray(test_preds), eps=1e-12)\n",
"logloss = log_loss(np.asarray(test_y.reshape(-1)), np.asarray(test_preds))\n",
"\n",
"print({\"auc\": auc, \"logloss\": logloss})"
]
Expand Down

0 comments on commit 058300d

Please sign in to comment.