The Complete SPRLIB & ANNLIB

addq_classerror

- add a pattern to the error estimation routines using a quadratic discriminant

SYNOPSIS

int addq_classerror (pattern, classA, class, W2, W1, 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 **W2 The quadratic parameter for the classification function, a matrix of size [1..n][1..n].
double *W1 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 ESTQERROR-variables.The function addq_classerror classifies a pattern pattern according to the quadratic classifier, described by F(pattern) = pattern^T * W2 * pattern + W1 * pattern + b. Therefore the function receives a quadratic, a linear and a constant term. 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 calcq_classerror.

NOTE

The variables pattern and W1 are in vector format, whereas W2 is in matrix format.

SEE ALSO

calcq_classerror, calc_classerror, add_classerror, ESTQERROR-variables

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