Skip to content

Commit 0c20d22

Browse files
김시은김시은
authored andcommitted
dml 수정
1 parent 91260a6 commit 0c20d22

File tree

1 file changed

+0
-50
lines changed

1 file changed

+0
-50
lines changed

book/ate/did.ipynb

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -3773,56 +3773,6 @@
37733773
"- 다만, 모델 복잡성이 증가하고, 구현 및 해석이 어려울 수 있습니다."
37743774
]
37753775
},
3776-
{
3777-
"cell_type": "markdown",
3778-
"id": "3d522a65",
3779-
"metadata": {},
3780-
"source": [
3781-
" Data 생성"
3782-
]
3783-
},
3784-
{
3785-
"cell_type": "code",
3786-
"execution_count": 119,
3787-
"id": "44baede5",
3788-
"metadata": {},
3789-
"outputs": [],
3790-
"source": [
3791-
"from doubleml import DoubleMLData\n",
3792-
"import pandas as pd\n",
3793-
"\n",
3794-
"# region을 one-hot encoding (공변량으로 사용)\n",
3795-
"mkt_data_enc = pd.get_dummies(mkt_data_all, columns=['region'], drop_first=True)\n",
3796-
"\n",
3797-
"# DoubleMLData 구성\n",
3798-
"mkt_dml_data = DoubleMLData(\n",
3799-
" data=mkt_data_enc,\n",
3800-
" y_col='downloads',\n",
3801-
" d_cols='treated',\n",
3802-
" x_cols=['region_N', 'region_S', 'region_W', 'post']\n",
3803-
")"
3804-
]
3805-
},
3806-
{
3807-
"cell_type": "markdown",
3808-
"id": "dc414e35",
3809-
"metadata": {},
3810-
"source": [
3811-
"Learners 설정\n"
3812-
]
3813-
},
3814-
{
3815-
"cell_type": "code",
3816-
"execution_count": 120,
3817-
"id": "3b6d7828",
3818-
"metadata": {},
3819-
"outputs": [],
3820-
"source": [
3821-
"\n",
3822-
"ml_g = LGBMRegressor(n_estimators=50, num_leaves=5, verbose=-1)\n",
3823-
"ml_m = LGBMClassifier(n_estimators=50, num_leaves=5, verbose=-1)\n"
3824-
]
3825-
},
38263776
{
38273777
"cell_type": "markdown",
38283778
"id": "918e68d4",

0 commit comments

Comments
 (0)