Parameters for the k-NN-like classification can be set for an existing model of type SOMnn after training.
som.nn.set(
model,
x,
dist.fun = NULL,
max.dist = NULL,
strict = NULL,
name = NULL
)
S4 object of type \code{\link{SOMnn}} with the updated model.
model of type SOMnn
.
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.
distance function for weighting distances between codebook vectors on the som (kernel for k-NN classifier).
maximum distance to be considered by the nearest-neighbour counting.
strictness for class label assignment. Default = 0.8.
new name of the model.
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.
dist.fun.bubble
, dist.fun.linear
,
dist.fun.inverse
, dist.fun.tricubic
.