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

PLearn::Grapher Class Reference

#include <Grapher.h>

Inheritance diagram for PLearn::Grapher:

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

Collaboration graph
[legend]
List of all members.

Public Types

typedef Object inherited

Public Member Functions

 Grapher ()
virtual void run ()
 Overload this for runnable objects (default method issues a runtime error).

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

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

 PLEARN_DECLARE_OBJECT (Grapher)
 Declares name and deepCopy methods.


Static Public Member Functions

void plot_2D_classification (string epsfname, VMat trainset, TVec< int > griddim, TVec< pair< real, real > > gridrange, VMat gridoutputs, real radius, bool bw=false)
void plot_1D_regression (string basename, VMat trainset, TVec< int > griddim, TVec< pair< real, real > > gridrange, VMat gridoutputs, VMat trainoutputs, bool bw=false)

Public Attributes

string basename
string task
real class1_threshold
PP< PLearnerlearner
VMat trainset
TVec< intgriddim
TVec< pair< real, real > > gridrange
real radius
bool bw
string save_learner_as

Static Protected Member Functions

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


Private Member Functions

void build_ ()
 This does the actual building.

void computeAutoGridrange ()

Member Typedef Documentation

typedef Object PLearn::Grapher::inherited
 

Reimplemented from PLearn::Object.

Definition at line 62 of file Grapher.h.


Constructor & Destructor Documentation

PLearn::Grapher::Grapher  ) 
 

Definition at line 495 of file Grapher.cc.


Member Function Documentation

void PLearn::Grapher::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 823 of file Grapher.cc.

References build_().

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

This does the actual building.

Reimplemented from PLearn::Object.

Definition at line 548 of file Grapher.cc.

Referenced by build().

void PLearn::Grapher::computeAutoGridrange  )  [private]
 

Definition at line 461 of file Grapher.cc.

References PLearn::TVec< T >::first(), PLearn::TVec< pair< real, real > >::first(), PLearn::VMat::getExample(), gridrange, PLearn::VMat::length(), PLearn::TVec< pair< real, real > >::resize(), trainset, and PLearn::Vec.

Referenced by run().

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

Declares this class' options.

Reimplemented from PLearn::Object.

Definition at line 503 of file Grapher.cc.

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

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

Transforms a shallow copy into a deep copy.

Definition at line 830 of file Grapher.cc.

PLearn::Grapher::PLEARN_DECLARE_OBJECT Grapher   ) 
 

Declares name and deepCopy methods.

void PLearn::Grapher::plot_1D_regression string  basename,
VMat  trainset,
TVec< int griddim,
TVec< pair< real, real > >  gridrange,
VMat  gridoutputs,
VMat  trainoutputs,
bool  bw = false
[static]
 

Definition at line 586 of file Grapher.cc.

References PLearn::endl(), PLearn::VMat::getExample(), PLearn::VMat::length(), PLearn::Mat, PLearn::pgetline(), PLERROR, PLearn::saveAscii(), PLearn::TVec< T >::size(), PLearn::sortRows(), and x.

Referenced by run().

void PLearn::Grapher::plot_2D_classification string  epsfname,
VMat  trainset,
TVec< int griddim,
TVec< pair< real, real > >  gridrange,
VMat  gridoutputs,
real  radius,
bool  bw = false
[static]
 

Definition at line 632 of file Grapher.cc.

References PLearn::argmax(), PLearn::color(), PLearn::GhostScript::displayGray(), PLearn::GhostScript::displayRGB(), PLearn::endl(), PLearn::GhostScript::fillCircle(), PLearn::VMat::getExample(), PLearn::TVec< T >::length(), PLearn::VMat::length(), PLearn::GhostScript::mapping(), PLERROR, PLearn::GhostScript::setcolor(), PLearn::GhostScript::setgray(), PLearn::TVec< T >::size(), PLearn::VMat::width(), and x.

Referenced by run().

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

Overload this for runnable objects (default method issues a runtime error).

Reimplemented from PLearn::Object.

Definition at line 717 of file Grapher.cc.

References bw, class1_threshold, computeAutoGridrange(), PLearn::endl(), griddim, gridrange, PLearn::TVec< pair< real, real > >::isEmpty(), PLearn::VMat::length(), PLERROR, plot_1D_regression(), plot_2D_classification(), radius, PLearn::save(), save_learner_as, task, and trainset.


Member Data Documentation

string PLearn::Grapher::basename
 

Definition at line 68 of file Grapher.h.

bool PLearn::Grapher::bw
 

Definition at line 76 of file Grapher.h.

Referenced by run().

real PLearn::Grapher::class1_threshold
 

Definition at line 70 of file Grapher.h.

Referenced by run().

TVec<int> PLearn::Grapher::griddim
 

Definition at line 73 of file Grapher.h.

Referenced by run().

TVec< pair<real,real> > PLearn::Grapher::gridrange
 

Definition at line 74 of file Grapher.h.

Referenced by computeAutoGridrange(), and run().

PP<PLearner> PLearn::Grapher::learner
 

Definition at line 71 of file Grapher.h.

real PLearn::Grapher::radius
 

Definition at line 75 of file Grapher.h.

Referenced by run().

string PLearn::Grapher::save_learner_as
 

Definition at line 78 of file Grapher.h.

Referenced by run().

string PLearn::Grapher::task
 

Definition at line 69 of file Grapher.h.

Referenced by run().

VMat PLearn::Grapher::trainset
 

Definition at line 72 of file Grapher.h.

Referenced by computeAutoGridrange(), and run().


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