R: Classes "flexclustControl" and "cclustControl"

flexclustControl-class {flexclust} | R Documentation

## Classes "flexclustControl" and "cclustControl"

### Description

Hyperparameters for cluster algorithms.

### Objects from the Class

Objects can be created by calls of the form `new("flexclustControl", ...)`. In addition, named lists can be coerced to `flexclustControl` objects, names are completed if unique (see examples).

### Slots

Objects of class `flexclustControl` have the following slots:

`iter.max`:

  Maximum number of iterations.

`tolerance`:

  The algorithm is stopped when the (relative) change of the optimization criterion is smaller than `tolerance`.

`verbose`:

  If a positive integer, then progress is reported every `verbose` iterations. If 0, no output is generated during model fitting.

`classify`:

  Character string, one of `"auto"`, `"weighted"`, `"hard"` or `"simann"`.

`initcent`:

  Character string, name of function for initial centroids, currently `"randomcent"` (the default) and `"kmeanspp"` are available.

`gamma`:

  Gamma value for weighted hard competitive learning.

`simann`:

  Parameters for simulated annealing optimization (only used when `classify="simann"`).

`ntry`:

  Number of trials per iteration for QT clustering.

`min.size`:

  Clusters smaller than this value are treated as outliers.

Objects of class `cclustControl` inherit from `flexclustControl` and have the following additional slots:

`method`:

  Learning rate for hard competitive learning, one of `"polynomial"` or `"exponential"`.

`pol.rate`:

  Positive number for polynomial learning rate of form 1/iter^par.

`exp.rate`

  Vector of length 2 with parameters for exponential learning rate of form par1*(par2/par1)^(iter/iter.max)

.

`ng.rate`:

  Vector of length 4 with parameters for neural gas, see details below.

### Learning Rate of Neural Gas

The neural gas algorithm uses updates of form

cnew = cold + e*exp(-m/l)*(x - cold)

for every centroid, where m is the order (minus 1) of the centroid with respect to distance to data point x (0=closest, 1=second, ...). The parameters e and l are given by

e = par1*(par2/par1)^(iter/iter.max),

l = par3*(par4/par3)^(iter/iter.max).

See Martinetz et al (1993) for details of the algorithm, and the examples section on how to obtain default values.

### Author(s)

Friedrich Leisch

### References

Martinetz T., Berkovich S., and Schulten K. (1993). "Neural-Gas Network for Vector Quantization and its Application to Time-Series Prediction." IEEE Transactions on Neural Networks, 4 (4), pp. 558–569.

Arthur D. and Vassilvitskii S. (2007). "k-means++: the advantages of careful seeding". Proceedings of the 18th annual ACM-SIAM symposium on Discrete algorithms. pp. 1027-1035.

### See Also

`kcca`, `cclust`

### Examples

    ## have a look at the defaults
    new("flexclustControl")

    ## corce a list
    mycont = list(iter=500, tol=0.001, class="w")
    as(mycont, "flexclustControl")

    ## some additional slots
    as(mycont, "cclustControl")

    ## default values for ng.rate
    new("cclustControl")@ng.rate

[Package flexclust version 1.3-4 Index]