Configure

Configuring the algorithm.

Syntax

Definition:

METHOD Configure : BOOL
VAR_INPUT
    nMaxIterations : UDINT;
    eInitMode : E_ALYKMeansInitMode;
END_VAR

Configure 1: Inputs

Name

Type

Description

nMaxIterations

UDINT

Specifies how often to iterate over the values in the aggregation buffer. The default is 1.

eInitMode

E_ALY_KMeansInitMode

Specifies which method is used to set the initial values for the cluster centers:

Random: The cluster centers are set randomly in the bounds set by Lower Bounds and Upper Bounds. The bounds can be set after configuration with the method SetInitialBounds.

Euqidistant: The cluster centers are distributed equidistantly in the range of values defined by the Lower Bounds and Upper Bounds. The bounds can be set after configuration with the method SetInitialBounds.

Values: The cluster centers are initialized with the values set by initial cluster centers. The cluster centers can be set after configuration using the SetInitialClusterCenters method.

Configure 2: Return value

Name

Type

Description

Configure

BOOL

Returns TRUE if successful.