Learn R Programming

nnlib2Rcpp (version 0.2.9)

LVQu: Unsupervised LVQ

Description

Unsupervised (clustering) Learning Vector Quantization (LVQ) NN.

Usage

LVQu(
  data,
  max_number_of_desired_clusters,
  number_of_training_epochs,
  neighborhood_size,
  show_nn )

Value

Returns a vector of integers containing a cluster id for each data case (row).

Arguments

data

data to be clustered, a numeric matrix, (2d, cases in rows, variables in columns). By default, initial weights are set to random values in [0 1], so data should also be in 0 to 1 range.

max_number_of_desired_clusters

clusters to be produced (at most)

number_of_training_epochs

number of training epochs, aka presentations of all training data to ANN during training.

neighborhood_size

integer >=1, specifies affected neighbor output nodes during training. if 1 (Single Winner) the ANN is somewhat similar to k-means.

show_nn

boolean, option to display the (trained) ANN internal structure.

Author

Vasilis N. Nikolaidis <vnnikolaidis@gmail.com>

References

Kohonen, T (1988). Self-Organization and Associative Memory, Springer-Verlag.; Simpson, P. K. (1991). Artificial neural systems: Foundations, paradigms, applications, and implementations. New York: Pergamon Press.

Philippidis, TP & Nikolaidis, VN & Kolaxis, JG. (1999). Unsupervised pattern recognition techniques for the prediction of composite failure. Journal of acoustic emission. 17. 69-81.

See Also

LVQs (supervised LVQ module),

Examples

Run this code
# LVQ expects data in 0 to 1 range, so scale...
iris_s<-as.matrix(iris[1:4])
c_min<-apply(iris_s,2,FUN = "min")
c_max<-apply(iris_s,2,FUN = "max")
c_rng<-c_max-c_min
iris_s<-sweep(iris_s,2,FUN="-",c_min)
iris_s<-sweep(iris_s,2,FUN="/",c_rng)

cluster_ids<-LVQu(iris_s,5,100)
plot(iris_s, pch=cluster_ids, main="LVQ-clustered Iris data")

Run the code above in your browser using DataLab