Effacer les filtres
Effacer les filtres

Could anyone help me how to find the seed of the centroid in a random manner.

1 vue (au cours des 30 derniers jours)
jaah navi
jaah navi le 18 Fév 2019
The following code executes and gives the result.
code:
clear all
clc
centroids=2
dimensions = 2;
iterations = 10;
dataset_subset = 2;
load test1.mat
meas = meas(:,1+dataset_subset:dimensions+dataset_subset);
dataset_size = size (meas);
[idx,KMEANS_CENTROIDS] = kmeans(meas,centroids);
With respect to the above code the centroids is fixed to 2.
Could anyone help me to modify the code in such a way that the number of centroids needs to be selected in a random manner.

Réponses (0)

Catégories

En savoir plus sur Random Number Generation dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by