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

PLearn::IsomapTangentLearner Class Reference

#include <IsomapTangentLearner.h>

Inheritance diagram for PLearn::IsomapTangentLearner:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 IsomapTangentLearner ()
 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 (IsomapTangentLearner)
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.


Public Attributes

int n_comp
int knn

Static Protected Member Functions

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


Protected Attributes

Isomap iso_learner
Mat k_xi_x_sorted

Private Types

typedef PLearner inherited

Private Member Functions

void build_ ()
 This does the actual building.


Member Typedef Documentation

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

Reimplemented from PLearn::PLearner.

Definition at line 58 of file IsomapTangentLearner.h.


Constructor & Destructor Documentation

PLearn::IsomapTangentLearner::IsomapTangentLearner  ) 
 

Default constructor.

Definition at line 53 of file IsomapTangentLearner.cc.


Member Function Documentation

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

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

Reimplemented from PLearn::PLearner.

Definition at line 111 of file IsomapTangentLearner.cc.

References build_().

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

This does the actual building.

Reimplemented from PLearn::PLearner.

Definition at line 84 of file IsomapTangentLearner.cc.

References PLearn::Isomap::build(), iso_learner, knn, PLearn::Isomap::knn, n_comp, PLearn::KernelProjection::n_comp, and PLearn::KernelProjection::setTrainingSet().

Referenced by build().

void PLearn::IsomapTangentLearner::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 271 of file IsomapTangentLearner.cc.

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

Computes the output from the input.

Implements PLearn::PLearner.

Definition at line 162 of file IsomapTangentLearner.cc.

References PLearn::KernelProjection::eigenvectors, PLearn::PLearner::inputsize(), iso_learner, k_xi_x_sorted, PLearn::KernelProjection::kernel, knn, PLearn::VMat::length(), PLearn::TMat< T >::length(), PLearn::Mat, n_comp, PLearn::norm(), PLearn::TMat< T >::subMatRows(), PLearn::TMat< T >::toVec(), and PLearn::Vec.

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

Declares this class' options.

Reimplemented from PLearn::PLearner.

Definition at line 64 of file IsomapTangentLearner.cc.

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

void PLearn::IsomapTangentLearner::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!).

(Re-)initialize 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!)

A typical forget() method should do the following:

  • initialize a random number generator with the seed option
  • initialize the learner's parameters, using this random generator
  • stage = 0

Implements PLearn::PLearner.

Definition at line 140 of file IsomapTangentLearner.cc.

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

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

Implements PLearn::PLearner.

Definition at line 278 of file IsomapTangentLearner.cc.

TVec< string > PLearn::IsomapTangentLearner::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 286 of file IsomapTangentLearner.cc.

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

Transforms a shallow copy into a deep copy.

Definition at line 118 of file IsomapTangentLearner.cc.

References PLERROR.

int PLearn::IsomapTangentLearner::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 133 of file IsomapTangentLearner.cc.

References PLearn::PLearner::inputsize(), and n_comp.

PLearn::IsomapTangentLearner::PLEARN_DECLARE_OBJECT IsomapTangentLearner   ) 
 

void PLearn::IsomapTangentLearner::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 152 of file IsomapTangentLearner.cc.

References iso_learner, and PLearn::KernelProjection::train().


Member Data Documentation

Isomap PLearn::IsomapTangentLearner::iso_learner [protected]
 

Definition at line 68 of file IsomapTangentLearner.h.

Referenced by build_(), computeOutput(), and train().

Mat PLearn::IsomapTangentLearner::k_xi_x_sorted [protected]
 

Definition at line 69 of file IsomapTangentLearner.h.

Referenced by computeOutput().

int PLearn::IsomapTangentLearner::knn
 

Definition at line 74 of file IsomapTangentLearner.h.

Referenced by build_(), and computeOutput().

int PLearn::IsomapTangentLearner::n_comp
 

Definition at line 73 of file IsomapTangentLearner.h.

Referenced by build_(), computeOutput(), and outputsize().


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