k-Means (kM) Clustering

Multiple Clusters with the kM and Initialization via k-Means++
143 Downloads
Aktualisiert 26. Mär 2021

Function
1. kMeans.predict(Xnew)

Description
1. Returns the estimated clusters of one or multiple test instances.

Example

X = [[1, 2]; [1, 4]; [1, 0];[10, 2]; [10, 4]; [10, 0]];
Xnew = [[0, 0]; [12, 3]];
k = 2;

mdl = kMeans(k);
mdl = mdl.fit(X);
Ypred = mdl.predict(Xnew)

Ypred =

1
2

centroids = mdl.C

1 2
10 2

See examples in the script files.

Zitieren als

David Ferreira (2024). k-Means (kM) Clustering (https://github.com/ferreirad08/kMeans/releases/tag/1.0.1), GitHub. Abgerufen .

Kompatibilität der MATLAB-Version
Erstellt mit R2016a
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Veröffentlicht Versionshinweise
1.0.1

See release notes for this release on GitHub: https://github.com/ferreirad08/kMeans/releases/tag/1.0.1

1.0.0

Um Probleme in diesem GitHub Add-On anzuzeigen oder zu melden, besuchen Sie das GitHub Repository.
Um Probleme in diesem GitHub Add-On anzuzeigen oder zu melden, besuchen Sie das GitHub Repository.