Skip to content

Commit 8b5f432

Browse files
authored
Merge pull request #113 from DoubleML/s-fix-nb
change get_feature_names
2 parents 9d56863 + 2683b4b commit 8b5f432

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.idea

doc/examples/py_double_ml_multiway_cluster.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@
607607
"source": [
608608
"poly = PolynomialFeatures(degree=3, include_bias=False)\n",
609609
"data_transf = poly.fit_transform(blp_data[x_cols])\n",
610-
"x_cols_poly = poly.get_feature_names(x_cols)\n",
610+
"x_cols_poly = poly.get_feature_names_out(x_cols)\n",
611611
"data_transf = pd.DataFrame(data_transf, columns=x_cols_poly)\n",
612612
"data_transf.index = blp_data.index"
613613
]

doc/examples/py_double_ml_pension.ipynb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,12 +343,11 @@
343343
"for key, degree in poly_dict.items():\n",
344344
" poly = PolynomialFeatures(degree, include_bias=False)\n",
345345
" data_transf = poly.fit_transform(data[[key]])\n",
346-
" x_cols = poly.get_feature_names([key])\n",
346+
" x_cols = poly.get_feature_names_out([key])\n",
347347
" data_transf = pd.DataFrame(data_transf, columns=x_cols)\n",
348348
" \n",
349349
" features = pd.concat((features, data_transf),\n",
350350
" axis=1, sort=False)\n",
351-
"\n",
352351
"model_data = pd.concat((data.copy()[['net_tfa', 'e401']], features.copy()),\n",
353352
" axis=1, sort=False)\n",
354353
"\n",

0 commit comments

Comments
 (0)