Skip to content

Commit 10d59a4

Browse files
2 parents a7204f0 + 728a73d commit 10d59a4

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

Sujet_3_Python.ipynb

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@
144144
"id": "f72b31fc-f676-489f-93c3-4adce67aacc3",
145145
"metadata": {},
146146
"source": [
147-
"A favoriser, en utilisant les données déjà importées sur le Datalab"
147+
"A favoriser, en utilisant les données déjà importées sur le Datalab (si vous y avez bien accès)"
148148
]
149149
},
150150
{
@@ -209,7 +209,7 @@
209209
"id": "ebd17192-125e-429c-bd50-96ddc6c2da5e",
210210
"metadata": {},
211211
"source": [
212-
"Eviter cette option pour ne pas surcharger le SSP Cloud si trop de participants font des téléchargements en même temps. A n'utiliser que si impossibilité d'utiliser le Datalab."
212+
"A n'utiliser que si vous n'avez pas accès au système s3 du SSP Cloud :"
213213
]
214214
},
215215
{
@@ -233,6 +233,9 @@
233233
"fpq = pd.read_csv(\"https://www.data.gouv.fr/fr/datasets/r/32e79499-9897-423b-acd6-143121340f86\",\n",
234234
" sep=\";\"\n",
235235
" ).infer_objects()\n",
236+
"\n",
237+
"# Pour la partie 3\n",
238+
"df = pd.read_parquet(\"https://minio.lab.sspcloud.fr/projet-funathon/2023/sujet3/diffusion/description_individu_inca.parquet\")\n",
236239
"```"
237240
]
238241
},
@@ -4041,9 +4044,7 @@
40414044
{
40424045
"cell_type": "markdown",
40434046
"id": "1f753dc2-3c24-48d3-b9c5-38c229463cdc",
4044-
"metadata": {
4045-
"jp-MarkdownHeadingCollapsed": true
4046-
},
4047+
"metadata": {},
40474048
"source": [
40484049
"### 2. Le clustering en lui-même"
40494050
]
@@ -4131,6 +4132,7 @@
41314132
"\n",
41324133
"```python\n",
41334134
"from yellowbrick.cluster import KElbowVisualizer\n",
4135+
"from sklearn.cluster import KMeans\n",
41344136
"\n",
41354137
"elbow_method = KElbowVisualizer(KMeans(), k=(1,10))\n",
41364138
"elbow_method.fit(habitudes_indiv_clustering)\n",
@@ -4514,7 +4516,7 @@
45144516
"projection_individus = pd.DataFrame(data=projection_individus_array, columns=['PC1', 'PC2', 'PC3'])\n",
45154517
"\n",
45164518
"# Obtenir les poids des caractéristiques pour chaque composante principale\n",
4517-
"composantes_principales = pd.DataFrame(acp.components_, columns=habitudes_indiv_clustering.columns)\n",
4519+
"composantes_principales = pd.DataFrame(acp.components_, columns=habitudes_indiv_clustering_1.columns)\n",
45184520
"```\n",
45194521
"\n",
45204522
"</details>"
@@ -8274,7 +8276,7 @@
82748276
"name": "python",
82758277
"nbconvert_exporter": "python",
82768278
"pygments_lexer": "ipython3",
8277-
"version": "3.10.6"
8279+
"version": "3.10.9"
82788280
}
82798281
},
82808282
"nbformat": 4,

0 commit comments

Comments
 (0)