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

PLearn::NearestNeighborPredictionCost Class Reference

#include <NearestNeighborPredictionCost.h>

Inheritance diagram for PLearn::NearestNeighborPredictionCost:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 NearestNeighborPredictionCost ()
 Default constructor.

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

void run ()
 Overload this for runnable objects (default method issues a runtime error) Runnable objects are objects that can be used as *THE* object of a .plearn script.

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


Public Attributes

int knn
VMat test_set
string learner_spec
Vec cost
VMat computed_outputs

Static Protected Member Functions

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


Protected Attributes

PP< PLearnerlearner

Private Types

typedef Object inherited

Private Member Functions

void build_ ()
 This does the actual building.


Member Typedef Documentation

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

Reimplemented from PLearn::Object.

Definition at line 59 of file NearestNeighborPredictionCost.h.


Constructor & Destructor Documentation

PLearn::NearestNeighborPredictionCost::NearestNeighborPredictionCost  ) 
 

Default constructor.

Definition at line 56 of file NearestNeighborPredictionCost.cc.


Member Function Documentation

void PLearn::NearestNeighborPredictionCost::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 145 of file NearestNeighborPredictionCost.cc.

References build_().

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

This does the actual building.

Reimplemented from PLearn::Object.

Definition at line 91 of file NearestNeighborPredictionCost.cc.

References computed_outputs, cost, knn, learner, learner_spec, PLearn::VMat::length(), PLearn::load(), PLearn::TVec< T >::resize(), and test_set.

Referenced by build().

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

Declares this class' options.

Reimplemented from PLearn::Object.

Definition at line 67 of file NearestNeighborPredictionCost.cc.

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

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

Transforms a shallow copy into a deep copy.

Definition at line 151 of file NearestNeighborPredictionCost.cc.

References PLERROR.

PLearn::NearestNeighborPredictionCost::PLEARN_DECLARE_OBJECT NearestNeighborPredictionCost   ) 
 

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

Overload this for runnable objects (default method issues a runtime error) Runnable objects are objects that can be used as *THE* object of a .plearn script.

The run() method specifies what they should do when executed.

Reimplemented from PLearn::Object.

Definition at line 110 of file NearestNeighborPredictionCost.cc.

References computed_outputs, cost, PLearn::endl(), knn, learner, PLearn::VMat::length(), PLearn::local_neighbors_differences(), PLearn::min(), PLearn::projection_error(), test_set, and PLearn::VMat::width().


Member Data Documentation

VMat PLearn::NearestNeighborPredictionCost::computed_outputs
 

Definition at line 82 of file NearestNeighborPredictionCost.h.

Referenced by build_(), and run().

Vec PLearn::NearestNeighborPredictionCost::cost
 

Definition at line 81 of file NearestNeighborPredictionCost.h.

Referenced by build_(), and run().

int PLearn::NearestNeighborPredictionCost::knn
 

Definition at line 76 of file NearestNeighborPredictionCost.h.

Referenced by build_(), and run().

PP<PLearner> PLearn::NearestNeighborPredictionCost::learner [protected]
 

Definition at line 68 of file NearestNeighborPredictionCost.h.

Referenced by build_(), and run().

string PLearn::NearestNeighborPredictionCost::learner_spec
 

Definition at line 78 of file NearestNeighborPredictionCost.h.

Referenced by build_().

VMat PLearn::NearestNeighborPredictionCost::test_set
 

Definition at line 77 of file NearestNeighborPredictionCost.h.

Referenced by build_(), and run().


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