Azzera filtri
Azzera filtri

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

1 visualizzazione (ultimi 30 giorni)
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.

Risposte (0)

Categorie

Scopri di più su Random Number Generation in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by