error.kaskilagus.kernelsom: Kaski and Lagus' error measure for Kernel Self-Organising...

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

Description

Compute an error measure of a fitted Kernel Self-Organising Maps defined by S. Kaski and K. Lagus. All the calculation are performed in the kernel induced feature space.

Usage

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

Arguments

som

an object of class "kernelsom"

newdata

an optional matrix compatible with the fitted som (see details)

newdatanorms

an optional vector containing the squared norm in kernel space of the new data (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.

When newdata is specified, the function returns the error of the fitted som on the corresponding data. The newdata matrix must contain the values of the kernel used to fit the SOM evaluated between the original data and the new data. More precisely, newdata[i,j] contains the value of K(x_i,nx_j), where x_i is the i-th original data point and nx_j is the j-th new data point. In addition, when newdata is specified, then the function needs the value of the squared norm in kernel space of the new data, that is a vector newdatanorms such that newdatanorms[j] contains K(nx_j,nx_j).

The distance between a data point and the prototype of its best matching unit is computed in the kernel space. If the kernel used to fit the SOM is not postive, negative values that might occur during the distance computation are replaced by zero values (a warning is generated during this process).

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 kernel computation
data <- as.kernelmatrix(tcrossprod(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.