error.quantisation.relationalsom: Quantisation error for a Relational Self-Organising Map

Description Usage Arguments Value Author(s) See Also Examples

Description

Compute the quantisation error made by a fitted Self-Organising Map on dissimilarity data: this is the mean of the dissimilarity between each observation and the prototype of its best matching unit.

Usage

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

Arguments

som

an object of class "somnum"

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 quantisation 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. 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 quantisation 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 quantisation error is to be computed).

Author(s)

Fabrice Rossi

See Also

error.kaskilagus.relationalsom, 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 small hexagonal grid
sg <- somgrid(xdim=7,ydim=7,topo="hex")

# fit the SOM
som <- batchsom(data,sg)

print(error.quantisation(som))

# a larger grid should in general give a lower quantisation error
sg <- somgrid(xdim=12,ydim=12,topo="hex")
som <- batchsom(data,sg)
print(error.quantisation(som))

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