PLearn 0.1
Public Member Functions | Static Public Member Functions | Static Public Attributes | Static Protected Member Functions | Private Types | Private Member Functions
PLearn::PerformanceEvaluator Class Reference

Evaluates the performance of a learner given a testset VMat and the learner's corresponding output VMat. More...

#include <PerformanceEvaluator.h>

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

List of all members.

Public Member Functions

 PerformanceEvaluator ()
 ### declare public option fields (such as build options) here Start your comments with Doxygen-compatible comments such as //!
virtual TVec< string > getCostNames () const =0
 Returns the name of the costs whose values are returned by the evaluatePerformance method.
virtual Vec evaluatePerformance (PP< PLearner > learner, VMat testset, VMat learner_output, PPath resultsdir) const =0
 Evaluates performance from the given testset and corresponding learner_output Performance curves and similar results may be saved in the resultsdir The call should return a Vec of costs (their names are given by getCostNames()) The resultsdir should be created if it does not already exist and is needed.
virtual PerformanceEvaluatordeepCopy (CopiesMap &copies) const
virtual void build ()
 Post-constructor.
virtual void makeDeepCopyFromShallowCopy (CopiesMap &copies)
 Transforms a shallow copy into a deep copy.

Static Public Member Functions

static string _classname_ ()
static OptionList_getOptionList_ ()
static RemoteMethodMap_getRemoteMethodMap_ ()
static bool _isa_ (const Object *o)
static void _static_initialize_ ()
static const PPathdeclaringFile ()

Static Public Attributes

static StaticInitializer _static_initializer_

Static Protected Member Functions

static void declareOptions (OptionList &ol)
 Declares the class options.

Private Types

typedef Object inherited

Private Member Functions

void build_ ()
 This does the actual building.

Detailed Description

Evaluates the performance of a learner given a testset VMat and the learner's corresponding output VMat.

Subclasses of this class are mainly designed to be plugged in a PTester, and allow to carry 'performance evaluations' that aren't just simple statistics of the test-costs computed by the learner. Indeed a PerformanceEvaluator has at its disposal the whole testset, and the whole corresponding learner output, and will also be passed a results directory in which it can create files such as performance curves... Since it also receives a pointer to the trained PLearner, a specialized PerformanceEvaluator may even inspect learner-specific options and call learner-specific methods

Definition at line 62 of file PerformanceEvaluator.h.


Member Typedef Documentation

Reimplemented from PLearn::Object.

Definition at line 64 of file PerformanceEvaluator.h.


Constructor & Destructor Documentation

PLearn::PerformanceEvaluator::PerformanceEvaluator ( )

### declare public option fields (such as build options) here Start your comments with Doxygen-compatible comments such as //!

Default constructor

Definition at line 58 of file PerformanceEvaluator.cc.

{}

Member Function Documentation

string PLearn::PerformanceEvaluator::_classname_ ( ) [static]

Reimplemented from PLearn::Object.

Definition at line 56 of file PerformanceEvaluator.cc.

OptionList & PLearn::PerformanceEvaluator::_getOptionList_ ( ) [static]

Reimplemented from PLearn::Object.

Definition at line 56 of file PerformanceEvaluator.cc.

RemoteMethodMap & PLearn::PerformanceEvaluator::_getRemoteMethodMap_ ( ) [static]

Reimplemented from PLearn::Object.

Definition at line 56 of file PerformanceEvaluator.cc.

bool PLearn::PerformanceEvaluator::_isa_ ( const Object o) [static]

Reimplemented from PLearn::Object.

Definition at line 56 of file PerformanceEvaluator.cc.

StaticInitializer PerformanceEvaluator::_static_initializer_ & PLearn::PerformanceEvaluator::_static_initialize_ ( ) [static]

Reimplemented from PLearn::Object.

Definition at line 56 of file PerformanceEvaluator.cc.

void PLearn::PerformanceEvaluator::build ( ) [virtual]

Post-constructor.

The normal implementation should call simply inherited::build(), then this class's build_(). This method should be callable again at later times, after modifying some option fields to change the "architecture" of the object.

Reimplemented from PLearn::Object.

Definition at line 61 of file PerformanceEvaluator.cc.

void PLearn::PerformanceEvaluator::build_ ( ) [private]

This does the actual building.

Reimplemented from PLearn::Object.

Definition at line 92 of file PerformanceEvaluator.cc.

{}
void PLearn::PerformanceEvaluator::declareOptions ( OptionList ol) [static, protected]

Declares the class options.

Reimplemented from PLearn::Object.

Definition at line 72 of file PerformanceEvaluator.cc.

{
    // ### Declare all of this object's options here.
    // ### For the "flags" of each option, you should typically specify
    // ### one of OptionBase::buildoption, OptionBase::learntoption or
    // ### OptionBase::tuningoption. If you don't provide one of these three,
    // ### this option will be ignored when loading values from a script.
    // ### You can also combine flags, for example with OptionBase::nosave:
    // ### (OptionBase::buildoption | OptionBase::nosave)

    // ### ex:
    // declareOption(ol, "myoption", &PerformanceEvaluator::myoption,
    //               OptionBase::buildoption,
    //               "Help text describing this option");
    // ...

    // Now call the parent class' declareOptions
    inherited::declareOptions(ol);
}
static const PPath& PLearn::PerformanceEvaluator::declaringFile ( ) [inline, static]

Reimplemented from PLearn::Object.

Definition at line 92 of file PerformanceEvaluator.h.

:
    //#####  Protected Options  ###############################################
PerformanceEvaluator * PLearn::PerformanceEvaluator::deepCopy ( CopiesMap copies) const [virtual]

Reimplemented from PLearn::Object.

Definition at line 56 of file PerformanceEvaluator.cc.

virtual Vec PLearn::PerformanceEvaluator::evaluatePerformance ( PP< PLearner learner,
VMat  testset,
VMat  learner_output,
PPath  resultsdir 
) const [pure virtual]

Evaluates performance from the given testset and corresponding learner_output Performance curves and similar results may be saved in the resultsdir The call should return a Vec of costs (their names are given by getCostNames()) The resultsdir should be created if it does not already exist and is needed.

virtual TVec<string> PLearn::PerformanceEvaluator::getCostNames ( ) const [pure virtual]

Returns the name of the costs whose values are returned by the evaluatePerformance method.

void PLearn::PerformanceEvaluator::makeDeepCopyFromShallowCopy ( CopiesMap copies) [virtual]

Transforms a shallow copy into a deep copy.

Reimplemented from PLearn::Object.

Definition at line 67 of file PerformanceEvaluator.cc.


Member Data Documentation

Reimplemented from PLearn::Object.

Definition at line 92 of file PerformanceEvaluator.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines