View source: R/numero.quality.R
numero.quality | R Documentation |
Assign new data points to map districts and calculate quality measures
numero.quality(model, data = NULL)
model |
A list object that contains a self-organizing map (and a data layout). |
data |
A matrix or a data frame. |
The input argument model
must be in the the output format
as returned by numero.create()
.
A list with named elements: som
contains the self-organizing map;
layout
contains the district assignments for data points;
planes
contains smoothed district averages of quality measures, see
nroAggregate()
and nroMatch()
; the element
ranges
contains the reference ranges to be used in
nroColorize()
; the element palette
is the name of
the colormap to be used for colorings; and statistics
contains
the output from nroPermute()
.
# Import data.
fname <- system.file("extdata", "finndiane.txt", package = "Numero")
dataset <- read.delim(file = fname)
# Set identities and manage missing data.
dataset <- numero.clean(dataset, identity = "INDEX")
# Prepare training variables.
trvars <- c("CHOL", "HDL2C", "TG", "CREAT", "uALB")
trdata <- numero.prepare(data = dataset, variables = trvars)
# Create a self-organizing map.
modl <- numero.create(data = trdata)
# Analyze map quality.
qc <- numero.quality(model = modl)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.