Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

PLearn::ClassDistanceProportionCostFunction Class Reference

#include <ClassDistanceProportionCostFunction.h>

Inheritance diagram for PLearn::ClassDistanceProportionCostFunction:

Inheritance graph
[legend]
Collaboration diagram for PLearn::ClassDistanceProportionCostFunction:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ClassDistanceProportionCostFunction ()
 PLEARN_DECLARE_OBJECT (ClassDistanceProportionCostFunction)
virtual real evaluate (const Vec &output, const Vec &target) const
 returns K(x1,x2)


Private Types

typedef Kernel inherited

Detailed Description

This is useful for multiclass problems when the scores represent negative distances to each class, It returns distance_to_right_class/(distance_to_right_class+distance_to_closest_other_classes)

Definition at line 64 of file ClassDistanceProportionCostFunction.h.


Member Typedef Documentation

typedef Kernel PLearn::ClassDistanceProportionCostFunction::inherited [private]
 

Reimplemented from PLearn::Kernel.

Definition at line 66 of file ClassDistanceProportionCostFunction.h.


Constructor & Destructor Documentation

PLearn::ClassDistanceProportionCostFunction::ClassDistanceProportionCostFunction  )  [inline]
 

Definition at line 69 of file ClassDistanceProportionCostFunction.h.


Member Function Documentation

real PLearn::ClassDistanceProportionCostFunction::evaluate const Vec output,
const Vec target
const [virtual]
 

returns K(x1,x2)

Implements PLearn::Kernel.

Definition at line 51 of file ClassDistanceProportionCostFunction.cc.

References PLearn::argmax(), PLearn::TVec< T >::length(), PLearn::max(), PLERROR, and PLearn::Vec.

PLearn::ClassDistanceProportionCostFunction::PLEARN_DECLARE_OBJECT ClassDistanceProportionCostFunction   ) 
 


The documentation for this class was generated from the following files:
Generated on Tue Aug 17 16:23:17 2004 for PLearn by doxygen 1.3.7