Merge pull request #2106 from recommenders-team/bug/log_loss_breaking_change
Fix breaking change in sklearn in log_loss
This commit is contained in:
Коммит
058300dc6e
|
@ -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"
|
||||
]
|
||||
|
@ -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)"
|
||||
|
@ -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})"
|
||||
]
|
||||
|
|
Загрузка…
Ссылка в новой задаче