#include <ConstantRegressor.h>
Inheritance diagram for PLearn::ConstantRegressor:
Public Member Functions | |
ConstantRegressor () | |
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 (ConstantRegressor) | |
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< string > | getTestCostNames () const |
Returns the names of the costs computed by computeCostsFromOutpus (and thus the test method). | |
virtual TVec< string > | getTrainCostNames () const |
Returns the names of the objective costs that the train method computes and for which it updates the VecStatsCollector train_stats. | |
Public Attributes | |
real | weight_decay |
Weight decay; not usually useful but... | |
Static Protected Member Functions | |
void | declareOptions (OptionList &ol) |
Declares this class' options. | |
Protected Attributes | |
Vec | constant_output |
Private Types | |
typedef PLearner | inherited |
Private Member Functions | |
void | build_ () |
This does the actual building. |
|
Reimplemented from PLearn::PLearner. Definition at line 52 of file ConstantRegressor.h. |
|
Definition at line 46 of file ConstantRegressor.cc. |
|
simply calls inherited::build() then build_()
Reimplemented from PLearn::PLearner. Definition at line 93 of file ConstantRegressor.cc. References build_(). |
|
This does the actual building.
Reimplemented from PLearn::PLearner. Definition at line 88 of file ConstantRegressor.cc. Referenced by build(). |
|
Computes the costs from already computed output.
Implements PLearn::PLearner. Definition at line 160 of file ConstantRegressor.cc. References PLearn::powdistance(). |
|
Computes the output from the input.
Implements PLearn::PLearner. Definition at line 153 of file ConstantRegressor.cc. References constant_output, outputsize(), and PLearn::TVec< T >::resize(). |
|
Declares this class' options.
Reimplemented from PLearn::PLearner. Definition at line 65 of file ConstantRegressor.cc. References PLearn::declareOption(), and PLearn::OptionList. |
|
(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!)
Implements PLearn::PLearner. Definition at line 111 of file ConstantRegressor.cc. |
|
Returns the names of the costs computed by computeCostsFromOutpus (and thus the test method).
Implements PLearn::PLearner. Definition at line 167 of file ConstantRegressor.cc. References getTrainCostNames(). |
|
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 173 of file ConstantRegressor.cc. Referenced by getTestCostNames(). |
|
Transforms a shallow copy into a deep copy.
Definition at line 100 of file ConstantRegressor.cc. |
|
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 106 of file ConstantRegressor.cc. References PLearn::PLearner::targetsize(). Referenced by computeOutput(). |
|
|
|
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 116 of file ConstantRegressor.cc. References PLearn::TVec< T >::clear(), constant_output, PLearn::VMat::getExample(), PLearn::PLearner::inputsize(), PLearn::VMat::length(), PLearn::multiply(), PLearn::multiplyAdd(), PLearn::powdistance(), PLearn::TVec< T >::resize(), PLearn::PLearner::targetsize(), and PLearn::Vec. |
|
Definition at line 60 of file ConstantRegressor.h. Referenced by computeOutput(), and train(). |
|
Weight decay; not usually useful but...
Definition at line 65 of file ConstantRegressor.h. |