#include <ClassifierFromDensity.h>
Inheritance diagram for PLearn::ClassifierFromDensity:
Public Types | |
typedef PLearner | inherited |
Public Member Functions | |
ClassifierFromDensity () | |
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 (ClassifierFromDensity) | |
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 | |
int | nclasses |
TVec< PP< PLearner > > | estimators |
Vec | log_priors |
bool | output_log_probabilities |
bool | normalize_probabilities |
Static Protected Member Functions | |
void | declareOptions (OptionList &ol) |
Declares this class' options. | |
Private Member Functions | |
void | build_ () |
This does the actual building. |
|
Reimplemented from PLearn::PLearner. Definition at line 53 of file ClassifierFromDensity.h. |
|
Definition at line 51 of file ClassifierFromDensity.cc. |
|
simply calls inherited::build() then build_()
Reimplemented from PLearn::PLearner. Definition at line 93 of file ClassifierFromDensity.cc. References build_(). |
|
This does the actual building.
Reimplemented from PLearn::PLearner. Definition at line 80 of file ClassifierFromDensity.cc. References PLearn::deepCopy(), estimators, nclasses, PLERROR, PLearn::TVec< PP< PLearner > >::resize(), and PLearn::TVec< PP< PLearner > >::size(). Referenced by build(). |
|
Computes the costs from already computed output.
Implements PLearn::PLearner. Definition at line 210 of file ClassifierFromDensity.cc. References PLearn::class_error(), PLearn::condprob_cost(), PLearn::CostFunc, and PLearn::TVec< T >::resize(). |
|
Computes the output from the input.
Implements PLearn::PLearner. Definition at line 172 of file ClassifierFromDensity.cc. References estimators, PLearn::exp(), log_priors, PLearn::logadd(), nclasses, normalize_probabilities, output_log_probabilities, and PLearn::TVec< T >::resize(). |
|
Declares this class' options.
Reimplemented from PLearn::PLearner. Definition at line 62 of file ClassifierFromDensity.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 113 of file ClassifierFromDensity.cc. References estimators, and PLearn::TVec< PP< PLearner > >::length(). Referenced by train(). |
|
Returns the names of the costs computed by computeCostsFromOutpus (and thus the test method).
Implements PLearn::PLearner. Definition at line 225 of file ClassifierFromDensity.cc. |
|
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 233 of file ClassifierFromDensity.cc. |
|
Transforms a shallow copy into a deep copy.
Definition at line 100 of file ClassifierFromDensity.cc. References PLearn::deepCopyField(), estimators, and log_priors. |
|
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 108 of file ClassifierFromDensity.cc. References nclasses. |
|
|
|
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 120 of file ClassifierFromDensity.cc. References PLearn::endl(), estimators, forget(), PLearn::PLearner::getExperimentDirectory(), PLearn::hconcat(), PLearn::indicesOfOccurencesInColumn(), PLearn::PLearner::inputsize(), PLearn::VMat::length(), PLearn::log(), log_priors, nclasses, PLERROR, PLearn::TVec< T >::resize(), PLearn::VMat::rows(), PLearn::VMat::subMatColumns(), PLearn::PLearner::targetsize(), and PLearn::tostring(). |
|
Definition at line 60 of file ClassifierFromDensity.h. Referenced by build_(), computeOutput(), forget(), makeDeepCopyFromShallowCopy(), and train(). |
|
Definition at line 61 of file ClassifierFromDensity.h. Referenced by computeOutput(), makeDeepCopyFromShallowCopy(), and train(). |
|
Definition at line 59 of file ClassifierFromDensity.h. Referenced by build_(), computeOutput(), outputsize(), and train(). |
|
Definition at line 63 of file ClassifierFromDensity.h. Referenced by computeOutput(). |
|
Definition at line 62 of file ClassifierFromDensity.h. Referenced by computeOutput(). |