From 8bc2fa1956d62d52fe72445f188fdc60a69c987e Mon Sep 17 00:00:00 2001 From: Davis King Date: Thu, 28 Jan 2010 23:20:12 +0000 Subject: [PATCH] Clarified the spec for the distance_function. --HG-- extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%403416 --- dlib/svm/function_abstract.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/dlib/svm/function_abstract.h b/dlib/svm/function_abstract.h index fc2ceeff2..5401bf180 100644 --- a/dlib/svm/function_abstract.h +++ b/dlib/svm/function_abstract.h @@ -241,7 +241,16 @@ namespace dlib WHAT THIS OBJECT REPRESENTS This object represents a point in kernel induced feature space. 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;