K-mean Clustering
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MAT NIZAM UTI
el 9 de Nov. de 2021
Editada: MAT NIZAM UTI
el 18 de Nov. de 2021
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.
0 comentarios
Respuesta aceptada
Image Analyst
el 12 de Nov. de 2021
If you have all the lat and lon values, then just put each into kmeans separately:
numColumns = 26; % Or however many columns you know there to be.
[xIndexes, xCentroids] = kmeans(lon, numColumns);
numRows = 50; % Or however many rows you know there to be.
[yIndexes, yCentroids] = kmeans(lat, numRows);
The values of the columns (x or longitude values) will be in xCentroids.
The values of the rows (y or lat values) will be in yCentroids.
16 comentarios
Image Analyst
el 18 de Nov. de 2021
So can we just take the first 2314 values and ignore the extra lat?
Más respuestas (1)
H R
el 9 de Nov. de 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 comentarios
H R
el 12 de Nov. de 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
el 14 de Nov. de 2021
Editada: Image Analyst
el 14 de Nov. de 2021
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!