This shows you the differences between two versions of the page.
members:aguilloux:enseignements:dssp_drc [2019/12/06 09:02] Agathe Guilloux created |
members:aguilloux:enseignements:dssp_drc [2019/12/06 15:49] (current) Agathe Guilloux |
||
---|---|---|---|
Line 2: | Line 2: | ||
{{:members:aguilloux:enseignements:dr_unsupervised.zip| Documents}} | {{:members:aguilloux:enseignements:dr_unsupervised.zip| Documents}} | ||
+ | |||
+ | |||
+ | |||
+ | library(cluster) | ||
+ | |||
+ | distances = dist(decathlonR[1:10]) | ||
+ | |||
+ | K=15 | ||
+ | |||
+ | DecathlonRKmeans <- kmeans(decathlonR[1:10], K) | ||
+ | |||
+ | DecathlonTSNEKmeans <- kmeans(DecathlonTSNE$Y, K) | ||
+ | |||
+ | |||
+ | PlotDecathlon(DecathlonTSNE$Y, Col = factor(DecathlonRKmeans$cluster)) | ||
+ | |||
+ | PlotDecathlon(DecathlonTSNE$Y, Col = factor(DecathlonTSNEKmeans$cluster)) | ||
+ | |||
+ | plot(silhouette(DecathlonRKmeans$cluster,distances)) | ||
+ | |||
+ | plot(silhouette(DecathlonTSNEKmeans$cluster,distances)) |