#include <SelectInputSubsetLearner.h>
Inheritance diagram for PLearn::SelectInputSubsetLearner:
Public Member Functions | |
SelectInputSubsetLearner () | |
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 (SelectInputSubsetLearner) | |
virtual int | inputsize () const |
Default returns train_set->inputsize(). | |
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 void | computeOutputAndCosts (const Vec &input, const Vec &target, Vec &output, Vec &costs) const |
Default calls computeOutput and computeCostsFromOutputs You may overload this if you have a more efficient way to compute both output and weighted costs at the same time. | |
virtual void | setTrainingSet (VMat training_set, bool call_forget=true) |
Declares the train_set Then calls build() and forget() if necessary Note: You shouldn't have to overload this in subclasses, except in maybe to forward the call to an underlying learner. | |
Public Attributes | |
TVec< int > | selected_inputs |
real | random_fraction |
Static Protected Member Functions | |
void | declareOptions (OptionList &ol) |
Declares this class' options. | |
Protected Attributes | |
Vec | learner_inputs |
TVec< int > | all_indices |
Private Types | |
typedef EmbeddedLearner | inherited |
Private Member Functions | |
void | build_ () |
This does the actual building. |
|
Reimplemented from PLearn::EmbeddedLearner. Definition at line 57 of file SelectInputSubsetLearner.h. |
|
Definition at line 50 of file SelectInputSubsetLearner.cc. |
|
Simply calls inherited::build() then build_().
Reimplemented from PLearn::EmbeddedLearner. Definition at line 95 of file SelectInputSubsetLearner.cc. References build_(). |
|
This does the actual building.
Reimplemented from PLearn::EmbeddedLearner. Definition at line 80 of file SelectInputSubsetLearner.cc. References learner_inputs, PLearn::TVec< int >::length(), random_fraction, PLearn::TVec< T >::resize(), PLearn::TVec< int >::resize(), selected_inputs, and PLearn::shuffleElements(). Referenced by build(). |
|
Computes the costs from already computed output.
Reimplemented from PLearn::EmbeddedLearner. Definition at line 126 of file SelectInputSubsetLearner.cc. References learner_inputs, PLearn::TVec< T >::length(), and selected_inputs. |
|
Computes the output from the input.
Reimplemented from PLearn::EmbeddedLearner. Definition at line 119 of file SelectInputSubsetLearner.cc. References learner_inputs, PLearn::TVec< T >::length(), and selected_inputs. |
|
Default calls computeOutput and computeCostsFromOutputs You may overload this if you have a more efficient way to compute both output and weighted costs at the same time.
Reimplemented from PLearn::EmbeddedLearner. Definition at line 135 of file SelectInputSubsetLearner.cc. References learner_inputs, PLearn::TVec< T >::length(), and selected_inputs. |
|
Declares this class' options.
Reimplemented from PLearn::EmbeddedLearner. Definition at line 60 of file SelectInputSubsetLearner.cc. References PLearn::declareOption(), and PLearn::OptionList. |
|
Default returns train_set->inputsize().
Reimplemented from PLearn::EmbeddedLearner. Definition at line 115 of file SelectInputSubsetLearner.cc. Referenced by setTrainingSet(). |
|
Transforms a shallow copy into a deep copy.
Reimplemented from PLearn::EmbeddedLearner. Definition at line 102 of file SelectInputSubsetLearner.cc. References all_indices, PLearn::deepCopyField(), learner_inputs, and selected_inputs. |
|
|
|
Declares the train_set Then calls build() and forget() if necessary Note: You shouldn't have to overload this in subclasses, except in maybe to forward the call to an underlying learner.
Reimplemented from PLearn::PLearner. Definition at line 143 of file SelectInputSubsetLearner.cc. References all_indices, inputsize(), PLearn::TVec< int >::length(), PLearn::TVec< int >::resize(), selected_inputs, and PLearn::VMat::width(). |
|
Definition at line 65 of file SelectInputSubsetLearner.h. Referenced by makeDeepCopyFromShallowCopy(), and setTrainingSet(). |
|
Definition at line 64 of file SelectInputSubsetLearner.h. Referenced by build_(), computeCostsFromOutputs(), computeOutput(), computeOutputAndCosts(), and makeDeepCopyFromShallowCopy(). |
|
Definition at line 82 of file SelectInputSubsetLearner.h. Referenced by build_(). |
|
Definition at line 78 of file SelectInputSubsetLearner.h. Referenced by build_(), computeCostsFromOutputs(), computeOutput(), computeOutputAndCosts(), makeDeepCopyFromShallowCopy(), and setTrainingSet(). |