som.nn.visual {som.nn}R Documentation

Mapping function for SOMnn

Description

Maps a sample of unknown category to a self-organising map (SOM) stored in a object of type SOMnn.

Usage

som.nn.visual(codes, data)

Arguments

codes

data.frame with codebook vectors.

data

data.frame with data to be mapped. Columns of x must have the same names as columns of codes.

Details

The function returns the winner neuron in codes for each test vector in x. codes and x are one vector per row and must have the same number of columns (i.e. dimensions) and the identical column names.

som.nn.visual is the work horse for the k-NN-like classifier and normally used from predict.

Value

   \code{data.frame} with 2 columns:
           \itemize{
           \item Index of the winner neuron for each row (index starting at 1).
           \item Distance between winner and row.
           }

[Package som.nn version 1.4.4 Index]