error.kaskilagus.relationalsom: Kaski and Lagus' error measure for Relational Self-Organising...

Description Usage Arguments Value Author(s) References See Also Examples

Description

Compute an error measure of a fitted Self-Organising Maps defined by S. Kaski and K. Lagus. The relational formula is used both to compute the quantisation error and dissimilarities between prototypes.

Usage

1
2
## S3 method for class 'relationalsom'
error.kaskilagus(som, newdata, ...)

Arguments

som

an object of class "relationalsom"

newdata

an optional object of class "crossdist" compatible with the fitted som (see details)

...

not used

Value

If newdata is not given, the function returns the error made by the fitted som on the data used to fit it. The dissimilarity between a data point and the prototype of its best matching unit is computed via the relationa formula. It is also used to compute dissimilarities between prototypes. Negative values that might occur in this formula are replaced by zero values (a warning is generated during this process).

When newdata is specified, the function returns the error of the fitted som on the corresponding data. The object must be of class "crossdist" as returned by dist and must contain the dissimilarities between the original data (used to fit the SOM) and the new data (for which the error is to be computed).

Author(s)

Fabrice Rossi

References

Kaski, S. and Lagus, K. (1996) Comparing self-organizing maps, in: C. von der Malsburg, W. von Seelen, J. Vorbrüggen, B. Sendhoff (eds.), Proceedings of International Conference on Artificial Neural Networks (ICANN'96, Bochum, Germany), vol. 1112 of Lecture Notes in Computer Science, Springer, pp. 809–814.

See Also

error.quantisation, som.tunecontrol

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
data(iris)
# scaling and dissimilarity computation
data <- dist(scale(iris[1:4]))

# a medium hexagonal grid
sg <- somgrid(xdim=11,ydim=11,topo="hex")

# random initialisation (leads generally to medium quality results)
som <- batchsom(data,sg,init="random")
print(paste("Quantisation error:",error.quantisation(som)))
print(paste("Kaski and Lagus' error:",error.kaskilagus(som)))

# pca initialisation (leads generally to better results that random initialisation)
som <- batchsom(data,sg,init="pca")
print(paste("Quantisation error:",error.quantisation(som)))
print(paste("Kaski and Lagus' error:",error.kaskilagus(som)))

yasomi documentation built on May 2, 2019, 5:59 p.m.