Skip to content

Commit

Permalink
DOC: Do not override DataFrame with array
Browse files Browse the repository at this point in the history
Fixes #225
  • Loading branch information
sebp committed Oct 26, 2021
1 parent 39a7409 commit ec0ed18
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions doc/user_guide/evaluating-survival-models.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,7 @@
"num_columns = ['age', 'creatinine', 'kappa', 'lambda']\n",
"\n",
"imputer = SimpleImputer().fit(x_train.loc[:, num_columns])\n",
"x_train = imputer.transform(x_train.loc[:, num_columns])\n",
"x_test = imputer.transform(x_test.loc[:, num_columns])"
"x_test_imputed = imputer.transform(x_test.loc[:, num_columns])"
]
},
{
Expand Down Expand Up @@ -447,8 +446,8 @@
"\n",
" \n",
"for i, col in enumerate(num_columns):\n",
" plot_cumulative_dynamic_auc(x_test[:, i], col, color=\"C{}\".format(i))\n",
" ret = concordance_index_ipcw(y_train, y_test, x_test[:, i], tau=times[-1])"
" plot_cumulative_dynamic_auc(x_test_imputed[:, i], col, color=\"C{}\".format(i))\n",
" ret = concordance_index_ipcw(y_train, y_test, x_test_imputed[:, i], tau=times[-1])"
]
},
{
Expand Down

0 comments on commit ec0ed18

Please sign in to comment.