How to do K-Means clustering on data that goes beyond 3 dimensions?

조회 수: 2 (최근 30일)
Pietro Quinzani
Pietro Quinzani 2021년 10월 23일
편집: Pietro Quinzani 2021년 10월 23일
I have done K-means clustering before but always on datasets that could be plotted in a 2D or 3D space. Right now I have a 35*6 matrix and need to make clusters based on those 6 dimensions. How can I program these clusters and still be able to retrieve the data to know which data point is in which group? Since I don't have any idea how to cluster past these 3 dimensions I don't have written any script yet, that's why I am only looking for some guidance and direction to understand how to do it and begin writing.
Thanks in advance, I really appreciate the help!
  댓글 수: 2
Kelly Kearney
Kelly Kearney 2021년 10월 23일
The process is exactly the same as for 2 or 3 dimensions:
idx = kmeans(rand(35,6), 6);
Visualizing the results may be more complicated...
Pietro Quinzani
Pietro Quinzani 2021년 10월 23일
편집: Pietro Quinzani 2021년 10월 23일
@Kelly Kearney Oh cool, so it's easier than I thought. I don't really need to visualize it though but how can I track through idx in which group is each data point?

댓글을 달려면 로그인하십시오.

답변 (0개)

제품

Community Treasure Hunt

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

Start Hunting!

Translated by