Solution Review: Create k-means Model
This is the in-depth solution review of the "Create k-means Model" coding challenge.
We'll cover the following...
Solution
Press + to interact
# Create K-Means model with 3 clusters and assign it to model variable.model = create_model('kmeans', num_clusters = 3)# Assign cluster labels to the dataset and assign result to clusters variable.clusters = assign_model(model)# Print the first 10 instances of the resulting dataset.clusters.head(10)
Explanation
-
Line 3 ...