The Complete SPRLIB & ANNLIB

add_classerror

- add a pattern to the error estimation routines using Fisher's linear discriminant

SYNOPSIS

int add_classerror (pattern, classA, class, W, b, n)

ARGUMENTS

double *pattern The pattern to added for error calculation, a vector of size [1..n].
int classA The integer representation of class A.
int class The class of the pattern.
double *W The linear parameter for the classification function, a vector of size [1..n].
double b The constant term in the classification function.
int n The size of a pattern.

RETURNS

The functions returns TRUE if an error was detected, and FALSE otherwise.

FUNCTION

This function adds a pattern to the error estimation routines using the local variables, see ESTERROR-variables. The add_classerror function classifies a pattern pattern according to the linear classifier, described by F(pattern) = W * pattern + b. Therefore the function receives a linear term W and a constant b. The variables classA and class determine whether a pattern is correctly classified when put into the classifier. If classA equals class than it is assumed that the classifier, should return a positive number. However if classA is unequal to class, the classifier should return a negative number. The errors made are stored in local variables and can be determined by calling calc_classerror.

NOTE

The variable pattern is in vector format and W in matrix format.

SEE ALSO

calc_classerror, addq_classerror, calcq_classerror, ESTERROR-variables

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