Skip to content

Commit fb9952c

Browse files
gustavocidornelaswhoseoyster
authored andcommitted
Update get_feature_names -> get_feature_names_out due to newer version of scikit-learn (>=1.2)
1 parent 8d9a65a commit fb9952c

File tree

8 files changed

+5293
-5293
lines changed

8 files changed

+5293
-5293
lines changed

examples/tabular-classification/documentation-tutorial/tabular-tutorial-part-1.ipynb

Lines changed: 627 additions & 627 deletions
Large diffs are not rendered by default.

examples/tabular-classification/documentation-tutorial/tabular-tutorial-part-2.ipynb

Lines changed: 594 additions & 594 deletions
Large diffs are not rendered by default.

examples/tabular-classification/documentation-tutorial/tabular-tutorial-part-3.ipynb

Lines changed: 774 additions & 774 deletions
Large diffs are not rendered by default.

examples/tabular-classification/documentation-tutorial/tabular-tutorial-part-4.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@
218218
" df = df.copy(True)\n",
219219
" df.reset_index(drop=True, inplace=True) # Causes NaNs otherwise\n",
220220
" for feature, enc in encoders.items():\n",
221-
" enc_df = pd.DataFrame(enc.transform(df[[feature]]).toarray(), columns=enc.get_feature_names([feature]))\n",
221+
" enc_df = pd.DataFrame(enc.transform(df[[feature]]).toarray(), columns=enc.get_feature_names_out([feature]))\n",
222222
" df = df.join(enc_df)\n",
223223
" df = df.drop(columns=feature)\n",
224224
" return df"
@@ -599,7 +599,7 @@
599599
" for feature, enc in self.encoders.items():\n",
600600
" enc_df = pd.DataFrame(\n",
601601
" enc.transform(df[[feature]]).toarray(),\n",
602-
" columns=enc.get_feature_names([feature]),\n",
602+
" columns=enc.get_feature_names_out([feature]),\n",
603603
" )\n",
604604
" df = df.join(enc_df)\n",
605605
" df = df.drop(columns=feature)\n",

0 commit comments

Comments
 (0)