som.nn.set | R Documentation |
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
)
model |
model of type |
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.
|
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. |
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.
S4 object of type \code{\link{SOMnn}} with the updated model.
dist.fun.bubble
, dist.fun.linear
,
dist.fun.inverse
, dist.fun.tricubic
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.