som.nn.set {som.nn}R Documentation

Set parameters for k-NN-like classifier in som.nn model

Description

Parameters for the k-NN-like classification can be set for an existing model of type SOMnn after training.

Usage

som.nn.set(
  model,
  x,
  dist.fun = NULL,
  max.dist = NULL,
  strict = NULL,
  name = NULL
)

Arguments

model

model of type SOMnn.

x

data.fame with training data. Samples are requested as rows and taken randomly for the training steps. All columns except of the class lables are considered to be attributes and parts of the training vector. x must include the same columns as the data.frame with which the model have been trained originally. One column is needed as class labels. The column with class lables is selected by the slot class.idx of the model.

dist.fun

distance function for weighting distances between codebook vectors on the som (kernel for k-NN classifier).

max.dist

maximum distance to be considered by the nearest-neighbour counting.

strict

strictness for class label assignment. Default = 0.8.

name

new name of the model.

Details

The distance function defines the behaviour of the k-nearest-neighbour algorithm. Choices for the distance function include dist.fun.inverse or dist.fun.tricubic, as defined in this package, or any other function that accepts exactly two arguments x (the distance) and sigma (a parameter defined by max.distance).

A data set must be presented to calculate the accuracy statistics of the modified predictor.

Value

    S4 object of type \code{\link{SOMnn}} with the updated model.

See Also

dist.fun.bubble, dist.fun.linear, dist.fun.inverse, dist.fun.tricubic.


[Package som.nn version 1.4.4 Index]