K-mean Clustering
Show older comments
Hi Everyone, can someone help me on how to use the K-mean clustering or perhaps share with me the suitable coding use to cluster wind speed data. I hava wind speed data in the form of Latitude, Longitude, Wind Speed. I want to cluster the data into 3 groups.
Accepted Answer
More Answers (1)
H R
on 9 Nov 2021
If your data is in a matrix format X, then you can use the following:
[idx,C] = kmeans(X,3,'Distance','cityblock','Replicates',5);
6 Comments
H R
on 9 Nov 2021
Make sure to use a correct 'Distance' that makes sene to you. Try different distances and observe the results.
MAT NIZAM UTI
on 12 Nov 2021
It seems you basically have v=f(x,y). So, I don't think you can mix dependent and independent variables in clustering i.e. (x,y,v) to gain useful information (if this is the case). I think it's better to use a supervised method instead. Alternatively, you may try to perform clustering using (x,y) and then see if the outcome of the clustering can be useful to give information about v. In doing so, I guess Euclidean distance would be enough. It seems there is a relevant paper on your subject as well: https://ieeexplore.ieee.org/document/7884477.
MAT NIZAM UTI
on 12 Nov 2021
H R
on 12 Nov 2021
Yes, every thing is possible (even using 1D data) , but you have to finally check what you are looking for from the clustering task and check if the outcome makes sense to you.
MAT NIZAM UTI
on 14 Nov 2021
Edited: Image Analyst
on 14 Nov 2021
Categories
Find more on k-Means and k-Medoids Clustering in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


