MATLAB Answers

K means image clustering with time series data

9 views (last 30 days)
Atreyee Mondal
Atreyee Mondal on 1 Jul 2020
Commented: Atreyee Mondal on 1 Jul 2020
Hi all,
I am trying to do a clustering in time series using K means. But K means is not supporting high 1D data points. Is there any way I can do the clustering of 10 time series data into 3 different groups using K means?
Thanks in advanced.

  0 Comments

Sign in to comment.

Accepted Answer

KSSV
KSSV on 1 Jul 2020
Let x be your 1D data. Assuming it column vector.
t = 1:length(x);
t = t';
idx = kmeans([t x],3);

  5 Comments

Show 2 older comments
Atreyee Mondal
Atreyee Mondal on 1 Jul 2020
I have 10 time series like the following:-
series 1:
86.85712 85.96279 86.07545 85.20812 84.21688 83.36621 82.531 81.54401 80.72711 79.74288 78.94535 77.96427 77.18724 76.20977 75.2329 74.25664 73.50844 72.53654 71.56542 70.59511 69.62564 68.65704 67.68936 66.72263 65.75689
series 2:
82.13137 81.24191 80.36749 79.50861 78.51849 77.67779 76.6901 75.86869 74.88385 73.89942 73.10137 72.12034 71.13984 70.36734 69.39089 68.41512 67.44007 66.46575 65.49221 64.51947
...
series 10:
187.4414 186.3598 186.2797 186.2049 185.1377 185.0733 185.0143 184.9606 183.9134 183.8703 183.8326 182.8008 181.7741 180.7527 179.7529 178.7367 177.7368 176.7369 175.726 174.7261 173.7208 172.7208 171.7212 170.7275 169.7397
I want to cluster these series 1 to series 10 in 3 subgruops.
Like in subgroup 1 output should came as :{series 1, series 3, series 4}
in subgroup 2 :{series 2, series 7, series 9};
in subgroup 3 :{series 5,series 6, series 8, series 10}
Series 1 to 10 will be the input. how to take this is my question.(Using K means)
Thanks in advanced
KSSV
KSSV on 1 Jul 2020
Try converting your series into 10*n matrix.....and use kmeans.

Sign in to comment.

More Answers (0)