K mean clustering [message #94159] |
Wed, 08 February 2017 14:39 |
smnadoum
Messages: 24 Registered: June 2016
|
Junior Member |
|
|
Hi,
I was wondering if I could get some help on k means clustering in a time series analysis from 2000 to 2012.
I have 4 different datasets (green, yellow, blue and brown) that I want to calculate k mean clustering for. My data is organized in a time series from 2000 to 2012. Each dataset is consisted of three sites:
green_1, green_2, green_3.. same thing for the other colors
I want to calculate k means for all of the data and then output and plot the results of each data set in one plot, so that each plot will represent three sites e.g. green_plot: kmeans for green_1, green_2, green_3.
pro km_clustering, green, yellow, brown, brown
n= 13 ;; number of variables is 13 (years)-13 for yellow, 13 for green and 13 for brown
green_1= *filepath ;define the path of all the data
green_2= *filepath ;define the path of all the data
green_3= *filepath ;define the path of all the data
array = [[green_1], [green_2], [green_3]]
weights = CLUST_WTS(array, N_CLUSTERS = 3) ;;compute cluster weights.
result = CLUSTER(array, weights, N_CLUSTERS = 3) ;compute classification
how can add a loop here to run through all of my files (3 yellows, 3 greens, 3 browns, and 3 blues)?
Thank you for your help/time in advance,
|
|
|