Easy k-Means Clustering with MATLAB
Cluster data using the k-means algorithm in the Live Editor. The Cluster Data Live Editor Task enables you to interactively perform k-means clustering. The task generates MATLAB® code for your live script and returns the resulting cluster indices and the cluster centroid locations to the MATLAB workspace. Determine the optimal number of clusters for your data manually by selecting the number of clusters or automatically by specifying criteria such as gap values, silhouette values, Davies-Bouldin index values, and Calinski-Harabasz index values. Customize the parameters for clustering your data, including the distance metric and the number of replicates. Automatically visualize the clustered data.
Published: 21 Feb 2022
Related Products
Learn More
Featured Product
Statistics and Machine Learning Toolbox
Up Next:
Related Videos:
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)