Evaluating the K-Means clustering model
In this section, we'll learn how to evaluate the performance of our K-Means clustering model.
The evaluation stage of a K-Means clustering model is different from the supervised machine learning models that we've performed in the previous chapters. Let's take a look at the steps we need to take to evaluate our machine learning model, as follows:
- Let's extract the centroids from the first machine learning model that we trained in the previous section, by running the following code:
SELECT * FROM ML.CENTROIDS Â Â Â Â Â Â Â Â (MODEL `07_chicago_taxi_drivers.clustering_by_speed`) ORDER BY centroid_id;
The
ML.CENTROIDS
function returns information about the centroids of the K-Means model. It accepts the model name as input in the round brackets, preceded by theMODEL
keyword.Important note
A centroid represents the center of a cluster in a K-Means clustering model. During the training phase...