Learn R Programming

Numero (version 1.9.10)

numero.create: Create a self-organizing map

Description

Set up a self-organizing map and train it with data

Usage

numero.create(data, radius = NULL, smoothness = NULL,
              subsample = NULL, balance = 0)

Value

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.

Arguments

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.

balance

Penalty parameter for variation in the numbers of resident samples across disctricts, see nroKmeans().

Details

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.

Examples

Run this code
# 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