Icon

06.01 Clustering solution

<p>06.01 Clustering - solution<br><br>[L4-ML] Machine Learning Algorithms - Specialization</p><p>06 Clustering<br>- Filter rows<br>- Train a k-Means model<br>- Visualize clustered entries on Scatter plot and OSM Map<br>- Calculate Silhouette Coefficients</p>

06 - Clustering

06.01 Clustering

Learning objective: In this exercise you'll learn how to apply a k-Means model to cluster geographical locations based on latitude and longitude.


Workflow description: In this workflow, a dataset containing information about various cities will be used, with a primary focus on the one related to the state of California (CA). The process will involve conducting a clustering analysis using latitude and longitude coordinates to identify each point on the map and determine its corresponding city.


You'll find the instructions to the exercises in the yellow annotations.

Step 1. Row Filter

Filter to entries from California (region_code = CA) (Row Filter node)


Step 2. Train a k-Means model

Train a k-Means model with k=3. Use only position data for clustering (latitude and longitude) (k-Means node)


Data Preparation


Step 3. Silhouette Coefficient

Calculate the Silhoutte Coefficients using the Silhouette Coefficient node


Step 4. Visualise the results (Optional)

Plot latitude and longitude in a view (OSM Map View node or Scatter Plot node) and use that to help you visually optimize k


k-Means
Color Manager
Locations_data
Table Reader
OSM Map View
Evaluate ClusterPerformance
Silhouette Coefficient
In California
Row Filter
Scatter Plot

Nodes

Extensions

Links