<< PCAScatterPlot CLUSTER TrainSOM >>

CLUSTER >> CLUSTER > SelectRandomly

SelectRandomly

selects a specified number of vectors from a set randomly.

Calling Sequence

[ListOfSamples] = SelectRandomly(Source, NumberOfSelectedSamples)

Parameters

Source:

matrix that includes vectors that can be selected as row vectors

NumberOfSelectedSamples:

number of vectors to be selected

ListOfSamples:

matrix that includes selected vectors as rows

Description

This function selects a specified number of row vectors from a matrix randomly. Any row can be selected only once.

Examples

global CLUSTER_PATH;
Source = read_csv(CLUSTER_PATH + 'demos\IrisData.csv', ascii(9));
Samples = strtod(Source(:, 1 : 4));
InitialCenters = SelectRandomly(Samples, 5)

See also

Authors

Bibliography

Richard O. Duda, Peter E. Hart, David G. Stork, 'Pattern Classification', John Wiley & Sons Inc., New York, Chichester, Weinheim, Brisbane, Singapore, Toronto, Second Edition, 2001


Report an issue
<< PCAScatterPlot CLUSTER TrainSOM >>