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

PLearn::PTester Class Reference

This code is deprecated, use PTester.h and PTester.cc instead. More...

#include <PExperiment.h>

Inheritance diagram for PLearn::PTester:

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

Collaboration graph
[legend]
List of all members.

Public Types

typedef Object inherited

Public Member Functions

 PTester ()
virtual void build ()
 Should call simply inherited::build(), then this class's build_().

 PLEARN_DECLARE_OBJECT (PTester)
 Declares name and deepCopy methods.

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

string getExperimentDirectory () const
 This returns the currently set expdir (see setExperimentDirectory).

virtual void run ()
 runs the experiment

Vec perform (bool dont_set_training_set=false)
 performs the experiment, and returns the global stats specified in statnames If dont_set_training_set is set to true AND the splitter returns only one split, then we *don't* call setTrainingSet() and a forget() on the learner prior to training it: we assume the training set is already set.

 PTester ()
virtual void build ()
 Should call simply inherited::build(), then this class's build_().

 PLEARN_DECLARE_OBJECT (PTester)
 Declares name and deepCopy methods.

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

string getExperimentDirectory () const
 This returns the currently set expdir (see setExperimentDirectory).

TVec< stringgetStatNames ()
 Return the statnames (potentially modified by statmask, if provided).

virtual void run ()
 runs the tester

Vec perform (bool call_forget=true)
 performs the test, and returns the global stats specified in statnames If call_forget is set to false then the call to setTrainingSet() won't call forget and build.

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


Public Attributes

bool save_initial_experiment
string expdir
 Path of this experiment's directory in which to save all experiment results (will be created if it does not already exist).

PP< PLearnerlearner
PP< Splittersplitter
TVec< stringstatnames
bool report_stats
bool save_stat_collectors
bool save_learners
bool save_initial_learners
bool save_data_sets
bool save_test_outputs
bool save_test_costs
bool provide_learner_expdir
VMat dataset
 Path of this tester's experiment directory in which to save all tester results (will be created if it does not already exist).

TVec< stringfinal_commands
PP< VecStatsCollectorglobal_template_stats_collector
PP< PLearnerlearner
bool save_initial_tester
PP< Splittersplitter
TVec< TVec< string > > statmask
PP< VecStatsCollectortemplate_stats_collector
bool train
TVec< stringstatnames

Static Protected Member Functions

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

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


Protected Attributes

TVec< stringstatnames_processed
 The 'real' statnames: these are obtained from 'statnames' by a processing at build time, taking into account the 'statmask' option.


Private Types

typedef Object inherited

Private Member Functions

void build_ ()
 This does the actual building.

void build_ ()
 This does the actual building.


Detailed Description

This code is deprecated, use PTester.h and PTester.cc instead.

Definition at line 52 of file PExperiment.h.


Member Typedef Documentation

typedef Object PLearn::PTester::inherited [private]
 

Reimplemented from PLearn::Object.

Definition at line 56 of file PTester.h.

typedef Object PLearn::PTester::inherited
 

Reimplemented from PLearn::Object.

Definition at line 56 of file PExperiment.h.


Constructor & Destructor Documentation

PLearn::PTester::PTester  ) 
 

Definition at line 72 of file PExperiment.cc.

PLearn::PTester::PTester  ) 
 


Member Function Documentation

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

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.

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

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 151 of file PExperiment.cc.

References build_().

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

This does the actual building.

Reimplemented from PLearn::Object.

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

This does the actual building.

Reimplemented from PLearn::Object.

Definition at line 138 of file PExperiment.cc.

References PLearn::abspath(), expdir, PLearn::force_mkdir(), PLearn::pathexists(), and PLERROR.

Referenced by build().

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

Declares this class' options.

Reimplemented from PLearn::Object.

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

Declares this class' options.

Reimplemented from PLearn::Object.

Definition at line 92 of file PExperiment.cc.

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

string PLearn::PTester::getExperimentDirectory  )  const [inline]
 

This returns the currently set expdir (see setExperimentDirectory).

Definition at line 133 of file PTester.h.

References expdir.

string PLearn::PTester::getExperimentDirectory  )  const [inline]
 

This returns the currently set expdir (see setExperimentDirectory).

Definition at line 115 of file PExperiment.h.

References expdir.

TVec< string > PLearn::PTester::getStatNames  ) 
 

Return the statnames (potentially modified by statmask, if provided).

Definition at line 438 of file PTester.cc.

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

Transforms a shallow copy into a deep copy.

Definition at line 547 of file PTester.cc.

References dataset, PLearn::deepCopyField(), final_commands, global_template_stats_collector, learner, splitter, statmask, and template_stats_collector.

Vec PLearn::PTester::perform bool  call_forget = true  ) 
 

performs the test, and returns the global stats specified in statnames If call_forget is set to false then the call to setTrainingSet() won't call forget and build.

This is useful for continuation of an incremental training (such as after increasing the number of epochs (nstages) ), or generally when trying different option values that don't require the learning to be restarted from scratch. However call_forget will be forced to true (even if passed as false) if the splitter returns more than one split. Returns a vector of test statistics corresponding to the requested statnames

Vec PLearn::PTester::perform bool  dont_set_training_set = false  ) 
 

performs the experiment, and returns the global stats specified in statnames If dont_set_training_set is set to true AND the splitter returns only one split, then we *don't* call setTrainingSet() and a forget() on the learner prior to training it: we assume the training set is already set.

This is useful for continuation of an incremental training (such as after increasing the number of epochs (nstages) ).

Definition at line 261 of file PExperiment.cc.

References PLearn::append_slash(), PLearn::StatSpec::costindex, dataset, expdir, PLearn::StatSpec::intstat, PLearn::join(), k, learner, PLearn::VMat::length(), PLearn::TVec< string >::length(), PLERROR, provide_learner_expdir, report_stats, PLearn::save(), save_data_sets, save_initial_experiment, save_initial_learners, save_learners, save_stat_collectors, save_test_costs, save_test_outputs, PLearn::saveStringInFile(), PLearn::StatSpec::setnum, PLearn::TVec< T >::size(), slash, splitter, statnames, PLearn::TVec< T >::subVec(), and PLearn::tostring().

Referenced by run().

PLearn::PTester::PLEARN_DECLARE_OBJECT PTester   ) 
 

Declares name and deepCopy methods.

PLearn::PTester::PLEARN_DECLARE_OBJECT PTester   ) 
 

Declares name and deepCopy methods.

virtual void PLearn::PTester::run  )  [virtual]
 

runs the tester

Reimplemented from PLearn::Object.

void PLearn::PTester::run  )  [virtual]
 

runs the experiment

Reimplemented from PLearn::Object.

Definition at line 157 of file PExperiment.cc.

References perform().

void PLearn::PTester::setExperimentDirectory const string the_expdir  ) 
 

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.

void PLearn::PTester::setExperimentDirectory const string the_expdir  ) 
 

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.

Definition at line 249 of file PExperiment.cc.

References PLearn::abspath(), expdir, PLearn::force_mkdir(), and PLERROR.


Member Data Documentation

VMat PLearn::PTester::dataset
 

Path of this tester's experiment directory in which to save all tester results (will be created if it does not already exist).

Definition at line 73 of file PTester.h.

Referenced by makeDeepCopyFromShallowCopy(), and perform().

string PLearn::PTester::expdir
 

Path of this experiment's directory in which to save all experiment results (will be created if it does not already exist).

Definition at line 74 of file PTester.h.

Referenced by build_(), getExperimentDirectory(), perform(), and setExperimentDirectory().

TVec<string> PLearn::PTester::final_commands
 

Definition at line 75 of file PTester.h.

Referenced by makeDeepCopyFromShallowCopy().

PP<VecStatsCollector> PLearn::PTester::global_template_stats_collector
 

Definition at line 76 of file PTester.h.

Referenced by makeDeepCopyFromShallowCopy().

PP<PLearner> PLearn::PTester::learner
 

Definition at line 77 of file PTester.h.

PP<PLearner> PLearn::PTester::learner
 

Definition at line 66 of file PExperiment.h.

Referenced by makeDeepCopyFromShallowCopy(), and perform().

bool PLearn::PTester::provide_learner_expdir
 

Definition at line 78 of file PTester.h.

Referenced by perform().

bool PLearn::PTester::report_stats
 

Definition at line 79 of file PTester.h.

Referenced by perform().

bool PLearn::PTester::save_data_sets
 

Definition at line 80 of file PTester.h.

Referenced by perform().

bool PLearn::PTester::save_initial_experiment
 

Definition at line 55 of file PExperiment.h.

Referenced by perform().

bool PLearn::PTester::save_initial_learners
 

Definition at line 81 of file PTester.h.

Referenced by perform().

bool PLearn::PTester::save_initial_tester
 

Definition at line 82 of file PTester.h.

bool PLearn::PTester::save_learners
 

Definition at line 83 of file PTester.h.

Referenced by perform().

bool PLearn::PTester::save_stat_collectors
 

Definition at line 84 of file PTester.h.

Referenced by perform().

bool PLearn::PTester::save_test_costs
 

Definition at line 85 of file PTester.h.

Referenced by perform().

bool PLearn::PTester::save_test_outputs
 

Definition at line 86 of file PTester.h.

Referenced by perform().

PP<Splitter> PLearn::PTester::splitter
 

Definition at line 87 of file PTester.h.

PP<Splitter> PLearn::PTester::splitter
 

Definition at line 67 of file PExperiment.h.

Referenced by makeDeepCopyFromShallowCopy(), and perform().

TVec<TVec<string> > PLearn::PTester::statmask
 

Definition at line 88 of file PTester.h.

Referenced by makeDeepCopyFromShallowCopy().

TVec<string> PLearn::PTester::statnames
 

Definition at line 95 of file PTester.h.

TVec<string> PLearn::PTester::statnames
 

Definition at line 68 of file PExperiment.h.

Referenced by perform().

TVec<string> PLearn::PTester::statnames_processed [protected]
 

The 'real' statnames: these are obtained from 'statnames' by a processing at build time, taking into account the 'statmask' option.

Definition at line 62 of file PTester.h.

PP<VecStatsCollector> PLearn::PTester::template_stats_collector
 

Definition at line 89 of file PTester.h.

Referenced by makeDeepCopyFromShallowCopy().

bool PLearn::PTester::train
 

Definition at line 90 of file PTester.h.


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