From 07140ec98d4a7e8fc6fcbfcaeac865bf87136fd6 Mon Sep 17 00:00:00 2001 From: Davis King Date: Tue, 13 May 2008 02:04:28 +0000 Subject: [PATCH] Added missing comments and fixed some existing ones. --HG-- extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402230 --- dlib/svm/krls_abstract.h | 4 ++++ dlib/svm/svm_abstract.h | 12 ++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/dlib/svm/krls_abstract.h b/dlib/svm/krls_abstract.h index 1bbff40b2..2e986dec2 100644 --- a/dlib/svm/krls_abstract.h +++ b/dlib/svm/krls_abstract.h @@ -7,6 +7,7 @@ #include "../matrix/matrix_abstract.h" #include "../algs.h" #include "../serialize.h" +#include "kernel_abstract.h" namespace dlib { @@ -17,6 +18,9 @@ namespace dlib class krls { /*! + REQUIREMENTS ON kernel_type + is a kernel function object as defined in dlib/svm/kernel_abstract.h + INITIAL VALUE - dictionary_size() == 0 diff --git a/dlib/svm/svm_abstract.h b/dlib/svm/svm_abstract.h index d44a7e148..8895416bc 100644 --- a/dlib/svm/svm_abstract.h +++ b/dlib/svm/svm_abstract.h @@ -62,8 +62,8 @@ namespace dlib - y(i) == -1 or +1 - y(i) is the class that should be assigned to training example x(i) - 0 < nu < maximum_nu(y) - - kernel_function == a kernel function object type as defined at the top - of this document. + - kernel_function == a kernel function object type as defined at the + top of dlib/svm/kernel_abstract.h ensures - trains a nu support vector classifier given the training samples in x and labels in y. Training is done when the error is less than eps. @@ -112,8 +112,8 @@ namespace dlib - y(i) == -1 or +1 - y(i) is the class that should be assigned to training example x(i) - 0 < nu < maximum_nu(y) - - kernel_function == a kernel function object type as defined at the top - of this document. + - kernel_function == a kernel function object type as defined at the + top of dlib/svm/kernel_abstract.h ensures - trains a nu support vector classifier given the training samples in x and labels in y. Training is done when the error is less than eps. @@ -158,8 +158,8 @@ namespace dlib - y(i) == -1 or +1 - y(i) is the class that should be assigned to training example x(i) - 0 < nu < maximum_nu(y) - - kernel_function == a kernel function object type as defined at the top - of this document. + - kernel_function == a kernel function object type as defined at the + top of dlib/svm/kernel_abstract.h ensures - performs k-fold cross validation by training a nu-svm using the svm_nu_train() function. Each fold is tested using the learned decision_function and the