O'Reilly logo

MATLAB for Machine Learning by Giuseppe Ciaburro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The silhouette plot

To analyze exactly what is happening to the boundaries of the clusters, in order to understand how well they are separated, we can make a silhouette plot using cluster indices issued by kmeans(). The silhouette plot displays a measure of how close each point in one cluster is to points in neighboring clusters. The silhouette() function plots cluster silhouettes for the data matrix provided, with clusters defined. Rows of the input matrix correspond to points; columns correspond to coordinates.

The cluster defined can be a categorical variable, numeric vector, character matrix, or cell array of character vectors containing a cluster name for each point. The silhouette() function treats NaNs or empty character vectors in ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required