필터 지우기
필터 지우기

K-mean for Wine data set

조회 수: 8 (최근 30일)
Ganesh
Ganesh 2013년 8월 27일
답변: Paul Munro 2023년 2월 21일
Hi,
I performed a K-mean algorithm command on the wine data set from UCI respiratory. This dataset contains chemical analysis of 178 wines, derived from three different cultivars. Wine type is based on 13 continuous features.
Here's the command load 'wine_data.txt';
[IDX,C,sumd,D] = kmeans(wine_data,3,... 'start','sample',... 'Replicates',100,... 'maxiter',1000, 'display','final');
The final Best total sum of distances is 2.37069e+06. This result is way far from the reported K-means solution from the literature, which is aournd 18,061. Is the K-mean solution of Matlab stuck in local minima? Please advice. Thanks.
  댓글 수: 1
the cyclist
the cyclist 2013년 8월 27일
For anyone who is interested in helping out on this one, the data set is here: http://archive.ics.uci.edu/ml/datasets/Wine

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

답변 (4개)

Shashank Prasanna
Shashank Prasanna 2013년 8월 27일
Ganesh, what distance metric does the 'literature' use?
The kmeans default is 'sqEuclidean'. You have to make sure you are comparing the same metric. Try changing it to cityblock or any of the other options:

Ganesh
Ganesh 2013년 8월 27일
Thanks for the reply Shashank The literature used 'sqEuclidean' and so did I.
  댓글 수: 1
tryhard
tryhard 2013년 8월 29일
Could you post a link to the relevant article. I get the same result you do. It seems like they might have performed pre-processing on the data of some sort.

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


gheorghe gardu
gheorghe gardu 2015년 11월 1일
I would like to ask if you could post the Matlab code that you have used ? I would like to thank you in advance.

Paul Munro
Paul Munro 2023년 2월 21일
The large distance sum you report makes me think that you did not rescale the data. Variable 13 is in the thousands and will overwhelm the effect of the other variables. You will probably get better results if you rescale the variables separately (Z scoring for example).

Community Treasure Hunt

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

Start Hunting!

Translated by