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

PLearn::TestingLearner Class Reference

#include <TestingLearner.h>

Inheritance diagram for PLearn::TestingLearner:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TestingLearner ()
 Default constructor.

virtual void build ()
 Simply calls inherited::build() then build_().

virtual void makeDeepCopyFromShallowCopy (map< const void *, void * > &copies)
 Transforms a shallow copy into a deep copy.

 PLEARN_DECLARE_OBJECT (TestingLearner)
virtual int outputsize () const
 Returns the size of this learner's output, (which typically may depend on its inputsize(), targetsize() and set options).

virtual void forget ()
 (Re-)initializes the PLearner in its fresh state (that state may depend on the 'seed' option) And sets 'stage' back to 0 (this is the stage of a fresh learner!).

virtual void train ()
 The role of the train method is to bring the learner up to stage==nstages, updating the train_stats collector with training costs measured on-line in the process.

virtual void computeOutput (const Vec &input, Vec &output) const
 Computes the output from the input.

virtual void computeCostsFromOutputs (const Vec &input, const Vec &output, const Vec &target, Vec &costs) const
 Computes the costs from already computed output.

virtual TVec< stringgetTestCostNames () const
 Returns the names of the costs computed by computeCostsFromOutpus (and thus the test method).

virtual TVec< stringgetTrainCostNames () const
 Returns the names of the objective costs that the train method computes and for which it updates the VecStatsCollector train_stats.

virtual void setTrainingSet (VMat training_set, bool call_forget=true)
 Declares the train_set Then calls build() and forget() if necessary Note: You shouldn't have to overload this in subclasses, except in maybe to forward the call to an underlying learner.

void setExperimentDirectory (const string &the_expdir)
 The experiment directory is the directory in which files related to this model are to be saved.


Public Attributes

PP< PTestertester

Static Protected Member Functions

void declareOptions (OptionList &ol)
 Declares this class' options.


Private Types

typedef PLearner inherited

Private Member Functions

void build_ ()
 This does the actual building.


Member Typedef Documentation

typedef PLearner PLearn::TestingLearner::inherited [private]
 

Reimplemented from PLearn::PLearner.

Definition at line 58 of file TestingLearner.h.


Constructor & Destructor Documentation

PLearn::TestingLearner::TestingLearner  ) 
 

Default constructor.

Definition at line 49 of file TestingLearner.cc.


Member Function Documentation

void PLearn::TestingLearner::build  )  [virtual]
 

Simply calls inherited::build() then build_().

Reimplemented from PLearn::PLearner.

Definition at line 80 of file TestingLearner.cc.

References build_().

void PLearn::TestingLearner::build_  )  [private]
 

This does the actual building.

Reimplemented from PLearn::PLearner.

Definition at line 75 of file TestingLearner.cc.

Referenced by build().

void PLearn::TestingLearner::computeCostsFromOutputs const Vec input,
const Vec output,
const Vec target,
Vec costs
const [virtual]
 

Computes the costs from already computed output.

Implements PLearn::PLearner.

Definition at line 132 of file TestingLearner.cc.

void PLearn::TestingLearner::computeOutput const Vec input,
Vec output
const [virtual]
 

Computes the output from the input.

Implements PLearn::PLearner.

Definition at line 124 of file TestingLearner.cc.

References PLearn::Vec.

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

Declares this class' options.

Reimplemented from PLearn::PLearner.

Definition at line 59 of file TestingLearner.cc.

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

void PLearn::TestingLearner::forget  )  [virtual]
 

(Re-)initializes the PLearner in its fresh state (that state may depend on the 'seed' option) And sets 'stage' back to 0 (this is the stage of a fresh learner!).

Implements PLearn::PLearner.

Definition at line 107 of file TestingLearner.cc.

TVec< string > PLearn::TestingLearner::getTestCostNames  )  const [virtual]
 

Returns the names of the costs computed by computeCostsFromOutpus (and thus the test method).

Implements PLearn::PLearner.

Definition at line 139 of file TestingLearner.cc.

TVec< string > PLearn::TestingLearner::getTrainCostNames  )  const [virtual]
 

Returns the names of the objective costs that the train method computes and for which it updates the VecStatsCollector train_stats.

Implements PLearn::PLearner.

Definition at line 146 of file TestingLearner.cc.

References tester.

void PLearn::TestingLearner::makeDeepCopyFromShallowCopy map< const void *, void * > &  copies  )  [virtual]
 

Transforms a shallow copy into a deep copy.

Definition at line 87 of file TestingLearner.cc.

References PLERROR.

int PLearn::TestingLearner::outputsize  )  const [virtual]
 

Returns the size of this learner's output, (which typically may depend on its inputsize(), targetsize() and set options).

Implements PLearn::PLearner.

Definition at line 102 of file TestingLearner.cc.

References tester.

PLearn::TestingLearner::PLEARN_DECLARE_OBJECT TestingLearner   ) 
 

void PLearn::TestingLearner::setExperimentDirectory const string the_expdir  )  [virtual]
 

The experiment directory is the directory in which files related to this model are to be saved.

If it is an empty string, it is understood to mean that the user doesn't want any file created by this learner.

Reimplemented from PLearn::PLearner.

Definition at line 158 of file TestingLearner.cc.

References tester.

void PLearn::TestingLearner::setTrainingSet VMat  training_set,
bool  call_forget = true
[virtual]
 

Declares the train_set Then calls build() and forget() if necessary Note: You shouldn't have to overload this in subclasses, except in maybe to forward the call to an underlying learner.

Reimplemented from PLearn::PLearner.

Definition at line 151 of file TestingLearner.cc.

References tester.

void PLearn::TestingLearner::train  )  [virtual]
 

The role of the train method is to bring the learner up to stage==nstages, updating the train_stats collector with training costs measured on-line in the process.

Implements PLearn::PLearner.

Definition at line 112 of file TestingLearner.cc.

References PLWARNING, and tester.


Member Data Documentation

PP<PTester> PLearn::TestingLearner::tester
 

Definition at line 72 of file TestingLearner.h.

Referenced by getTrainCostNames(), outputsize(), setExperimentDirectory(), setTrainingSet(), and train().


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