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
c954c9be
Commit
c954c9be
authored
Apr 24, 2024
by
Joaquin Torres
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replacing nans with mode and recomputing corr
parent
21b3cb2c
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27024 additions
and
26799 deletions
+27024
-26799
EDA.ipynb
EDA.ipynb
+34
-0
EDA_plots/heatmaps_one_hot.svg
EDA_plots/heatmaps_one_hot.svg
+26990
-26799
No files found.
EDA.ipynb
View file @
c954c9be
...
...
@@ -3858,6 +3858,40 @@
"print(\"------SIT_TTO 3: ALTA-----\")\n",
"find_diff(3, corr_mats[2][0], corr_mats[2][1])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### PCA (in progress)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# ==============================================================================\n",
"from sklearn.decomposition import PCA\n",
"from sklearn.pipeline import make_pipeline\n",
"from sklearn.preprocessing import StandardScaler\n",
"from sklearn.preprocessing import scale"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Standarize data to have mean 0 and sd 1, since variables have different dispersions -> PCA\n",
"pca_pipe = make_pipeline(StandardScaler(), PCA())\n",
"pca_pipe.fit(bd)\n",
"\n",
"# Se extrae el modelo entrenado del pipeline\n",
"modelo_pca = pca_pipe.named_steps['pca']"
]
}
],
"metadata": {
EDA_plots/heatmaps_one_hot.svg
View file @
c954c9be
This diff is collapsed.
Click to expand it.
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