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

#include <TestMethod.h>

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

List of all members.

Public Member Functions

 TestMethod ()
virtual string classname () const
virtual OptionListgetOptionList () const
virtual OptionMapgetOptionMap () const
virtual RemoteMethodMapgetRemoteMethodMap () const
virtual TestMethoddeepCopy (CopiesMap &copies) const
virtual void build ()
 Post-constructor.

Static Public Member Functions

static string _classname_ ()
 Train/Tests the given learner against the given dataset And returns a Vec with the computed statistics corresponding to the requested statnames.
static OptionList_getOptionList_ ()
static RemoteMethodMap_getRemoteMethodMap_ ()
static Object_new_instance_for_typemap_ ()
static bool _isa_ (const Object *o)
static void _static_initialize_ ()
static const PPathdeclaringFile ()
static void declareOptions (OptionList &ol)
 Declare options (data fields) for the class.

Public Attributes

PP< Splittersplitter
 a n by 4 matrix of parsed statnames
TVec< string > statnames
 a list of n statistics name of the form ex: "E[E[train.class_error]]"
bool forget_learner
 should we call forget on the learner prior to every train?

Static Public Attributes

static StaticInitializer _static_initializer_

Protected Attributes

TMat< string > requested_stats

Private Types

typedef Object inherited

Private Member Functions

void build_ ()
 Object-specific post-constructor.

Detailed Description

Definition at line 58 of file TestMethod.h.


Member Typedef Documentation

Reimplemented from PLearn::Object.

Definition at line 60 of file TestMethod.h.


Constructor & Destructor Documentation

PLearn::TestMethod::TestMethod ( ) [inline]

Definition at line 76 of file TestMethod.h.

:forget_learner(true) {}

Member Function Documentation

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

Train/Tests the given learner against the given dataset And returns a Vec with the computed statistics corresponding to the requested statnames.

Reimplemented from PLearn::Object.

Definition at line 49 of file TestMethod.cc.

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

Reimplemented from PLearn::Object.

Definition at line 49 of file TestMethod.cc.

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

Reimplemented from PLearn::Object.

Definition at line 49 of file TestMethod.cc.

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

Reimplemented from PLearn::Object.

Definition at line 49 of file TestMethod.cc.

Object * PLearn::TestMethod::_new_instance_for_typemap_ ( ) [static]

Reimplemented from PLearn::Object.

Definition at line 49 of file TestMethod.cc.

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

Reimplemented from PLearn::Object.

Definition at line 49 of file TestMethod.cc.

void PLearn::TestMethod::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 126 of file TestMethod.cc.

References PLearn::Object::build(), and build_().

Here is the call graph for this function:

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

Object-specific post-constructor.

This method should be redefined in subclasses and do the actual building of the object according to previously set option fields. Constructors can just set option fields, and then call build_. This method is NOT virtual, and will typically be called only from three places: a constructor, the public virtual build() method, and possibly the public virtual read method (which calls its parent's read). build_() can assume that its parent's build_() has already been called.

Reimplemented from PLearn::Object.

Definition at line 122 of file TestMethod.cc.

Referenced by build().

{
}

Here is the caller graph for this function:

string PLearn::TestMethod::classname ( ) const [virtual]

Reimplemented from PLearn::Object.

Definition at line 49 of file TestMethod.cc.

void PLearn::TestMethod::declareOptions ( OptionList ol) [static]

Declare options (data fields) for the class.

Redefine this in subclasses: call declareOption(...) for each option, and then call inherited::declareOptions(options). Please call the inherited method AT THE END to get the options listed in a consistent order (from most recently defined to least recently defined).

  static void MyDerivedClass::declareOptions(OptionList& ol)
  {
      declareOption(ol, "inputsize", &MyObject::inputsize_,
                    OptionBase::buildoption,
                    "The size of the input; it must be provided");
      declareOption(ol, "weights", &MyObject::weights,
                    OptionBase::learntoption,
                    "The learned model weights");
      inherited::declareOptions(ol);
  }
Parameters:
olList of options that is progressively being constructed for the current class.

Reimplemented from PLearn::Object.

Definition at line 133 of file TestMethod.cc.

References PLearn::OptionBase::buildoption, PLearn::declareOption(), PLearn::Object::declareOptions(), forget_learner, splitter, and statnames.

{
    declareOption(ol, "splitter", &TestMethod::splitter, OptionBase::buildoption,
                  "Splitter object defining the test method");
    declareOption(ol, "statnames", &TestMethod::statnames, OptionBase::buildoption,
                  "A vector of strings containing train/test statistics definitions of the train/test stats whose values should be returned by the test method.\n"
                  "Ex: E[E[train.class_error]]");
    declareOption(ol, "forget_learner", &TestMethod::forget_learner, OptionBase::buildoption,
                  "Should we call forget on the learner prior to every train?");
    inherited::declareOptions(ol);
}

Here is the call graph for this function:

static const PPath& PLearn::TestMethod::declaringFile ( ) [inline, static]

Reimplemented from PLearn::Object.

Definition at line 82 of file TestMethod.h.

TestMethod * PLearn::TestMethod::deepCopy ( CopiesMap copies) const [virtual]

Reimplemented from PLearn::Object.

Definition at line 49 of file TestMethod.cc.

OptionList & PLearn::TestMethod::getOptionList ( ) const [virtual]

Reimplemented from PLearn::Object.

Definition at line 49 of file TestMethod.cc.

OptionMap & PLearn::TestMethod::getOptionMap ( ) const [virtual]

Reimplemented from PLearn::Object.

Definition at line 49 of file TestMethod.cc.

RemoteMethodMap & PLearn::TestMethod::getRemoteMethodMap ( ) const [virtual]

Reimplemented from PLearn::Object.

Definition at line 49 of file TestMethod.cc.


Member Data Documentation

Reimplemented from PLearn::Object.

Definition at line 82 of file TestMethod.h.

should we call forget on the learner prior to every train?

Definition at line 73 of file TestMethod.h.

Referenced by declareOptions().

Definition at line 66 of file TestMethod.h.

a n by 4 matrix of parsed statnames

Definition at line 71 of file TestMethod.h.

Referenced by declareOptions().

a list of n statistics name of the form ex: "E[E[train.class_error]]"

Definition at line 72 of file TestMethod.h.

Referenced by declareOptions().


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