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 kmedoids() function

In MATLAB, K-medoids clustering is performed by the kmedoids() function, which partitions the observations of a matrix into k clusters and returns a vector containing the cluster indices of each observation. Rows of the input matrix correspond to points, and columns correspond to variables. Similar to the kmeans function, kmedoids by default uses squared Euclidean distances and the k-means++ algorithm to choose the initial cluster medoid positions.

Now, let's see how to apply this method. A large distribution company wants to reorganize its network by optimizing the position of its offices. To make it faster and cheaper to transfer goods from sorting hubs to peripheral locations, it seeks to identify the best positions. ...

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