Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
C
covid_analysis
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
COMPARA
covid_analysis
Commits
1e69d01c
Commit
1e69d01c
authored
Jul 08, 2024
by
Joaquin Torres
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Completed comments
parent
62af7a7b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
26 deletions
+12
-26
gen_train_data/gen_train_data.ipynb
gen_train_data/gen_train_data.ipynb
+12
-26
No files found.
gen_train_data/gen_train_data.ipynb
View file @
1e69d01c
...
...
@@ -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,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment