Learn R Programming

som (version 0.3-5.2)

qerror: quantization accuracy

Description

get the average distortion measure

Usage

qerror(obj, err.radius=1)

Value

An average of the following quantity (weighted distance measure) over all x in the sample,

$$\sum ||x - m_i|| h_{ci}$$

where \(h_{ci}\) is the neighbourhood kernel for the ith code.

Arguments

obj

a `som' object

err.radius

radius used calculating qerror

Author

Jun Yan <jyan@stat.uiowa.edu>

Examples

Run this code
foo <- som(matrix(rnorm(1000), 100), 2, 4)
qerror(foo, 3)

Run the code above in your browser using DataLab