The Complete SPRLIB & ANNLIB

KNNELM

- local structure for the k-nearest neighbour classifier

SYNOPSIS

typedef struct knnelm

{

int flag Always 0

int class The classlabel of a pattern.

double dist The distance of the sample to another sample.

double *pattern The value of a pattern, a vector of size [1..n].

} KNNELM;

DESCRIPTION

This structure is used locally to store the necessary data for nearest neighbour calculation. During the usage of nearest neighbour routines an array of instantiated structures is created (by calling knn_init). Each of these structures contains a pattern and its properties. The list is filled as the patterns appear in the dataset, if they are enabled (i.e. the SAMPLE structure's SampleFlag is set to SAMPLE_ENABLED, see SAMPLE-flags).

NOTE

The variable pattern is in vector format.

SEE ALSO

knn_init, knn_free

This document was generated using api2html on Thu Mar 5 09:00:00 MET DST 1998