Set up a self-organizing map and train it with data
numero.create(data, radius = NULL, smoothness = NULL, subsample = NULL)
A matrix or a data frame.
Map radius.
Rigidity of the map to adapt to regional differences.
Number of data points used during a single training cycle.
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.
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.
# NOT RUN {
# 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)
# }
Run the code above in your browser using DataLab