initialize-methods: Constructor of SOMnn Class

Description Usage Arguments Details Examples

Description

The constructor creates a new object of type SOMnn.

Usage

1
2
3
4
## S4 method for signature 'SOMnn'
initialize(.Object, name, codes, qerror, class.idx, classes,
  class.counts, class.freqs, confusion, measures, predict, xdim, ydim,
  len.total, toroidal, norm, norm.center, norm.scale, dist.fun, max.dist)

Arguments

.Object

SOMnn object

name

optional name of the model.

codes

data.frame with codebook vectors of the som.

qerror

sum of the mapping errors of the training data.

class.idx

numeric index of column with categories.

classes

character vector with names of categories.

class.counts

data.frame with class hits for each neuron.

class.freqs

data.frame with class frequencies for each neuron (freqs sum up to 1).

confusion

data.frame with confusion matrix for training data.

measures

data.frame with classes as rows and the columns sensitivity, specificity and accuracy for each class.

predict

predict function to be used to predict unknowm samples x. Can be called as object@predict(x).

xdim

number of neurons in x-direction of the som.

ydim

number of neurons in y-direction of the som.

len.total

total number of training steps, performed to create the model.

toroidal

logical; if TRUE, the map is toroidal (i.e. borderless).

norm

logical; if TRUE, data is normalised before training and mapping. Parameters for normalisation of training data is stored in the model and applied before mapping of test data.

norm.center

vector of centers for each column of training data.

norm.scale

vector of scale factors for each column of training data.

dist.fun

function; kernel for the kNN classifier.

max.dist

maximum distance σ for the kNN classifier.

Details

The constructor needs not to be called directly, because the normal way to create a SOMnn object is to use som.nn.train.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## Not run: 
new.som <- new("SOMnn", name = name,
              codes = codes,
              qerror = qerror,
              classes = classes, 
              class.idx = class.idx,
              class.counts = class.counts, 
              class.freqs = class.freqs,
              confusion = confusion, 
              measures = measures,
              predict = som.nn.predict,
              xdim = xdim, 
              ydim = ydim, 
              len.total = len.total, 
              toroidal = toroidal,
              norm = norm, 
              norm.center = norm.center, 
              norm.scale = norm.scale,
              dist.fun = dist.fun, 
              max.dist = max.dist)

## End(Not run)

som.nn documentation built on May 2, 2019, 8:26 a.m.