Skip to content

Commit

Permalink
Update python-dml-401k.ipynb
Browse files Browse the repository at this point in the history
  • Loading branch information
vsyrgkanis committed Jun 29, 2024
1 parent 2c3b0aa commit 6346834
Showing 1 changed file with 5 additions and 19 deletions.
24 changes: 5 additions & 19 deletions PM4/python-dml-401k.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
},
"outputs": [],
"source": [
"!pip install wget"
"!pip install wget\n",
"!pip install formulaic"
]
},
{
Expand All @@ -69,11 +70,12 @@
"from sklearn.ensemble import GradientBoostingRegressor, GradientBoostingClassifier\n",
"from sklearn.ensemble import RandomForestRegressor, RandomForestClassifier\n",
"from sklearn.tree import DecisionTreeRegressor, DecisionTreeClassifier\n",
"import warnings\n",
"from sklearn.base import BaseEstimator, clone\n",
"from sklearn.base import TransformerMixin, BaseEstimator, clone\n",
"from IPython.display import Markdown\n",
"import wget\n",
"import seaborn as sns\n",
"from formulaic import Formula\n",
"import warnings\n",
"warnings.simplefilter('ignore')\n",
"np.random.seed(1234)"
]
Expand Down Expand Up @@ -276,18 +278,6 @@
"### We define a transformer that constructs the engineered features for controls"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "a2cfdf4c",
"metadata": {
"id": "a2cfdf4c"
},
"outputs": [],
"source": [
"!pip install formulaic"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -297,10 +287,6 @@
},
"outputs": [],
"source": [
"from sklearn.base import TransformerMixin\n",
"from formulaic import Formula\n",
"\n",
"\n",
"class FormulaTransformer(TransformerMixin, BaseEstimator):\n",
"\n",
" def __init__(self, formula, array=False):\n",
Expand Down

0 comments on commit 6346834

Please sign in to comment.