Filter löschen
Filter löschen

k-means clustering, error

3 Ansichten (letzte 30 Tage)
Radoslav Vandzura
Radoslav Vandzura am 3 Dez. 2015
Beantwortet: Ravi Injeti am 14 Dez. 2019
Hello All, I really need your help, your advice. I am trying to do clustering, I have mixed data and big dataset. From all datased I selected only some of them. I do k-means algorithm but error is shown on my command window. Could you advise me, where is bug?
Thank you very very much...

Akzeptierte Antwort

the cyclist
the cyclist am 3 Dez. 2015
What data type are you entering as the first argument to the kmeans command? According to the documentation, it has to be an n-by-p data matrix, but it looks like you have input a dataset instead.
  8 Kommentare
the cyclist
the cyclist am 4 Dez. 2015
I hope you are not offended by this statement, but it seems that you are new to MATLAB and new to clustering techniques, so it is difficult to try to explain both to you at the same time.
Regarding clustering:
Strictly speaking, K-means will not work on categorical data (to my knowledge), because it relies on a numerical distance function. There are related techniques like K-median and K-mode, but I don't know if MATLAB will help you with that.
Regarding getting a matrix from your Excel data:
I recommend that you open a new question about that. Post a small sample of your Excel file, and ask how to get the data into a matrix. Without seeing the data, it is almost impossible to suggest a specific technique.
Radoslav Vandzura
Radoslav Vandzura am 4 Dez. 2015
Yes, you are right, I am newbie. Thank you for your time, help and advices. I really appreciate it. I will try use your recommendation.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Ravi Injeti
Ravi Injeti am 14 Dez. 2019
why dont you try to use
find(zeros(x),2))) instead any(isNan) beause it is a python function

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by