#include <ClassErrorCostFunction.h>
Inheritance diagram for PLearn::ClassErrorCostFunction:
Public Member Functions | |
ClassErrorCostFunction (bool the_output_is_classnum=false) | |
PLEARN_DECLARE_OBJECT (ClassErrorCostFunction) | |
virtual string | info () const |
returns a bit more informative string about object (default returns classname()) | |
virtual real | evaluate (const Vec &output, const Vec &target) const |
returns K(x1,x2) | |
Static Protected Member Functions | |
void | declareOptions (OptionList &ol) |
recognized option is "output_is_classnum" | |
Protected Attributes | |
bool | output_is_classnum |
Private Types | |
typedef Kernel | inherited |
Definition at line 64 of file ClassErrorCostFunction.h.
|
Reimplemented from PLearn::Kernel. Definition at line 66 of file ClassErrorCostFunction.h. |
|
There are several cases: 1) target is a single value +1 or -1 , and output is a single value whose sign stands for the class 2) target is a single value in 0..n-1 indicating classnumber and output is a n-dimensional vector of scores 3) target is a n-dimensional vector whose argmax indicates the class, and output is a n-dimensional vector of scores 4) target is a single value indicating classnumber, and output is a single value indicating classnumber 5) target is a single value 0 or 1 , and output is a single value with the threshold 0.5 Cases 1,2,3 are handled correctly with the default output_is_classnum=false For case 4 and 5, you must specify output_is_classnum=true Definition at line 81 of file ClassErrorCostFunction.h. References output_is_classnum. |
|
recognized option is "output_is_classnum"
Reimplemented from PLearn::Kernel. Definition at line 85 of file ClassErrorCostFunction.cc. References PLearn::declareOption(), and PLearn::OptionList. |
|
returns K(x1,x2)
Implements PLearn::Kernel. Definition at line 53 of file ClassErrorCostFunction.cc. References PLearn::argmax(), PLearn::is_integer(), PLearn::TVec< T >::length(), output_is_classnum, and PLearn::Vec. |
|
returns a bit more informative string about object (default returns classname())
Reimplemented from PLearn::Object. Definition at line 86 of file ClassErrorCostFunction.h. |
|
|
|
Definition at line 69 of file ClassErrorCostFunction.h. Referenced by ClassErrorCostFunction(), and evaluate(). |