I don't know how to set forty centers as in discribed as below, so i nee d help with it please!
1 view (last 30 days)
Show older comments
Fereshteh....
on 10 Feb 2014
Commented: Walter Roberson
on 11 Feb 2014
1 partitions 20000 input points into 40 clusters. The dimensions of the data being tested are 24, 32, and 40, respectively. In Experiment 1, input points were generated as follows: *for each of the mentioned dimension, set the forty centers as {(⎯1, –1, …, –1), (–0.95, –0.95, …, –0.95), (–0.9, ⎯0.9, …, –0.9), (–0.85, –0.85, …, –0.85), (0.9, 0.9, …, 0.9), (0.95, 0.95, …, 0.95)}.* Then, use Gaussian distribution with mean μ = 0 and standard deviation σ = 0.05 to generate 500 points around each center. The 40 initial centers to run Stage I of the Kmeans are chosen randomly from data points.
0 Comments
Accepted Answer
Walter Roberson
on 10 Feb 2014
Supposing you have a num_samples by num_measurements array of coordinates, then
trial_centers = repmat((-1:.05:0.95).', 1, num_measurements);
You can now proceed to generate 500 points around each center. That will get you 500 * 40 = 20,000 multi-dimensional points.
Now out of those 20,000 multi-dimensional points, select 40 of them at random and use those 40 as the initial centers for kmeans.
2 Comments
More Answers (0)
See Also
Categories
Find more on Statistics and Machine Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!