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

PLearn::LiftBinaryCostFunction Class Reference

#include <LiftBinaryCostFunction.h>

Inheritance diagram for PLearn::LiftBinaryCostFunction:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LiftBinaryCostFunction (bool make_pos_output=false)
 PLEARN_DECLARE_OBJECT (LiftBinaryCostFunction)
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)
 redefine this in subclasses: call declareOption(...) for each option, and then call inherited::declareOptions(options) ( see the declareOption function further down)


Protected Attributes

bool make_positive_output

Private Types

typedef Kernel inherited

Detailed Description

This class allows us to compute the lift (used by Bell Canada) of a binary classification problem. Since we need the output AND the target to be represented by a single cost (the method evaluate returns only a real), we will use a trick. cost = output[class#1], if target = 1 = -output[class#1], if target = 0 or, if the make_positive_output flag is true: cost = sigmoid(output[class#1]), if target = 1 = -sigmoid(output[class#1]), if target = 0

Definition at line 63 of file LiftBinaryCostFunction.h.


Member Typedef Documentation

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

Reimplemented from PLearn::Kernel.

Definition at line 65 of file LiftBinaryCostFunction.h.


Constructor & Destructor Documentation

PLearn::LiftBinaryCostFunction::LiftBinaryCostFunction bool  make_pos_output = false  )  [inline]
 

Definition at line 71 of file LiftBinaryCostFunction.h.

References make_positive_output.


Member Function Documentation

void PLearn::LiftBinaryCostFunction::declareOptions OptionList ol  )  [static, protected]
 

redefine this in subclasses: call declareOption(...) for each option, and then call inherited::declareOptions(options) ( see the declareOption function further down)

ex: static void declareOptions(OptionList& ol) { declareOption(ol, "inputsize", &MyObject::inputsize_, OptionBase::buildoption, "the size of the input\n it must be provided"); declareOption(ol, "weights", &MyObject::weights, OptionBase::learntoption, "the learnt model weights"); inherited::declareOptions(ol); }

Reimplemented from PLearn::Kernel.

Definition at line 76 of file LiftBinaryCostFunction.cc.

References PLearn::declareOption(), and PLearn::OptionList.

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

returns K(x1,x2)

Implements PLearn::Kernel.

Definition at line 51 of file LiftBinaryCostFunction.cc.

References PLearn::TVec< T >::length(), make_positive_output, PLERROR, PLearn::sigmoid(), and PLearn::Vec.

virtual string PLearn::LiftBinaryCostFunction::info  )  const [inline, virtual]
 

returns a bit more informative string about object (default returns classname())

Reimplemented from PLearn::Object.

Definition at line 76 of file LiftBinaryCostFunction.h.

PLearn::LiftBinaryCostFunction::PLEARN_DECLARE_OBJECT LiftBinaryCostFunction   ) 
 


Member Data Documentation

bool PLearn::LiftBinaryCostFunction::make_positive_output [protected]
 

Definition at line 68 of file LiftBinaryCostFunction.h.

Referenced by evaluate(), and LiftBinaryCostFunction().


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