View source: R/numero.create.R
numero.create | R Documentation |
Set up a self-organizing map and train it with data
numero.create(data, radius = NULL, smoothness = NULL, subsample = NULL)
data |
A matrix or a data frame. |
radius |
Map radius. |
smoothness |
Rigidity of the map to adapt to regional differences. |
subsample |
Number of data points used during a single training cycle. |
The parameter subsample
sets the number of data points that are
randomly picked for each training cycle; if the number is substantially less
than the size of the dataset, the function will finish quicker.
A list with named elements: data
contains the training data,
kmeans
is the output from nroKmeans()
during the
initialiation of the SOM, map
is the finished self-organising map
from nroTrain()
and layout
contains the output from
nroMatch()
for the training data points.
# 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 set.
trvars <- c("CHOL", "HDL2C", "TG", "CREAT", "uALB")
trdata <- numero.prepare(data = dataset, variables = trvars)
# Create a self-organizing map.
modl <- numero.create(data = trdata)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.