From 1e69d01cfdf30ed359b8f456f60c1f4a6384adf3 Mon Sep 17 00:00:00 2001 From: joaquintb Date: Mon, 8 Jul 2024 12:05:07 +0200 Subject: [PATCH] Completed comments --- gen_train_data/gen_train_data.ipynb | 38 +++++++++-------------------- 1 file changed, 12 insertions(+), 26 deletions(-) diff --git a/gen_train_data/gen_train_data.ipynb b/gen_train_data/gen_train_data.ipynb index 309411a..6ae5048 100644 --- a/gen_train_data/gen_train_data.ipynb +++ b/gen_train_data/gen_train_data.ipynb @@ -17,7 +17,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -31,7 +31,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -42,30 +42,9 @@ }, { "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "(22861, 39)\n", - "(10677, 39)\n", - "(22861,)\n", - "(10677,)\n", - "['Ed_Not_Complete_Primary' 'Ed_Primary' 'Ed_Secondary'\n", - " 'Ed_Secondary_Technical' 'Ed_Tertiary' 'Social_Protection'\n", - " 'JobIn_Unstable' 'JobIn_Stable' 'JobIn_Unemployed' 'Hous_Institutional'\n", - " 'Hous_Stable' 'Hous_Unstable' 'Early_Alterations' 'SocInc_Family_Friends'\n", - " 'SocInc_Alone' 'SocInc_Instit' 'Risk_Stigma' 'Structural_Conflict' 'Age'\n", - " 'Sex' 'Num_Children' 'Smoking' 'Bio_Vulner' 'Opiods_DXCIE'\n", - " 'Cannabis_DXCIE' 'BZD_DXCIE' 'Cocaine_DXCIE' 'Hallucin_DXCIE'\n", - " 'Tobacco_DXCIE' 'Freq_1dpw' 'Freq_2-3dpw' 'Freq_4-6dpw' 'Freq_l1dpw'\n", - " 'Freq_None' 'Freq_Everyday' 'Years_Drug_Use' 'Other_Psychiatric_DX'\n", - " 'Previous_Treatments' 'Treatment_Adherence']\n" - ] - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "# Creating a numpy matrix (X) without the target variable and a list with the target variable (y) \n", "X_pre, y_pre = df_pre.loc[:, df_pre.columns != \"Treatment_Outcome\"].to_numpy(), df_pre.Treatment_Outcome\n", @@ -162,6 +141,13 @@ "np.save('./output/post/y_train_over_post.npy', y_train_over_post)" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Pipeline 4: UNDER" + ] + }, { "cell_type": "code", "execution_count": null, -- 2.24.1