clustering of rows in random manner

10 visualizzazioni (ultimi 30 giorni)
jaah navi
jaah navi il 20 Dic 2017
Commentato: jaah navi il 20 Dic 2017
If I have a matrix of 50 rows and 100 columns how clustering of 50 rows can be done in a random manner such that the rows present in that corresponding cluster must have similar values.
  2 Commenti
Jos (10584)
Jos (10584) il 20 Dic 2017
This is all quite vague ... what do you mean by " clustering ", " random manner " " corresponding " (to what?), and " similar values "?
Perhaps you can give a small example of a matrix with, for instance, 6 rows and 2 columns, and the expected output?
jaah navi
jaah navi il 20 Dic 2017
Here comes the example if A=[1 0;0 2;0 3;0 0;0 0;6 0]
i want to have the output as B=[1 3;6 2;1 3;1 3;1 3;6 2]
which indicates row1,3,4,5 are clustered as a result they have similar values whereas row2,6 are clustered as a result they have similar values.

Accedi per commentare.

Risposta accettata

KSSV
KSSV il 20 Dic 2017
Have a look on randsample and randperm.
  1 Commento
jaah navi
jaah navi il 20 Dic 2017
could you please tell me how to use randsample and randperm commands as i am new to matlab and still learning it.

Accedi per commentare.

Più risposte (0)

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by