0

I want to calculate the accuracy of my k-means clustering without normalization and k-means clustering with normalization and want to compare the results.

My dataset looks like this:

age chol
63  233
37  250
41  204
56  236
57  354
57  192
56  294
44  263
52  199
57  168
54  239
48  275
49  266
64  211
58  283
50  219
58  340
66  226
43  247
69  239
59  234
44  233
42  226
61  243
40  199
71  302
59  212
51  175
65  417
53  197
41  198
65  177
44  219
54  273
51  213
46  177
54  304
54  232
65  269
65  360
51  308
48  245
45  208
53  264
39  321
52  325
44  235
47  257
53  216
53  234

How can I write the code for it in Matlab and plot it?

HansHirse
  • 18,010
  • 10
  • 38
  • 67
  • 3
    Could you please share what code have you tried already? – kmario23 Apr 30 '19 at 06:08
  • https://stackoverflow.com/questions/15777201/why-vector-normalization-can-improve-the-accuracy-of-clustering-and-classificati i used this code but not able to get the required output and also don't know how to check the accuracy. – Reetu Singh Apr 30 '19 at 06:22
  • you should add all the details to your question, otherwise we wont be able to help you. So edit your question by adding your code, and the observations you make and what exactly the problem is – Irreducible Apr 30 '19 at 06:43
  • i already added my problem that i don't know how to code and calculate the accuracy. – Reetu Singh Apr 30 '19 at 06:49
  • How can you know if your clustering is accurate or not if you do not have ground truth ? – obchardon Apr 30 '19 at 07:59
  • that's why I want to check the accuracy on the basis of predictions and I want to do the predictions on the basis of the centroid. – Reetu Singh Apr 30 '19 at 08:09
  • "I want to check the accuracy on the basis of predictions" but this is NOT possible ! It is possible with supervised clustering, but not with unsupervised clustering – obchardon Apr 30 '19 at 09:19

0 Answers0