Clarified the spec for the distance_function.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%403416
This commit is contained in:
Davis King 2010-01-28 23:20:12 +00:00
parent cebf6bd144
commit 8bc2fa1956
1 changed files with 10 additions and 1 deletions

View File

@ -241,7 +241,16 @@ namespace dlib
WHAT THIS OBJECT REPRESENTS WHAT THIS OBJECT REPRESENTS
This object represents a point in kernel induced feature space. This object represents a point in kernel induced feature space.
You may use this object to find the distance from the point it You may use this object to find the distance from the point it
represents to points in input space. represents to points in input space as well as other points
represented by distance_functions.
Any routine that creates a distance_function should always
automatically populate the this->b field. But for reference,
this->b is supposed to contain the squared norm of the point
in kernel feature space. So this means that if this function
is to compute a proper distance then this->b should always be equal
to the following:
trans(alpha)*kernel_matrix(kernel_function,basis_vectors)*alpha
!*/ !*/
typedef K kernel_type; typedef K kernel_type;