Sectie 1. Hoofdstuk 16
single
Challenge: Implementing K-Means Clustering
Veeg om het menu te tonen
Taak
Veeg om te beginnen met coderen
You are given a synthetic dataset stored in the data variable.
- Initialize a K-means model with
3clusters, setrandom_stateto42,n_initto'auto'and store it in thekmeansvariable. - Fit the model on the dataset, predict the cluster labels, and store the result in the
labelsvariable. - For each cluster
i, extract the points belonging to this cluster and store the result in thecluster_pointsvariable.
Oplossing
Was alles duidelijk?
Bedankt voor je feedback!
Sectie 1. Hoofdstuk 16
single
Vraag AI
Vraag AI
Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.