PLearn 0.1
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes
PLearn::PLearner Class Reference

The base class for learning algorithms, which should be the main "products" of PLearn. More...

#include <PLearner.h>

Inherits PLearn::Object.

Inherited by PLearn::AdaBoost, PLearn::AnalyzeDond2DiscreteVariables, PLearn::AnalyzeFieldStats, PLearn::AutoLinearRegressor, PLearn::BaggingLearner, PLearn::BaseRegressorConfidence, PLearn::BaseRegressorWrapper, PLearn::BasisSelectionRegressor, PLearn::BestAveragingPLearner, PLearn::BinaryStump, PLearn::ChainedLearners, PLearn::CheckDond2FileSequence, PLearn::ClassifierFromConditionalPDistribution, PLearn::ClassifierFromDensity, PLearn::CompareLearner, PLearn::ComputeDond2Target, PLearn::ComputePurenneError, PLearn::ConstantRegressor, PLearn::CubicSpline, PLearn::DeepBeliefNet, PLearn::DeepFeatureExtractorNNet, PLearn::DeepNNet, PLearn::DeepNonLocalManifoldParzen, PLearn::DeepReconstructorNet, PLearn::DenoisingRecurrentNet, PLearn::DichotomizeDond2DiscreteVariables, PLearn::DiscriminativeDeepBeliefNet, PLearn::DiscriminativeRBM, PLearn::DistRepNNet, PLearn::DiverseComponentAnalysis, PLearn::DynamicallyLinkedRBMsModel, PLearn::EmbeddedLearner, PLearn::EntropyContrast, PLearn::EntropyContrastLearner, PLearn::Experimentation, PLearn::FeatureSetNaiveBayesClassifier, PLearn::FeatureSetNNet, PLearn::FeatureSetSequentialCRF, PLearn::FixDond2BinaryVariables, PLearn::GaussianContinuum, PLearn::GaussianProcessRegressor, PLearn::GenericNearestNeighbors, PLearn::IdentityPLearner, PLearn::IncrementalNNet, PLearn::IsomapTangentLearner, PLearn::KernelProjection, PLearn::KernelRidgeRegressor, PLearn::KFoldLogisticClassifier, PLearn::KMeansClustering, PLearn::KNNClassifier, PLearn::KNNRegressor, PLearn::KPCATangentLearner, PLearn::LinearInductiveTransferClassifier, PLearn::LinearRegressor, PLearn::LLC, PLearn::LocalGaussianClassifier, PLearn::LocalMedBoost, PLearn::ManifoldParzen, PLearn::MergeDond2Files, PLearn::mNNet, PLearn::ModuleLearner, PLearn::ModulesLearner, PLearn::MoleculeTemplateLearner, PLearn::MultiClassAdaBoost, PLearn::MultiInstanceNNet, PLearn::NatGradNNet, PLearn::NatGradSMPNNet, PLearn::NeighborhoodConditionalMean, PLearn::NeighborhoodSmoothnessNNet, PLearn::NeuralProbabilisticLanguageModel, PLearn::NNet, PLearn::NnlmOnlineLearner, PLearn::NormalizationLearner, PLearn::NxProfileLearner, PLearn::PCA, PLearn::PDistribution, PLearn::PLS, PLearn::PrecomputedProcessedLearner, PLearn::Preprocessing, PLearn::PseudolikelihoodRBM, PLearn::PythonProcessedLearner, PLearn::RankingFromKernel, PLearn::RegressionTree, PLearn::RegressorFromDistribution, PLearn::SecondIterationWrapper, PLearn::SemiSupervisedDBN, PLearn::SequentialLearner, PLearn::StabilisationLearner, PLearn::StackedAutoassociatorsNet, PLearn::StackedFocusedAutoassociatorsNet, PLearn::StackedLearner, PLearn::StackedModulesLearner, PLearn::StackedSVDNet, PLearn::StatefulLearner, PLearn::StructuralLearner, PLearn::SubsamplingDBN, PLearn::TangentLearner, PLearn::TargetEncodingLearner, PLearn::TestImputations, PLearn::TestingLearner, PLearn::TestLearner, PLearn::TopDownAsymetricDeepNetwork, PLearn::TorchLearner, PLearn::UniformizeLearner, PLearn::VariableSelectionWithDirectedGradientDescent, PLearn::VPLCombinedLearner, PLearn::VPLPreprocessedLearner, PLearn::VPLPreprocessedLearner2, PLearn::VPLProcessor, and PLearn::WPLS.

Collaboration diagram for PLearn::PLearner:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 PLearner ()
 Default Constructor.
virtual void setTrainingSet (VMat training_set, bool call_forget=true)
 Declares the training set.
VMat getTrainingSet () const
 Returns the current train_set.
virtual void setValidationSet (VMat validset)
 Set the validation set (optionally) for learners that are able to use it directly.
VMat getValidationSet () const
 Returns the current validation set.
virtual void setTrainStatsCollector (PP< VecStatsCollector > statscol)
 Sets the statistics collector whose update() method will be called during training.
PP< VecStatsCollectorgetTrainStatsCollector ()
 Returns the train stats collector.
virtual void setExperimentDirectory (const PPath &the_expdir)
 The experiment directory is the directory in which files related to this model are to be saved.
PPath getExperimentDirectory () const
 This returns the currently set expdir (see setExperimentDirectory)
virtual int inputsize () const
 Default returns inputsize_ cached from train_set->inputsize()
virtual int targetsize () const
 Default returns targetsize_ cached from train_set->targetsize()
virtual int weightsize () const
 Default returns weightsize_ cached from train_set->weightsize()
virtual int outputsize () const =0
 SUBCLASS WRITING: override this so that it returns the size of this learner's output, as a function of its inputsize(), targetsize() and set options.
virtual void build ()
 Finish building the object; just call inherited::build followed by build_()
virtual void forget ()
 *** SUBCLASS WRITING: ***
virtual void finalize ()
 *** SUBCLASS WRITING: ***
virtual void train ()=0
 *** SUBCLASS WRITING: ***
virtual void computeOutput (const Vec &input, Vec &output) const
 *** SUBCLASS WRITING: ***
virtual void computeOutputs (const Mat &input, Mat &output) const
 if it is more efficient to compute multipe outputs simultaneously, it can be advantageous to define the latter instead, in which each row of the matrices is associated with one example.
virtual void computeCostsFromOutputs (const Vec &input, const Vec &output, const Vec &target, Vec &costs) const =0
 *** SUBCLASS WRITING: ***
virtual void computeOutputAndCosts (const Vec &input, const Vec &target, Vec &output, Vec &costs) const
 Default calls computeOutput and computeCostsFromOutputs.
virtual void computeOutputsAndCosts (const Mat &input, const Mat &target, Mat &output, Mat &costs) const
 minibatch version of computeOutputAndCosts
virtual void computeCostsOnly (const Vec &input, const Vec &target, Vec &costs) const
 Default calls computeOutputAndCosts.
virtual bool computeConfidenceFromOutput (const Vec &input, const Vec &output, real probability, TVec< pair< real, real > > &intervals) const
 Compute a confidence intervals for the output, given the input and the pre-computed output (resulting from computeOutput or similar).
virtual void computeOutputCovMat (const Mat &inputs, Mat &outputs, TVec< Mat > &covariance_matrices) const
 Version of computeOutput that is capable of returning an output matrix given an input matrix (set of output vectors), as well as the complete covariance matrix between the outputs.
virtual void batchComputeOutputAndConfidence (VMat inputs, real probability, VMat outputs_and_confidence) const
 Repeatedly calls computeOutput and computeConfidenceFromOutput with the rows of inputs.
virtual void use (VMat testset, VMat outputs) const
 Computes outputs for the input part of testset.
Mat computeInputOutputMat (VMat inputs) const
 Returns a Mat that is a concatenation of the inputs and computed outputs.
Mat computeInputOutputConfMat (VMat inputs, real probability) const
 Return a Mat that is the contatenation of inputs, outputs, lower confidence bound, and upper confidence bound.
Mat computeOutputConfMat (VMat inputs, real probability) const
 Return a Mat that is the contatenation of outputs, lower confidence bound, and upper confidence bound.
virtual void useOnTrain (Mat &outputs) const
 Compute the output on the training set of the learner, and save the result in the provided matrix.
virtual Mat remote_useOnTrain () const
 'remote' version of useOnTrain
virtual void test (VMat testset, PP< VecStatsCollector > test_stats, VMat testoutputs=0, VMat testcosts=0) const
 Performs test on testset, updating test cost statistics, and optionally filling testoutputs and testcosts.
virtual tuple< PP
< VecStatsCollector >, VMat,
VMat
sub_test (VMat testset, PP< VecStatsCollector > test_stats, bool rtestoutputs, bool rtestcosts) const
 sub-test: Called by parallel test on chunks of the testset.
virtual tuple< PP
< VecStatsCollector >, VMat,
VMat
remote_test (VMat testset, PP< VecStatsCollector > test_stats, bool rtestoutputs, bool rtestcosts) const
 'remote' interface for test
virtual VMat processDataSet (VMat dataset) const
 Process a full dataset (possibly containing input,target,weight,extra parts).
virtual TVec< string > getTestCostNames () const =0
 *** SUBCLASS WRITING: ***
virtual TVec< string > getTrainCostNames () const =0
 *** SUBCLASS WRITING: ***
virtual TVec< string > getOutputNames () const
 Returns a vector of length outputsize() containing the outputs' names.
virtual int nTestCosts () const
 Caches getTestCostNames().size() in an internal variable the first time it is called, and then returns the content of this variable.
virtual int nTrainCosts () const
 Caches getTrainCostNames().size() in an internal variable the first time it is called, and then returns the content of this variable.
int getTestCostIndex (const string &costname) const
 Returns the index of the given cost in the vector of testcosts; calls PLERROR (throws a PLearnException) if requested cost is not found.
int getTrainCostIndex (const string &costname) const
 Returns the index of the given cost in the vector of traincosts (objectives); calls PLERROR (throws a PLearnException) if requested cost is not found.
virtual void resetInternalState ()
 If any, reset the internal state Default: do nothing.
virtual bool isStatefulLearner () const
 Does this PLearner has an internal state? Default: false.
virtual PLearnerdeepCopy (CopiesMap &copies) const

Static Public Member Functions

static string _classname_ ()
static OptionList_getOptionList_ ()
static RemoteMethodMap_getRemoteMethodMap_ ()
static bool _isa_ (const Object *o)
static void _static_initialize_ ()
static const PPathdeclaringFile ()

Public Attributes

PPath expdir
 Path of the directory associated with this learner, in which it should save any file it wishes to create.
int seed_
 The seed used for the random number generator in initializing the learner (see forget() method).
int stage
 The current training stage, since last fresh initialization (forget()): 0 means untrained, n often means after n epochs or optimization steps, etc...
int nstages
 The stage until which train() should train this learner and return.
bool report_progress
 Should progress in learning and testing be reported in a ProgressBar.
int verbosity
 Level of verbosity.
int nservers
 Max number of computation servers to use in parallel with the main process.
int test_minibatch_size
 Size of minibatches used during testing to take advantage of efficient (possibly parallelized) implementations when multiple exemples are processed at once.
string save_trainingset_prefix
 Whether the training set should be saved upon a call to setTrainingSet().
bool parallelize_here
 Wether parallelism should be exploited at this object's level.
bool master_sends_testset_rows
 For PLearner::test in parallel: if true, the master reads the testset and sends rows to the slaves; otherwise, the master sends a description of the testset to the slaves.
int use_a_separate_random_generator_for_testing
 This option allows to perform testing always in the same conditions in terms of the random generator (if testing involves some non-deterministic component, this can be useful in order to obtain repeatable test results).
bool finalized
 (default false) After training(when finalized() is called) it will be set to true.

Static Public Attributes

static StaticInitializer _static_initializer_

Protected Member Functions

virtual void build_from_train_set ()
 Building part of the PLearner that needs the train_set.
bool initTrain ()
 This method may be called by any PLearner at the very beginning of the 'train' method.
virtual void makeDeepCopyFromShallowCopy (CopiesMap &copies)
 Transforms a shallow copy into a deep copy.

Static Protected Member Functions

static void declareOptions (OptionList &ol)
 Declares this class' options.
static void declareMethods (RemoteMethodMap &rmm)
 Declare the methods that are remote-callable.

Protected Attributes

VMat train_set
 The training set as set by setTrainingSet.
VMat validation_set
 Validation set used in some contexts.
int inputsize_
 Learnt inputsize obtained from train_set when doing setTrainingSet.
int targetsize_
 Learnt targetsize obtained from train_set when doing setTrainingSet.
int weightsize_
 Learnt weightsize obtained from train_set when doing setTrainingSet.
int n_examples
 Learnt number of examples obtained from train_set when doing setTrainingSet.
PP< VecStatsCollectortrain_stats
 The stats_collector responsible for collecting train cost statistics during training.
bool forget_when_training_set_changes
 Whether or not to call 'forget' when the training set changes, in setTrainingSet.
PP< PRandomrandom_gen
 The random generator used by this PLearner.
Mat b_inputs
Mat b_targets
Mat b_outputs
Mat b_costs
Vec b_weights

Private Types

typedef Object inherited

Private Member Functions

void build_ ()
 **** SUBCLASS WRITING: ****
Vec remote_computeOutput (const Vec &input) const
 Version of computeOutput that returns a result by value.
Mat remote_computeOutputs (const Mat &input) const
pair< Mat, Matremote_computeOutputsAndCosts (const Mat &input, const Mat &target) const
void remote_use (VMat inputs, string output_fname) const
 Version of use that's called by RMI.
Mat remote_use2 (VMat inputs) const
 Version of use2 that's called by RMI.
tuple< Vec, Vecremote_computeOutputAndCosts (const Vec &input, const Vec &target) const
 Version of computeOutputAndCosts that's called by RMI.
Vec remote_computeCostsFromOutputs (const Vec &input, const Vec &output, const Vec &target) const
 Version of computeCostsFromOutputs that's called by RMI.
Vec remote_computeCostsOnly (const Vec &input, const Vec &target) const
 Version of computeCostsOnly that's called by RMI.
TVec< pair< real, real > > remote_computeConfidenceFromOutput (const Vec &input, const Vec &output, real probability) const
 Version of computeConfidenceFromOutput that's called by RMI.
tuple< Mat, TVec< Mat > > remote_computeOutputCovMat (const Mat &inputs) const
 Version of computeOutputCovMat that's called by RMI.
void remote_batchComputeOutputAndConfidence (VMat inputs, real probability, string pmat_fname) const
 Version of batchComputeOutputAndConfidence that's called by RMI.

Private Attributes

int n_train_costs_
 Cached number of training costs.
int n_test_costs_
 Cached number of test costs.
Vec tmp_output
 Global storage to save memory allocations.

Detailed Description

The base class for learning algorithms, which should be the main "products" of PLearn.

PLearner provides a base class for all learning algorithms within PLearn. It presents an abstraction of learning that centers around a "train-test" paradigm:

Note that the PTester class is the usual "driver" for a PLearner (and automatically calls the above functions in the appropriate order), in the usual scenario wherein one wants to evaluate the generalization performance on a dataset.

Definition at line 85 of file PLearner.h.


Member Typedef Documentation

Reimplemented from PLearn::Object.

Reimplemented in PLearn::AnalyzeDond2DiscreteVariables, PLearn::AnalyzeFieldStats, PLearn::CheckDond2FileSequence, PLearn::ComputeDond2Target, PLearn::ComputePurenneError, PLearn::DichotomizeDond2DiscreteVariables, PLearn::Experimentation, PLearn::FixDond2BinaryVariables, PLearn::MergeDond2Files, PLearn::NeighborhoodConditionalMean, PLearn::Preprocessing, PLearn::SecondIterationWrapper, PLearn::StabilisationLearner, PLearn::TestImputations, PLearn::BinaryStump, PLearn::ClassifierFromConditionalPDistribution, PLearn::ClassifierFromDensity, PLearn::KFoldLogisticClassifier, PLearn::LocalGaussianClassifier, PLearn::FeatureSetNaiveBayesClassifier, PLearn::KNNClassifier, PLearn::MultiInstanceNNet, PLearn::SVMClassificationTorch, PLearn::ToBagClassifier, PLearn::ConditionalDensityNet, PLearn::GaussianContinuumDistribution, PLearn::GaussianProcessRegressor, PLearn::PConditionalDistribution, PLearn::LocallyMagnifiedDistribution, PLearn::NeighborhoodBoxVolumeDensityEstimator, PLearn::TransformationLearner, PLearn::GaussianDistribution, PLearn::GaussMix, PLearn::HistogramDistribution, PLearn::KernelDensityEstimator, PLearn::ManifoldParzen2, PLearn::MixtureDistribution, PLearn::NGramDistribution, PLearn::NonLocalManifoldParzen, PLearn::ParzenWindow, PLearn::PDistribution, PLearn::RandomGaussMix, PLearn::RBMDistribution, PLearn::SpiralDistribution, PLearn::UnconditionalDistribution, PLearn::UniformDistribution, PLearn::AddCostToLearner, PLearn::AddLayersNNet, PLearn::BestAveragingPLearner, PLearn::ChainedLearners, PLearn::DeepNNet, PLearn::DistRepNNet, PLearn::EmbeddedLearner, PLearn::DeepReconstructorNet, PLearn::mNNet, PLearn::NatGradNNet, PLearn::NatGradSMPNNet, PLearn::PvGradNNet, PLearn::FeatureSetNNet, PLearn::HorizonStatefulLearner, PLearn::IdentityPLearner, PLearn::IncrementalNNet, PLearn::NeighborhoodSmoothnessNNet, PLearn::NNet, PLearn::PythonProcessedLearner, PLearn::SelectInputSubsetLearner, PLearn::StackedLearner, PLearn::StatefulLearner, PLearn::TestingLearner, PLearn::TorchLearner, PLearn::TransformOutputLearner, PLearn::VPLCombinedLearner, PLearn::VPLPreprocessedLearner, PLearn::VPLPreprocessedLearner2, PLearn::VPLProcessor, PLearn::HyperLearner, PLearn::AdaBoost, PLearn::BaggingLearner, PLearn::CompareLearner, PLearn::MultiClassAdaBoost, PLearn::PrecomputedProcessedLearner, PLearn::VariableSelectionWithDirectedGradientDescent, PLearn::BallTreeNearestNeighbors, PLearn::ExhaustiveNearestNeighbors, PLearn::GenericNearestNeighbors, PLearn::DeepBeliefNet, PLearn::GaussianDBNClassification, PLearn::GaussianDBNRegression, PLearn::GaussPartSupervisedDBN, PLearn::HintonDeepBeliefNet, PLearn::PartSupervisedDBN, PLearn::StackedModulesLearner, PLearn::SupervisedDBN, PLearn::UnfrozenDeepBeliefNet, PLearn::SemiSupervisedDBN, PLearn::SubsamplingDBN, PLearn::ModuleLearner, PLearn::ModulesLearner, PLearn::StackedAutoassociatorsNet, PLearn::AutoLinearRegressor, PLearn::BaseRegressorConfidence, PLearn::BaseRegressorWrapper, PLearn::BasisSelectionRegressor, PLearn::ConstantRegressor, PLearn::CubicSpline, PLearn::GaussianProcessRegressor, PLearn::KernelRidgeRegressor, PLearn::KNNRegressor, PLearn::LinearRegressor, PLearn::LocalMedBoost, PLearn::PLS, PLearn::PruningLinearRegressor, PLearn::RankLearner, PLearn::RegressionTree, PLearn::RegressorFromDistribution, PLearn::WPLS, PLearn::MovingAverage, PLearn::SequentialLearner, PLearn::SequentialModelSelector, PLearn::EntropyContrast, PLearn::EntropyContrastLearner, PLearn::DiverseComponentAnalysis, PLearn::GaussianContinuum, PLearn::GaussMixLocalProjections, PLearn::Isomap, PLearn::IsomapTangentLearner, PLearn::KernelPCA, PLearn::KernelProjection, PLearn::KMeansClustering, PLearn::KPCATangentLearner, PLearn::LLC, PLearn::LLE, PLearn::NormalizationLearner, PLearn::PCA, PLearn::SpectralClustering, PLearn::TangentLearner, PLearn::TargetEncodingLearner, PLearn::UniformizeLearner, PLearn::DeepFeatureExtractorNNet, PLearn::DeepNonLocalManifoldParzen, PLearn::DenoisingRecurrentNet, PLearn::MoleculeTemplateLearner, PLearn::TestLearner, PLearn::DiscriminativeDeepBeliefNet, PLearn::DiscriminativeRBM, PLearn::DynamicallyLinkedRBMsModel, PLearn::FeatureSetSequentialCRF, PLearn::LinearInductiveTransferClassifier, PLearn::ManifoldKNNDistribution, PLearn::ManifoldParzen, PLearn::NxProfileLearner, PLearn::NeuralProbabilisticLanguageModel, PLearn::NnlmOnlineLearner, PLearn::PseudolikelihoodRBM, PLearn::RankingFromKernel, PLearn::StackedFocusedAutoassociatorsNet, PLearn::StackedSVDNet, PLearn::StructuralLearner, PLearn::SurfaceTemplateLearner, and PLearn::TopDownAsymetricDeepNetwork.

Definition at line 87 of file PLearner.h.


Constructor & Destructor Documentation

PLearn::PLearner::PLearner ( )

Member Function Documentation

string PLearn::PLearner::_classname_ ( ) [static]

Reimplemented from PLearn::Object.

Reimplemented in PLearn::AnalyzeDond2DiscreteVariables, PLearn::AnalyzeFieldStats, PLearn::CheckDond2FileSequence, PLearn::ComputeDond2Target, PLearn::ComputePurenneError, PLearn::DichotomizeDond2DiscreteVariables, PLearn::Experimentation, PLearn::FixDond2BinaryVariables, PLearn::MergeDond2Files, PLearn::NeighborhoodConditionalMean, PLearn::Preprocessing, PLearn::SecondIterationWrapper, PLearn::StabilisationLearner, PLearn::TestImputations, PLearn::BinaryStump, PLearn::ClassifierFromConditionalPDistribution, PLearn::ClassifierFromDensity, PLearn::KFoldLogisticClassifier, PLearn::LocalGaussianClassifier, PLearn::FeatureSetNaiveBayesClassifier, PLearn::KNNClassifier, PLearn::MultiInstanceNNet, PLearn::SVMClassificationTorch, PLearn::ToBagClassifier, PLearn::ConditionalDensityNet, PLearn::GaussianContinuumDistribution, PLearn::GaussianProcessRegressor, PLearn::PConditionalDistribution, PLearn::LocallyMagnifiedDistribution, PLearn::NeighborhoodBoxVolumeDensityEstimator, PLearn::TransformationLearner, PLearn::GaussianDistribution, PLearn::GaussMix, PLearn::HistogramDistribution, PLearn::KernelDensityEstimator, PLearn::ManifoldParzen2, PLearn::MixtureDistribution, PLearn::NGramDistribution, PLearn::NonLocalManifoldParzen, PLearn::ParzenWindow, PLearn::PDistribution, PLearn::RandomGaussMix, PLearn::RBMDistribution, PLearn::SpiralDistribution, PLearn::UnconditionalDistribution, PLearn::UniformDistribution, PLearn::AddCostToLearner, PLearn::AddLayersNNet, PLearn::BestAveragingPLearner, PLearn::ChainedLearners, PLearn::DeepNNet, PLearn::DistRepNNet, PLearn::EmbeddedLearner, PLearn::DeepReconstructorNet, PLearn::mNNet, PLearn::NatGradNNet, PLearn::NatGradSMPNNet, PLearn::PvGradNNet, PLearn::FeatureSetNNet, PLearn::HorizonStatefulLearner, PLearn::IdentityPLearner, PLearn::IncrementalNNet, PLearn::NeighborhoodSmoothnessNNet, PLearn::NNet, PLearn::PythonProcessedLearner, PLearn::SelectInputSubsetLearner, PLearn::StackedLearner, PLearn::StatefulLearner, PLearn::TestingLearner, PLearn::TorchLearner, PLearn::TransformOutputLearner, PLearn::VPLCombinedLearner, PLearn::VPLPreprocessedLearner, PLearn::VPLPreprocessedLearner2, PLearn::VPLProcessor, PLearn::HyperLearner, PLearn::AdaBoost, PLearn::BaggingLearner, PLearn::CompareLearner, PLearn::MultiClassAdaBoost, PLearn::PrecomputedProcessedLearner, PLearn::VariableSelectionWithDirectedGradientDescent, PLearn::BallTreeNearestNeighbors, PLearn::ExhaustiveNearestNeighbors, PLearn::GenericNearestNeighbors, PLearn::DeepBeliefNet, PLearn::GaussianDBNClassification, PLearn::GaussianDBNRegression, PLearn::GaussPartSupervisedDBN, PLearn::HintonDeepBeliefNet, PLearn::PartSupervisedDBN, PLearn::StackedModulesLearner, PLearn::SupervisedDBN, PLearn::UnfrozenDeepBeliefNet, PLearn::SemiSupervisedDBN, PLearn::SubsamplingDBN, PLearn::ModuleLearner, PLearn::ModulesLearner, PLearn::StackedAutoassociatorsNet, PLearn::AutoLinearRegressor, PLearn::BaseRegressorConfidence, PLearn::BaseRegressorWrapper, PLearn::BasisSelectionRegressor, PLearn::ConstantRegressor, PLearn::CubicSpline, PLearn::GaussianProcessRegressor, PLearn::KernelRidgeRegressor, PLearn::KNNRegressor, PLearn::LinearRegressor, PLearn::LocalMedBoost, PLearn::PLS, PLearn::PruningLinearRegressor, PLearn::RankLearner, PLearn::RegressionTree, PLearn::RegressorFromDistribution, PLearn::WPLS, PLearn::EmbeddedSequentialLearner, PLearn::MovingAverage, PLearn::SequentialLearner, PLearn::SequentialModelSelector, PLearn::EntropyContrast, PLearn::EntropyContrastLearner, PLearn::DiverseComponentAnalysis, PLearn::GaussianContinuum, PLearn::GaussMixLocalProjections, PLearn::Isomap, PLearn::IsomapTangentLearner, PLearn::KernelPCA, PLearn::KernelProjection, PLearn::KMeansClustering, PLearn::KPCATangentLearner, PLearn::LLC, PLearn::LLE, PLearn::NormalizationLearner, PLearn::PCA, PLearn::SpectralClustering, PLearn::TangentLearner, PLearn::TargetEncodingLearner, PLearn::UniformizeLearner, PLearn::DeepFeatureExtractorNNet, PLearn::DeepNonLocalManifoldParzen, PLearn::DenoisingRecurrentNet, PLearn::MoleculeTemplateLearner, PLearn::TestLearner, PLearn::DiscriminativeDeepBeliefNet, PLearn::DiscriminativeRBM, PLearn::DynamicallyLinkedRBMsModel, PLearn::FeatureSetSequentialCRF, PLearn::LinearInductiveTransferClassifier, PLearn::ManifoldKNNDistribution, PLearn::ManifoldParzen, PLearn::NxProfileLearner, PLearn::NeuralProbabilisticLanguageModel, PLearn::NnlmOnlineLearner, PLearn::PseudolikelihoodRBM, PLearn::RankingFromKernel, PLearn::StackedFocusedAutoassociatorsNet, PLearn::StackedSVDNet, PLearn::StructuralLearner, PLearn::SurfaceTemplateLearner, and PLearn::TopDownAsymetricDeepNetwork.

Definition at line 107 of file PLearner.cc.

OptionList & PLearn::PLearner::_getOptionList_ ( ) [static]

Reimplemented from PLearn::Object.

Reimplemented in PLearn::AnalyzeDond2DiscreteVariables, PLearn::AnalyzeFieldStats, PLearn::CheckDond2FileSequence, PLearn::ComputeDond2Target, PLearn::ComputePurenneError, PLearn::DichotomizeDond2DiscreteVariables, PLearn::Experimentation, PLearn::FixDond2BinaryVariables, PLearn::MergeDond2Files, PLearn::NeighborhoodConditionalMean, PLearn::Preprocessing, PLearn::SecondIterationWrapper, PLearn::StabilisationLearner, PLearn::TestImputations, PLearn::BinaryStump, PLearn::ClassifierFromConditionalPDistribution, PLearn::ClassifierFromDensity, PLearn::KFoldLogisticClassifier, PLearn::LocalGaussianClassifier, PLearn::FeatureSetNaiveBayesClassifier, PLearn::KNNClassifier, PLearn::MultiInstanceNNet, PLearn::SVMClassificationTorch, PLearn::ToBagClassifier, PLearn::ConditionalDensityNet, PLearn::GaussianContinuumDistribution, PLearn::GaussianProcessRegressor, PLearn::PConditionalDistribution, PLearn::LocallyMagnifiedDistribution, PLearn::NeighborhoodBoxVolumeDensityEstimator, PLearn::TransformationLearner, PLearn::GaussianDistribution, PLearn::GaussMix, PLearn::HistogramDistribution, PLearn::KernelDensityEstimator, PLearn::ManifoldParzen2, PLearn::MixtureDistribution, PLearn::NGramDistribution, PLearn::NonLocalManifoldParzen, PLearn::ParzenWindow, PLearn::PDistribution, PLearn::RandomGaussMix, PLearn::RBMDistribution, PLearn::SpiralDistribution, PLearn::UnconditionalDistribution, PLearn::UniformDistribution, PLearn::AddCostToLearner, PLearn::AddLayersNNet, PLearn::BestAveragingPLearner, PLearn::ChainedLearners, PLearn::DeepNNet, PLearn::DistRepNNet, PLearn::EmbeddedLearner, PLearn::DeepReconstructorNet, PLearn::mNNet, PLearn::NatGradNNet, PLearn::NatGradSMPNNet, PLearn::PvGradNNet, PLearn::FeatureSetNNet, PLearn::HorizonStatefulLearner, PLearn::IdentityPLearner, PLearn::IncrementalNNet, PLearn::NeighborhoodSmoothnessNNet, PLearn::NNet, PLearn::PythonProcessedLearner, PLearn::SelectInputSubsetLearner, PLearn::StackedLearner, PLearn::StatefulLearner, PLearn::TestingLearner, PLearn::TorchLearner, PLearn::TransformOutputLearner, PLearn::VPLCombinedLearner, PLearn::VPLPreprocessedLearner, PLearn::VPLPreprocessedLearner2, PLearn::VPLProcessor, PLearn::HyperLearner, PLearn::AdaBoost, PLearn::BaggingLearner, PLearn::CompareLearner, PLearn::MultiClassAdaBoost, PLearn::PrecomputedProcessedLearner, PLearn::VariableSelectionWithDirectedGradientDescent, PLearn::BallTreeNearestNeighbors, PLearn::ExhaustiveNearestNeighbors, PLearn::GenericNearestNeighbors, PLearn::DeepBeliefNet, PLearn::GaussianDBNClassification, PLearn::GaussianDBNRegression, PLearn::GaussPartSupervisedDBN, PLearn::HintonDeepBeliefNet, PLearn::PartSupervisedDBN, PLearn::StackedModulesLearner, PLearn::SupervisedDBN, PLearn::UnfrozenDeepBeliefNet, PLearn::SemiSupervisedDBN, PLearn::SubsamplingDBN, PLearn::ModuleLearner, PLearn::ModulesLearner, PLearn::StackedAutoassociatorsNet, PLearn::AutoLinearRegressor, PLearn::BaseRegressorConfidence, PLearn::BaseRegressorWrapper, PLearn::BasisSelectionRegressor, PLearn::ConstantRegressor, PLearn::CubicSpline, PLearn::GaussianProcessRegressor, PLearn::KernelRidgeRegressor, PLearn::KNNRegressor, PLearn::LinearRegressor, PLearn::LocalMedBoost, PLearn::PLS, PLearn::PruningLinearRegressor, PLearn::RankLearner, PLearn::RegressionTree, PLearn::RegressorFromDistribution, PLearn::WPLS, PLearn::EmbeddedSequentialLearner, PLearn::MovingAverage, PLearn::SequentialLearner, PLearn::SequentialModelSelector, PLearn::EntropyContrast, PLearn::EntropyContrastLearner, PLearn::DiverseComponentAnalysis, PLearn::GaussianContinuum, PLearn::GaussMixLocalProjections, PLearn::Isomap, PLearn::IsomapTangentLearner, PLearn::KernelPCA, PLearn::KernelProjection, PLearn::KMeansClustering, PLearn::KPCATangentLearner, PLearn::LLC, PLearn::LLE, PLearn::NormalizationLearner, PLearn::PCA, PLearn::SpectralClustering, PLearn::TangentLearner, PLearn::TargetEncodingLearner, PLearn::UniformizeLearner, PLearn::DeepFeatureExtractorNNet, PLearn::DeepNonLocalManifoldParzen, PLearn::DenoisingRecurrentNet, PLearn::MoleculeTemplateLearner, PLearn::TestLearner, PLearn::DiscriminativeDeepBeliefNet, PLearn::DiscriminativeRBM, PLearn::DynamicallyLinkedRBMsModel, PLearn::FeatureSetSequentialCRF, PLearn::LinearInductiveTransferClassifier, PLearn::ManifoldKNNDistribution, PLearn::ManifoldParzen, PLearn::NxProfileLearner, PLearn::NeuralProbabilisticLanguageModel, PLearn::NnlmOnlineLearner, PLearn::PseudolikelihoodRBM, PLearn::RankingFromKernel, PLearn::StackedFocusedAutoassociatorsNet, PLearn::StackedSVDNet, PLearn::StructuralLearner, PLearn::SurfaceTemplateLearner, and PLearn::TopDownAsymetricDeepNetwork.

Definition at line 107 of file PLearner.cc.

RemoteMethodMap & PLearn::PLearner::_getRemoteMethodMap_ ( ) [static]

Reimplemented from PLearn::Object.

Reimplemented in PLearn::AnalyzeDond2DiscreteVariables, PLearn::AnalyzeFieldStats, PLearn::CheckDond2FileSequence, PLearn::ComputeDond2Target, PLearn::ComputePurenneError, PLearn::DichotomizeDond2DiscreteVariables, PLearn::Experimentation, PLearn::FixDond2BinaryVariables, PLearn::MergeDond2Files, PLearn::NeighborhoodConditionalMean, PLearn::Preprocessing, PLearn::SecondIterationWrapper, PLearn::StabilisationLearner, PLearn::TestImputations, PLearn::BinaryStump, PLearn::ClassifierFromConditionalPDistribution, PLearn::ClassifierFromDensity, PLearn::KFoldLogisticClassifier, PLearn::LocalGaussianClassifier, PLearn::FeatureSetNaiveBayesClassifier, PLearn::KNNClassifier, PLearn::MultiInstanceNNet, PLearn::SVMClassificationTorch, PLearn::ToBagClassifier, PLearn::ConditionalDensityNet, PLearn::GaussianContinuumDistribution, PLearn::GaussianProcessRegressor, PLearn::PConditionalDistribution, PLearn::LocallyMagnifiedDistribution, PLearn::NeighborhoodBoxVolumeDensityEstimator, PLearn::TransformationLearner, PLearn::GaussianDistribution, PLearn::GaussMix, PLearn::HistogramDistribution, PLearn::KernelDensityEstimator, PLearn::ManifoldParzen2, PLearn::MixtureDistribution, PLearn::NGramDistribution, PLearn::NonLocalManifoldParzen, PLearn::ParzenWindow, PLearn::PDistribution, PLearn::RandomGaussMix, PLearn::RBMDistribution, PLearn::SpiralDistribution, PLearn::UnconditionalDistribution, PLearn::UniformDistribution, PLearn::AddCostToLearner, PLearn::AddLayersNNet, PLearn::BestAveragingPLearner, PLearn::ChainedLearners, PLearn::DeepNNet, PLearn::DistRepNNet, PLearn::EmbeddedLearner, PLearn::DeepReconstructorNet, PLearn::mNNet, PLearn::NatGradNNet, PLearn::NatGradSMPNNet, PLearn::PvGradNNet, PLearn::FeatureSetNNet, PLearn::HorizonStatefulLearner, PLearn::IdentityPLearner, PLearn::IncrementalNNet, PLearn::NeighborhoodSmoothnessNNet, PLearn::NNet, PLearn::PythonProcessedLearner, PLearn::SelectInputSubsetLearner, PLearn::StackedLearner, PLearn::StatefulLearner, PLearn::TestingLearner, PLearn::TorchLearner, PLearn::TransformOutputLearner, PLearn::VPLCombinedLearner, PLearn::VPLPreprocessedLearner, PLearn::VPLPreprocessedLearner2, PLearn::VPLProcessor, PLearn::HyperLearner, PLearn::AdaBoost, PLearn::BaggingLearner, PLearn::CompareLearner, PLearn::MultiClassAdaBoost, PLearn::PrecomputedProcessedLearner, PLearn::VariableSelectionWithDirectedGradientDescent, PLearn::BallTreeNearestNeighbors, PLearn::ExhaustiveNearestNeighbors, PLearn::GenericNearestNeighbors, PLearn::DeepBeliefNet, PLearn::GaussianDBNClassification, PLearn::GaussianDBNRegression, PLearn::GaussPartSupervisedDBN, PLearn::HintonDeepBeliefNet, PLearn::PartSupervisedDBN, PLearn::StackedModulesLearner, PLearn::SupervisedDBN, PLearn::UnfrozenDeepBeliefNet, PLearn::SemiSupervisedDBN, PLearn::SubsamplingDBN, PLearn::ModuleLearner, PLearn::ModulesLearner, PLearn::StackedAutoassociatorsNet, PLearn::AutoLinearRegressor, PLearn::BaseRegressorConfidence, PLearn::BaseRegressorWrapper, PLearn::BasisSelectionRegressor, PLearn::ConstantRegressor, PLearn::CubicSpline, PLearn::GaussianProcessRegressor, PLearn::KernelRidgeRegressor, PLearn::KNNRegressor, PLearn::LinearRegressor, PLearn::LocalMedBoost, PLearn::PLS, PLearn::PruningLinearRegressor, PLearn::RankLearner, PLearn::RegressionTree, PLearn::RegressorFromDistribution, PLearn::WPLS, PLearn::EmbeddedSequentialLearner, PLearn::MovingAverage, PLearn::SequentialLearner, PLearn::SequentialModelSelector, PLearn::EntropyContrast, PLearn::EntropyContrastLearner, PLearn::DiverseComponentAnalysis, PLearn::GaussianContinuum, PLearn::GaussMixLocalProjections, PLearn::Isomap, PLearn::IsomapTangentLearner, PLearn::KernelPCA, PLearn::KernelProjection, PLearn::KMeansClustering, PLearn::KPCATangentLearner, PLearn::LLC, PLearn::LLE, PLearn::NormalizationLearner, PLearn::PCA, PLearn::SpectralClustering, PLearn::TangentLearner, PLearn::TargetEncodingLearner, PLearn::UniformizeLearner, PLearn::DeepFeatureExtractorNNet, PLearn::DeepNonLocalManifoldParzen, PLearn::DenoisingRecurrentNet, PLearn::MoleculeTemplateLearner, PLearn::TestLearner, PLearn::DiscriminativeDeepBeliefNet, PLearn::DiscriminativeRBM, PLearn::DynamicallyLinkedRBMsModel, PLearn::FeatureSetSequentialCRF, PLearn::LinearInductiveTransferClassifier, PLearn::ManifoldKNNDistribution, PLearn::ManifoldParzen, PLearn::NxProfileLearner, PLearn::NeuralProbabilisticLanguageModel, PLearn::NnlmOnlineLearner, PLearn::PseudolikelihoodRBM, PLearn::RankingFromKernel, PLearn::StackedFocusedAutoassociatorsNet, PLearn::StackedSVDNet, PLearn::StructuralLearner, PLearn::SurfaceTemplateLearner, and PLearn::TopDownAsymetricDeepNetwork.

Definition at line 107 of file PLearner.cc.

Referenced by PLearn::StackedAutoassociatorsNet::declareMethods(), PLearn::PDistribution::declareMethods(), PLearn::EmbeddedLearner::declareMethods(), PLearn::DiverseComponentAnalysis::declareMethods(), PLearn::DeepReconstructorNet::declareMethods(), and PLearn::DeepBeliefNet::declareMethods().

Here is the caller graph for this function:

bool PLearn::PLearner::_isa_ ( const Object o) [static]

Reimplemented from PLearn::Object.

Reimplemented in PLearn::AnalyzeDond2DiscreteVariables, PLearn::AnalyzeFieldStats, PLearn::CheckDond2FileSequence, PLearn::ComputeDond2Target, PLearn::ComputePurenneError, PLearn::DichotomizeDond2DiscreteVariables, PLearn::Experimentation, PLearn::FixDond2BinaryVariables, PLearn::MergeDond2Files, PLearn::NeighborhoodConditionalMean, PLearn::Preprocessing, PLearn::SecondIterationWrapper, PLearn::StabilisationLearner, PLearn::TestImputations, PLearn::BinaryStump, PLearn::ClassifierFromConditionalPDistribution, PLearn::ClassifierFromDensity, PLearn::KFoldLogisticClassifier, PLearn::LocalGaussianClassifier, PLearn::FeatureSetNaiveBayesClassifier, PLearn::KNNClassifier, PLearn::MultiInstanceNNet, PLearn::SVMClassificationTorch, PLearn::ToBagClassifier, PLearn::ConditionalDensityNet, PLearn::GaussianContinuumDistribution, PLearn::GaussianProcessRegressor, PLearn::PConditionalDistribution, PLearn::LocallyMagnifiedDistribution, PLearn::NeighborhoodBoxVolumeDensityEstimator, PLearn::TransformationLearner, PLearn::GaussianDistribution, PLearn::GaussMix, PLearn::HistogramDistribution, PLearn::KernelDensityEstimator, PLearn::ManifoldParzen2, PLearn::MixtureDistribution, PLearn::NGramDistribution, PLearn::NonLocalManifoldParzen, PLearn::ParzenWindow, PLearn::PDistribution, PLearn::RandomGaussMix, PLearn::RBMDistribution, PLearn::SpiralDistribution, PLearn::UnconditionalDistribution, PLearn::UniformDistribution, PLearn::AddCostToLearner, PLearn::AddLayersNNet, PLearn::BestAveragingPLearner, PLearn::ChainedLearners, PLearn::DeepNNet, PLearn::DistRepNNet, PLearn::EmbeddedLearner, PLearn::DeepReconstructorNet, PLearn::mNNet, PLearn::NatGradNNet, PLearn::NatGradSMPNNet, PLearn::PvGradNNet, PLearn::FeatureSetNNet, PLearn::HorizonStatefulLearner, PLearn::IdentityPLearner, PLearn::IncrementalNNet, PLearn::NeighborhoodSmoothnessNNet, PLearn::NNet, PLearn::PythonProcessedLearner, PLearn::SelectInputSubsetLearner, PLearn::StackedLearner, PLearn::StatefulLearner, PLearn::TestingLearner, PLearn::TorchLearner, PLearn::TransformOutputLearner, PLearn::VPLCombinedLearner, PLearn::VPLPreprocessedLearner, PLearn::VPLPreprocessedLearner2, PLearn::VPLProcessor, PLearn::HyperLearner, PLearn::AdaBoost, PLearn::BaggingLearner, PLearn::CompareLearner, PLearn::MultiClassAdaBoost, PLearn::PrecomputedProcessedLearner, PLearn::VariableSelectionWithDirectedGradientDescent, PLearn::BallTreeNearestNeighbors, PLearn::ExhaustiveNearestNeighbors, PLearn::GenericNearestNeighbors, PLearn::DeepBeliefNet, PLearn::GaussianDBNClassification, PLearn::GaussianDBNRegression, PLearn::GaussPartSupervisedDBN, PLearn::HintonDeepBeliefNet, PLearn::PartSupervisedDBN, PLearn::StackedModulesLearner, PLearn::SupervisedDBN, PLearn::UnfrozenDeepBeliefNet, PLearn::SemiSupervisedDBN, PLearn::SubsamplingDBN, PLearn::ModuleLearner, PLearn::ModulesLearner, PLearn::StackedAutoassociatorsNet, PLearn::AutoLinearRegressor, PLearn::BaseRegressorConfidence, PLearn::BaseRegressorWrapper, PLearn::BasisSelectionRegressor, PLearn::ConstantRegressor, PLearn::CubicSpline, PLearn::GaussianProcessRegressor, PLearn::KernelRidgeRegressor, PLearn::KNNRegressor, PLearn::LinearRegressor, PLearn::LocalMedBoost, PLearn::PLS, PLearn::PruningLinearRegressor, PLearn::RankLearner, PLearn::RegressionTree, PLearn::RegressorFromDistribution, PLearn::WPLS, PLearn::EmbeddedSequentialLearner, PLearn::MovingAverage, PLearn::SequentialLearner, PLearn::SequentialModelSelector, PLearn::EntropyContrast, PLearn::EntropyContrastLearner, PLearn::DiverseComponentAnalysis, PLearn::GaussianContinuum, PLearn::GaussMixLocalProjections, PLearn::Isomap, PLearn::IsomapTangentLearner, PLearn::KernelPCA, PLearn::KernelProjection, PLearn::KMeansClustering, PLearn::KPCATangentLearner, PLearn::LLC, PLearn::LLE, PLearn::NormalizationLearner, PLearn::PCA, PLearn::SpectralClustering, PLearn::TangentLearner, PLearn::TargetEncodingLearner, PLearn::UniformizeLearner, PLearn::DeepFeatureExtractorNNet, PLearn::DeepNonLocalManifoldParzen, PLearn::DenoisingRecurrentNet, PLearn::MoleculeTemplateLearner, PLearn::TestLearner, PLearn::DiscriminativeDeepBeliefNet, PLearn::DiscriminativeRBM, PLearn::DynamicallyLinkedRBMsModel, PLearn::FeatureSetSequentialCRF, PLearn::LinearInductiveTransferClassifier, PLearn::ManifoldKNNDistribution, PLearn::ManifoldParzen, PLearn::NxProfileLearner, PLearn::NeuralProbabilisticLanguageModel, PLearn::NnlmOnlineLearner, PLearn::PseudolikelihoodRBM, PLearn::RankingFromKernel, PLearn::StackedFocusedAutoassociatorsNet, PLearn::StackedSVDNet, PLearn::StructuralLearner, PLearn::SurfaceTemplateLearner, and PLearn::TopDownAsymetricDeepNetwork.

Definition at line 107 of file PLearner.cc.

StaticInitializer PLearner::_static_initializer_ & PLearn::PLearner::_static_initialize_ ( ) [static]

Reimplemented from PLearn::Object.

Reimplemented in PLearn::AnalyzeDond2DiscreteVariables, PLearn::AnalyzeFieldStats, PLearn::CheckDond2FileSequence, PLearn::ComputeDond2Target, PLearn::ComputePurenneError, PLearn::DichotomizeDond2DiscreteVariables, PLearn::Experimentation, PLearn::FixDond2BinaryVariables, PLearn::MergeDond2Files, PLearn::NeighborhoodConditionalMean, PLearn::Preprocessing, PLearn::SecondIterationWrapper, PLearn::StabilisationLearner, PLearn::TestImputations, PLearn::BinaryStump, PLearn::ClassifierFromConditionalPDistribution, PLearn::ClassifierFromDensity, PLearn::KFoldLogisticClassifier, PLearn::LocalGaussianClassifier, PLearn::FeatureSetNaiveBayesClassifier, PLearn::KNNClassifier, PLearn::MultiInstanceNNet, PLearn::SVMClassificationTorch, PLearn::ToBagClassifier, PLearn::ConditionalDensityNet, PLearn::GaussianContinuumDistribution, PLearn::GaussianProcessRegressor, PLearn::PConditionalDistribution, PLearn::LocallyMagnifiedDistribution, PLearn::NeighborhoodBoxVolumeDensityEstimator, PLearn::TransformationLearner, PLearn::GaussianDistribution, PLearn::GaussMix, PLearn::HistogramDistribution, PLearn::KernelDensityEstimator, PLearn::ManifoldParzen2, PLearn::MixtureDistribution, PLearn::NGramDistribution, PLearn::NonLocalManifoldParzen, PLearn::ParzenWindow, PLearn::PDistribution, PLearn::RandomGaussMix, PLearn::RBMDistribution, PLearn::SpiralDistribution, PLearn::UnconditionalDistribution, PLearn::UniformDistribution, PLearn::AddCostToLearner, PLearn::AddLayersNNet, PLearn::BestAveragingPLearner, PLearn::ChainedLearners, PLearn::DeepNNet, PLearn::DistRepNNet, PLearn::EmbeddedLearner, PLearn::DeepReconstructorNet, PLearn::mNNet, PLearn::NatGradNNet, PLearn::NatGradSMPNNet, PLearn::PvGradNNet, PLearn::FeatureSetNNet, PLearn::HorizonStatefulLearner, PLearn::IdentityPLearner, PLearn::IncrementalNNet, PLearn::NeighborhoodSmoothnessNNet, PLearn::NNet, PLearn::PythonProcessedLearner, PLearn::SelectInputSubsetLearner, PLearn::StackedLearner, PLearn::StatefulLearner, PLearn::TestingLearner, PLearn::TorchLearner, PLearn::TransformOutputLearner, PLearn::VPLCombinedLearner, PLearn::VPLPreprocessedLearner, PLearn::VPLPreprocessedLearner2, PLearn::VPLProcessor, PLearn::HyperLearner, PLearn::AdaBoost, PLearn::BaggingLearner, PLearn::CompareLearner, PLearn::MultiClassAdaBoost, PLearn::PrecomputedProcessedLearner, PLearn::VariableSelectionWithDirectedGradientDescent, PLearn::BallTreeNearestNeighbors, PLearn::ExhaustiveNearestNeighbors, PLearn::GenericNearestNeighbors, PLearn::DeepBeliefNet, PLearn::GaussianDBNClassification, PLearn::GaussianDBNRegression, PLearn::GaussPartSupervisedDBN, PLearn::HintonDeepBeliefNet, PLearn::PartSupervisedDBN, PLearn::StackedModulesLearner, PLearn::SupervisedDBN, PLearn::UnfrozenDeepBeliefNet, PLearn::SemiSupervisedDBN, PLearn::SubsamplingDBN, PLearn::ModuleLearner, PLearn::ModulesLearner, PLearn::StackedAutoassociatorsNet, PLearn::AutoLinearRegressor, PLearn::BaseRegressorConfidence, PLearn::BaseRegressorWrapper, PLearn::BasisSelectionRegressor, PLearn::ConstantRegressor, PLearn::CubicSpline, PLearn::GaussianProcessRegressor, PLearn::KernelRidgeRegressor, PLearn::KNNRegressor, PLearn::LinearRegressor, PLearn::LocalMedBoost, PLearn::PLS, PLearn::PruningLinearRegressor, PLearn::RankLearner, PLearn::RegressionTree, PLearn::RegressorFromDistribution, PLearn::WPLS, PLearn::EmbeddedSequentialLearner, PLearn::MovingAverage, PLearn::SequentialLearner, PLearn::SequentialModelSelector, PLearn::EntropyContrast, PLearn::EntropyContrastLearner, PLearn::DiverseComponentAnalysis, PLearn::GaussianContinuum, PLearn::GaussMixLocalProjections, PLearn::Isomap, PLearn::IsomapTangentLearner, PLearn::KernelPCA, PLearn::KernelProjection, PLearn::KMeansClustering, PLearn::KPCATangentLearner, PLearn::LLC, PLearn::LLE, PLearn::NormalizationLearner, PLearn::PCA, PLearn::SpectralClustering, PLearn::TangentLearner, PLearn::TargetEncodingLearner, PLearn::UniformizeLearner, PLearn::DeepFeatureExtractorNNet, PLearn::DeepNonLocalManifoldParzen, PLearn::DenoisingRecurrentNet, PLearn::MoleculeTemplateLearner, PLearn::TestLearner, PLearn::DiscriminativeDeepBeliefNet, PLearn::DiscriminativeRBM, PLearn::DynamicallyLinkedRBMsModel, PLearn::FeatureSetSequentialCRF, PLearn::LinearInductiveTransferClassifier, PLearn::ManifoldKNNDistribution, PLearn::ManifoldParzen, PLearn::NxProfileLearner, PLearn::NeuralProbabilisticLanguageModel, PLearn::NnlmOnlineLearner, PLearn::PseudolikelihoodRBM, PLearn::RankingFromKernel, PLearn::StackedFocusedAutoassociatorsNet, PLearn::StackedSVDNet, PLearn::StructuralLearner, PLearn::SurfaceTemplateLearner, and PLearn::TopDownAsymetricDeepNetwork.

Definition at line 107 of file PLearner.cc.

void PLearn::PLearner::batchComputeOutputAndConfidence ( VMat  inputs,
real  probability,
VMat  outputs_and_confidence 
) const [virtual]

Repeatedly calls computeOutput and computeConfidenceFromOutput with the rows of inputs.

Writes outputs_and_confidence rows (as a series of triples (output, low, high), one for each output)

Reimplemented in PLearn::FeatureSetNaiveBayesClassifier, PLearn::FeatureSetNNet, PLearn::FeatureSetSequentialCRF, and PLearn::NeuralProbabilisticLanguageModel.

Definition at line 798 of file PLearner.cc.

References computeConfidenceFromOutput(), computeOutput(), PLearn::TVec< T >::first(), i, inputsize(), j, PLearn::VMat::length(), and outputsize().

Referenced by PLearn::NeuralProbabilisticLanguageModel::batchComputeOutputAndConfidence(), PLearn::FeatureSetNNet::batchComputeOutputAndConfidence(), PLearn::FeatureSetNaiveBayesClassifier::batchComputeOutputAndConfidence(), PLearn::FeatureSetSequentialCRF::batchComputeOutputAndConfidence(), and remote_batchComputeOutputAndConfidence().

{
    Vec input(inputsize());
    Vec output(outputsize());
    int outsize = outputsize();
    Vec output_and_confidence(3*outsize);
    TVec< pair<real,real> > intervals;
    int l = inputs.length();
    for(int i=0; i<l; i++)
    {
        inputs->getRow(i,input);
        computeOutput(input,output);
        computeConfidenceFromOutput(input,output,probability,intervals);
        for(int j=0; j<outsize; j++)
        {
            output_and_confidence[3*j] = output[j];
            output_and_confidence[3*j+1] = intervals[j].first;
            output_and_confidence[3*j+2] = intervals[j].second;
        }
        outputs_and_confidence->putOrAppendRow(i,output_and_confidence);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::PLearner::build ( ) [virtual]

Finish building the object; just call inherited::build followed by build_()

Reimplemented from PLearn::Object.

Reimplemented in PLearn::AnalyzeDond2DiscreteVariables, PLearn::AnalyzeFieldStats, PLearn::CheckDond2FileSequence, PLearn::ComputeDond2Target, PLearn::ComputePurenneError, PLearn::DichotomizeDond2DiscreteVariables, PLearn::Experimentation, PLearn::FixDond2BinaryVariables, PLearn::MergeDond2Files, PLearn::NeighborhoodConditionalMean, PLearn::Preprocessing, PLearn::SecondIterationWrapper, PLearn::StabilisationLearner, PLearn::TestImputations, PLearn::BinaryStump, PLearn::ClassifierFromConditionalPDistribution, PLearn::ClassifierFromDensity, PLearn::KFoldLogisticClassifier, PLearn::LocalGaussianClassifier, PLearn::FeatureSetNaiveBayesClassifier, PLearn::KNNClassifier, PLearn::MultiInstanceNNet, PLearn::SVMClassificationTorch, PLearn::ToBagClassifier, PLearn::ConditionalDensityNet, PLearn::GaussianContinuumDistribution, PLearn::GaussianProcessRegressor, PLearn::PConditionalDistribution, PLearn::LocallyMagnifiedDistribution, PLearn::NeighborhoodBoxVolumeDensityEstimator, PLearn::TransformationLearner, PLearn::GaussianDistribution, PLearn::GaussMix, PLearn::HistogramDistribution, PLearn::KernelDensityEstimator, PLearn::ManifoldParzen2, PLearn::MixtureDistribution, PLearn::NGramDistribution, PLearn::NonLocalManifoldParzen, PLearn::ParzenWindow, PLearn::PDistribution, PLearn::RandomGaussMix, PLearn::RBMDistribution, PLearn::SpiralDistribution, PLearn::UnconditionalDistribution, PLearn::UniformDistribution, PLearn::AddCostToLearner, PLearn::AddLayersNNet, PLearn::BestAveragingPLearner, PLearn::ChainedLearners, PLearn::DeepNNet, PLearn::DistRepNNet, PLearn::EmbeddedLearner, PLearn::DeepReconstructorNet, PLearn::mNNet, PLearn::NatGradNNet, PLearn::NatGradSMPNNet, PLearn::PvGradNNet, PLearn::FeatureSetNNet, PLearn::HorizonStatefulLearner, PLearn::IncrementalNNet, PLearn::NeighborhoodSmoothnessNNet, PLearn::NNet, PLearn::PythonProcessedLearner, PLearn::SelectInputSubsetLearner, PLearn::StackedLearner, PLearn::StatefulLearner, PLearn::TestingLearner, PLearn::TorchLearner, PLearn::TransformOutputLearner, PLearn::VPLCombinedLearner, PLearn::VPLPreprocessedLearner, PLearn::VPLPreprocessedLearner2, PLearn::VPLProcessor, PLearn::HyperLearner, PLearn::AdaBoost, PLearn::BaggingLearner, PLearn::CompareLearner, PLearn::MultiClassAdaBoost, PLearn::PrecomputedProcessedLearner, PLearn::VariableSelectionWithDirectedGradientDescent, PLearn::BallTreeNearestNeighbors, PLearn::ExhaustiveNearestNeighbors, PLearn::GenericNearestNeighbors, PLearn::DeepBeliefNet, PLearn::GaussianDBNClassification, PLearn::GaussianDBNRegression, PLearn::GaussPartSupervisedDBN, PLearn::HintonDeepBeliefNet, PLearn::PartSupervisedDBN, PLearn::StackedModulesLearner, PLearn::SupervisedDBN, PLearn::UnfrozenDeepBeliefNet, PLearn::SemiSupervisedDBN, PLearn::SubsamplingDBN, PLearn::ModuleLearner, PLearn::ModulesLearner, PLearn::StackedAutoassociatorsNet, PLearn::AutoLinearRegressor, PLearn::BaseRegressorConfidence, PLearn::BaseRegressorWrapper, PLearn::BasisSelectionRegressor, PLearn::ConstantRegressor, PLearn::CubicSpline, PLearn::GaussianProcessRegressor, PLearn::KernelRidgeRegressor, PLearn::KNNRegressor, PLearn::LinearRegressor, PLearn::LocalMedBoost, PLearn::PLS, PLearn::PruningLinearRegressor, PLearn::RankLearner, PLearn::RegressionTree, PLearn::RegressorFromDistribution, PLearn::WPLS, PLearn::EmbeddedSequentialLearner, PLearn::MovingAverage, PLearn::SequentialLearner, PLearn::SequentialModelSelector, PLearn::EntropyContrast, PLearn::EntropyContrastLearner, PLearn::DiverseComponentAnalysis, PLearn::GaussianContinuum, PLearn::GaussMixLocalProjections, PLearn::Isomap, PLearn::IsomapTangentLearner, PLearn::KernelPCA, PLearn::KernelProjection, PLearn::KMeansClustering, PLearn::KPCATangentLearner, PLearn::LLC, PLearn::LLE, PLearn::NormalizationLearner, PLearn::PCA, PLearn::SpectralClustering, PLearn::TangentLearner, PLearn::TargetEncodingLearner, PLearn::UniformizeLearner, PLearn::DeepFeatureExtractorNNet, PLearn::DeepNonLocalManifoldParzen, PLearn::DenoisingRecurrentNet, PLearn::MoleculeTemplateLearner, PLearn::TestLearner, PLearn::DiscriminativeDeepBeliefNet, PLearn::DiscriminativeRBM, PLearn::DynamicallyLinkedRBMsModel, PLearn::FeatureSetSequentialCRF, PLearn::LinearInductiveTransferClassifier, PLearn::ManifoldKNNDistribution, PLearn::ManifoldParzen, PLearn::NxProfileLearner, PLearn::NeuralProbabilisticLanguageModel, PLearn::NnlmOnlineLearner, PLearn::PseudolikelihoodRBM, PLearn::RankingFromKernel, PLearn::StackedFocusedAutoassociatorsNet, PLearn::StackedSVDNet, PLearn::StructuralLearner, PLearn::SurfaceTemplateLearner, and PLearn::TopDownAsymetricDeepNetwork.

Definition at line 659 of file PLearner.cc.

References PLearn::Object::build(), and build_().

Referenced by PLearn::WPLS::build(), PLearn::VPLProcessor::build(), PLearn::VPLPreprocessedLearner2::build(), PLearn::VPLPreprocessedLearner::build(), PLearn::VPLCombinedLearner::build(), PLearn::VariableSelectionWithDirectedGradientDescent::build(), PLearn::UniformizeLearner::build(), PLearn::TorchLearner::build(), PLearn::TopDownAsymetricDeepNetwork::build(), PLearn::TargetEncodingLearner::build(), PLearn::TangentLearner::build(), PLearn::SubsamplingDBN::build(), PLearn::StatefulLearner::build(), PLearn::StackedSVDNet::build(), PLearn::StackedModulesLearner::build(), PLearn::StackedLearner::build(), PLearn::StackedFocusedAutoassociatorsNet::build(), PLearn::StackedAutoassociatorsNet::build(), PLearn::StabilisationLearner::build(), PLearn::SequentialLearner::build(), PLearn::SemiSupervisedDBN::build(), PLearn::SecondIterationWrapper::build(), PLearn::RegressionTree::build(), PLearn::PythonProcessedLearner::build(), PLearn::PseudolikelihoodRBM::build(), PLearn::PrecomputedProcessedLearner::build(), PLearn::PLS::build(), PLearn::PDistribution::build(), PLearn::PCA::build(), PLearn::NxProfileLearner::build(), PLearn::NormalizationLearner::build(), PLearn::NnlmOnlineLearner::build(), PLearn::NNet::build(), PLearn::NeuralProbabilisticLanguageModel::build(), PLearn::NeighborhoodSmoothnessNNet::build(), PLearn::NatGradSMPNNet::build(), PLearn::NatGradNNet::build(), PLearn::MultiInstanceNNet::build(), PLearn::MultiClassAdaBoost::build(), PLearn::MoleculeTemplateLearner::build(), PLearn::ModulesLearner::build(), PLearn::ModuleLearner::build(), PLearn::mNNet::build(), PLearn::ManifoldParzen::build(), PLearn::LocalMedBoost::build(), PLearn::LocalGaussianClassifier::build(), PLearn::LLC::build(), PLearn::LinearRegressor::build(), PLearn::LinearInductiveTransferClassifier::build(), PLearn::KPCATangentLearner::build(), PLearn::KNNRegressor::build(), PLearn::KNNClassifier::build(), PLearn::KMeansClustering::build(), PLearn::KFoldLogisticClassifier::build(), PLearn::KernelRidgeRegressor::build(), PLearn::KernelProjection::build(), PLearn::IsomapTangentLearner::build(), PLearn::IncrementalNNet::build(), PLearn::GenericNearestNeighbors::build(), PLearn::GaussianContinuum::build(), PLearn::FeatureSetSequentialCRF::build(), PLearn::FeatureSetNNet::build(), PLearn::FeatureSetNaiveBayesClassifier::build(), PLearn::EntropyContrastLearner::build(), PLearn::EntropyContrast::build(), PLearn::EmbeddedLearner::build(), PLearn::DynamicallyLinkedRBMsModel::build(), PLearn::DiverseComponentAnalysis::build(), PLearn::DistRepNNet::build(), PLearn::DiscriminativeRBM::build(), PLearn::DiscriminativeDeepBeliefNet::build(), PLearn::DenoisingRecurrentNet::build(), PLearn::DeepReconstructorNet::build(), PLearn::DeepNonLocalManifoldParzen::build(), PLearn::DeepNNet::build(), PLearn::DeepFeatureExtractorNNet::build(), PLearn::DeepBeliefNet::build(), PLearn::CubicSpline::build(), PLearn::ConstantRegressor::build(), PLearn::ComputeDond2Target::build(), PLearn::CompareLearner::build(), PLearn::ClassifierFromDensity::build(), PLearn::ClassifierFromConditionalPDistribution::build(), PLearn::BinaryStump::build(), PLearn::BestAveragingPLearner::build(), PLearn::BasisSelectionRegressor::build(), PLearn::BaseRegressorWrapper::build(), PLearn::BaseRegressorConfidence::build(), PLearn::BaggingLearner::build(), PLearn::AutoLinearRegressor::build(), PLearn::AnalyzeFieldStats::build(), PLearn::AdaBoost::build(), and setTrainingSet().

Here is the call graph for this function:

void PLearn::PLearner::build_ ( ) [private]

**** SUBCLASS WRITING: ****

This method should finish building of the object, according to set 'options', in *any* situation.

Typical situations include:

  • Initial building of an object from a few user-specified options
  • Building of a "reloaded" object: i.e. from the complete set of all serialised options.
  • Updating or "re-building" of an object after a few "tuning" options (such as hyper-parameters) have been modified.

You can assume that the parent class' build_() has already been called.

A typical build method will want to know the inputsize(), targetsize() and outputsize(), and may also want to check whether train_set->hasWeights(). All these methods require a train_set to be set, so the first thing you may want to do, is check if(train_set), before doing any heavy building...

Note: build() is always called by setTrainingSet.

Reimplemented from PLearn::Object.

Reimplemented in PLearn::AnalyzeDond2DiscreteVariables, PLearn::AnalyzeFieldStats, PLearn::CheckDond2FileSequence, PLearn::ComputeDond2Target, PLearn::ComputePurenneError, PLearn::DichotomizeDond2DiscreteVariables, PLearn::Experimentation, PLearn::FixDond2BinaryVariables, PLearn::MergeDond2Files, PLearn::NeighborhoodConditionalMean, PLearn::Preprocessing, PLearn::SecondIterationWrapper, PLearn::StabilisationLearner, PLearn::TestImputations, PLearn::BinaryStump, PLearn::ClassifierFromConditionalPDistribution, PLearn::ClassifierFromDensity, PLearn::KFoldLogisticClassifier, PLearn::LocalGaussianClassifier, PLearn::FeatureSetNaiveBayesClassifier, PLearn::KNNClassifier, PLearn::MultiInstanceNNet, PLearn::SVMClassificationTorch, PLearn::ToBagClassifier, PLearn::ConditionalDensityNet, PLearn::GaussianContinuumDistribution, PLearn::GaussianProcessRegressor, PLearn::PConditionalDistribution, PLearn::LocallyMagnifiedDistribution, PLearn::NeighborhoodBoxVolumeDensityEstimator, PLearn::TransformationLearner, PLearn::GaussianDistribution, PLearn::GaussMix, PLearn::HistogramDistribution, PLearn::KernelDensityEstimator, PLearn::ManifoldParzen2, PLearn::MixtureDistribution, PLearn::NGramDistribution, PLearn::NonLocalManifoldParzen, PLearn::ParzenWindow, PLearn::PDistribution, PLearn::RandomGaussMix, PLearn::RBMDistribution, PLearn::SpiralDistribution, PLearn::UnconditionalDistribution, PLearn::UniformDistribution, PLearn::AddCostToLearner, PLearn::AddLayersNNet, PLearn::BestAveragingPLearner, PLearn::ChainedLearners, PLearn::DeepNNet, PLearn::DistRepNNet, PLearn::EmbeddedLearner, PLearn::DeepReconstructorNet, PLearn::mNNet, PLearn::NatGradNNet, PLearn::NatGradSMPNNet, PLearn::PvGradNNet, PLearn::FeatureSetNNet, PLearn::HorizonStatefulLearner, PLearn::IncrementalNNet, PLearn::NeighborhoodSmoothnessNNet, PLearn::NNet, PLearn::PythonProcessedLearner, PLearn::SelectInputSubsetLearner, PLearn::StackedLearner, PLearn::StatefulLearner, PLearn::TestingLearner, PLearn::TorchLearner, PLearn::TransformOutputLearner, PLearn::VPLCombinedLearner, PLearn::VPLPreprocessedLearner, PLearn::VPLPreprocessedLearner2, PLearn::VPLProcessor, PLearn::HyperLearner, PLearn::AdaBoost, PLearn::BaggingLearner, PLearn::CompareLearner, PLearn::MultiClassAdaBoost, PLearn::PrecomputedProcessedLearner, PLearn::VariableSelectionWithDirectedGradientDescent, PLearn::BallTreeNearestNeighbors, PLearn::ExhaustiveNearestNeighbors, PLearn::GenericNearestNeighbors, PLearn::DeepBeliefNet, PLearn::GaussianDBNClassification, PLearn::GaussianDBNRegression, PLearn::GaussPartSupervisedDBN, PLearn::HintonDeepBeliefNet, PLearn::PartSupervisedDBN, PLearn::StackedModulesLearner, PLearn::SupervisedDBN, PLearn::UnfrozenDeepBeliefNet, PLearn::SemiSupervisedDBN, PLearn::SubsamplingDBN, PLearn::ModuleLearner, PLearn::ModulesLearner, PLearn::StackedAutoassociatorsNet, PLearn::AutoLinearRegressor, PLearn::BaseRegressorConfidence, PLearn::BaseRegressorWrapper, PLearn::BasisSelectionRegressor, PLearn::ConstantRegressor, PLearn::CubicSpline, PLearn::GaussianProcessRegressor, PLearn::KernelRidgeRegressor, PLearn::KNNRegressor, PLearn::LinearRegressor, PLearn::LocalMedBoost, PLearn::PLS, PLearn::PruningLinearRegressor, PLearn::RankLearner, PLearn::RegressionTree, PLearn::RegressorFromDistribution, PLearn::WPLS, PLearn::EmbeddedSequentialLearner, PLearn::MovingAverage, PLearn::SequentialLearner, PLearn::SequentialModelSelector, PLearn::EntropyContrast, PLearn::EntropyContrastLearner, PLearn::DiverseComponentAnalysis, PLearn::GaussianContinuum, PLearn::GaussMixLocalProjections, PLearn::Isomap, PLearn::IsomapTangentLearner, PLearn::KernelPCA, PLearn::KernelProjection, PLearn::KMeansClustering, PLearn::KPCATangentLearner, PLearn::LLC, PLearn::LLE, PLearn::NormalizationLearner, PLearn::PCA, PLearn::SpectralClustering, PLearn::TangentLearner, PLearn::TargetEncodingLearner, PLearn::UniformizeLearner, PLearn::DeepFeatureExtractorNNet, PLearn::DeepNonLocalManifoldParzen, PLearn::DenoisingRecurrentNet, PLearn::MoleculeTemplateLearner, PLearn::TestLearner, PLearn::DiscriminativeDeepBeliefNet, PLearn::DiscriminativeRBM, PLearn::DynamicallyLinkedRBMsModel, PLearn::FeatureSetSequentialCRF, PLearn::LinearInductiveTransferClassifier, PLearn::ManifoldKNNDistribution, PLearn::ManifoldParzen, PLearn::NxProfileLearner, PLearn::NeuralProbabilisticLanguageModel, PLearn::NnlmOnlineLearner, PLearn::PseudolikelihoodRBM, PLearn::RankingFromKernel, PLearn::StackedFocusedAutoassociatorsNet, PLearn::StackedSVDNet, PLearn::StructuralLearner, PLearn::SurfaceTemplateLearner, and PLearn::TopDownAsymetricDeepNetwork.

Definition at line 643 of file PLearner.cc.

References PLearn::PPath::absolute(), expdir, PLearn::force_mkdir(), PLWARNING, random_gen, and seed_.

Referenced by build().

{
    if(expdir!="")
    {
        if(!force_mkdir(expdir))
            PLWARNING("In PLearner Could not create experiment directory %s",expdir.c_str());
        else
            expdir = expdir.absolute() / "";
    }
    if (random_gen && seed_ != 0)
        random_gen->manual_seed(seed_);
}

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void PLearn::PLearner::build_from_train_set ( ) [inline, protected, virtual]

Building part of the PLearner that needs the train_set.

Definition at line 336 of file PLearner.h.

{ }
bool PLearn::PLearner::computeConfidenceFromOutput ( const Vec input,
const Vec output,
real  probability,
TVec< pair< real, real > > &  intervals 
) const [virtual]

Compute a confidence intervals for the output, given the input and the pre-computed output (resulting from computeOutput or similar).

The probability level of the confidence interval must be specified. (e.g. 0.95). Result is stored in a TVec of pairs low:high for each output variable (this is a "box" interval; it does not account for correlations among the output variables).

If the interval can be computed, the function returns TRUE; otherwise (i.e. interval computation is not available), it returns FALSE. The default implementation in PLearner is to return FALSE (with missing values in the returned intervals).

Reimplemented in PLearn::EmbeddedLearner, PLearn::StackedLearner, PLearn::VPLPreprocessedLearner, PLearn::VPLPreprocessedLearner2, PLearn::GaussianProcessRegressor, PLearn::KNNRegressor, PLearn::LinearRegressor, and PLearn::PLS.

Definition at line 741 of file PLearner.cc.

References MISSING_VALUE, and PLearn::TVec< T >::size().

Referenced by batchComputeOutputAndConfidence(), computeInputOutputConfMat(), computeOutputConfMat(), computeOutputCovMat(), and remote_computeConfidenceFromOutput().

{
    // Default version does not know how to compute confidence intervals
    intervals.resize(output.size());
    intervals.fill(std::make_pair(MISSING_VALUE,MISSING_VALUE));  
    return false;
}

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void PLearn::PLearner::computeCostsFromOutputs ( const Vec input,
const Vec output,
const Vec target,
Vec costs 
) const [pure virtual]

*** SUBCLASS WRITING: ***

This should be defined in subclasses to compute the weighted costs from already computed output. The costs should correspond to the cost names returned by getTestCostNames().

NOTE: In exotic cases, the cost may also depend on some info in the input, that's why the method also gets so see it.

Implemented in PLearn::AnalyzeDond2DiscreteVariables, PLearn::AnalyzeFieldStats, PLearn::CheckDond2FileSequence, PLearn::ComputeDond2Target, PLearn::ComputePurenneError, PLearn::DichotomizeDond2DiscreteVariables, PLearn::Experimentation, PLearn::FixDond2BinaryVariables, PLearn::MergeDond2Files, PLearn::NeighborhoodConditionalMean, PLearn::Preprocessing, PLearn::SecondIterationWrapper, PLearn::StabilisationLearner, PLearn::TestImputations, PLearn::BinaryStump, PLearn::ClassifierFromConditionalPDistribution, PLearn::ClassifierFromDensity, PLearn::KFoldLogisticClassifier, PLearn::LocalGaussianClassifier, PLearn::FeatureSetNaiveBayesClassifier, PLearn::KNNClassifier, PLearn::MultiInstanceNNet, PLearn::SVMClassificationTorch, PLearn::ToBagClassifier, PLearn::GaussianProcessRegressor, PLearn::PDistribution, PLearn::AddCostToLearner, PLearn::BestAveragingPLearner, PLearn::ChainedLearners, PLearn::DeepNNet, PLearn::DistRepNNet, PLearn::EmbeddedLearner, PLearn::DeepReconstructorNet, PLearn::mNNet, PLearn::NatGradNNet, PLearn::NatGradSMPNNet, PLearn::FeatureSetNNet, PLearn::IdentityPLearner, PLearn::IncrementalNNet, PLearn::NeighborhoodSmoothnessNNet, PLearn::NNet, PLearn::PythonProcessedLearner, PLearn::SelectInputSubsetLearner, PLearn::StackedLearner, PLearn::StatefulLearner, PLearn::TestingLearner, PLearn::TorchLearner, PLearn::TransformOutputLearner, PLearn::VPLCombinedLearner, PLearn::VPLPreprocessedLearner, PLearn::VPLPreprocessedLearner2, PLearn::VPLProcessor, PLearn::AdaBoost, PLearn::BaggingLearner, PLearn::CompareLearner, PLearn::MultiClassAdaBoost, PLearn::PrecomputedProcessedLearner, PLearn::VariableSelectionWithDirectedGradientDescent, PLearn::BallTreeNearestNeighbors, PLearn::ExhaustiveNearestNeighbors, PLearn::DeepBeliefNet, PLearn::GaussianDBNClassification, PLearn::GaussianDBNRegression, PLearn::GaussPartSupervisedDBN, PLearn::HintonDeepBeliefNet, PLearn::PartSupervisedDBN, PLearn::StackedModulesLearner, PLearn::SupervisedDBN, PLearn::SemiSupervisedDBN, PLearn::SubsamplingDBN, PLearn::ModuleLearner, PLearn::ModulesLearner, PLearn::StackedAutoassociatorsNet, PLearn::AutoLinearRegressor, PLearn::BaseRegressorConfidence, PLearn::BaseRegressorWrapper, PLearn::BasisSelectionRegressor, PLearn::ConstantRegressor, PLearn::CubicSpline, PLearn::GaussianProcessRegressor, PLearn::KernelRidgeRegressor, PLearn::KNNRegressor, PLearn::LinearRegressor, PLearn::LocalMedBoost, PLearn::PLS, PLearn::RankLearner, PLearn::RegressionTree, PLearn::RegressorFromDistribution, PLearn::WPLS, PLearn::MovingAverage, PLearn::SequentialLearner, PLearn::SequentialModelSelector, PLearn::EntropyContrast, PLearn::EntropyContrastLearner, PLearn::DiverseComponentAnalysis, PLearn::GaussianContinuum, PLearn::GaussMixLocalProjections, PLearn::IsomapTangentLearner, PLearn::KernelProjection, PLearn::KMeansClustering, PLearn::KPCATangentLearner, PLearn::LLC, PLearn::NormalizationLearner, PLearn::PCA, PLearn::TangentLearner, PLearn::TargetEncodingLearner, PLearn::DeepFeatureExtractorNNet, PLearn::DeepNonLocalManifoldParzen, PLearn::DenoisingRecurrentNet, PLearn::MoleculeTemplateLearner, PLearn::TestLearner, PLearn::DiscriminativeDeepBeliefNet, PLearn::DiscriminativeRBM, PLearn::DynamicallyLinkedRBMsModel, PLearn::FeatureSetSequentialCRF, PLearn::LinearInductiveTransferClassifier, PLearn::ManifoldParzen, PLearn::NxProfileLearner, PLearn::NeuralProbabilisticLanguageModel, PLearn::NnlmOnlineLearner, PLearn::PseudolikelihoodRBM, PLearn::RankingFromKernel, PLearn::StackedFocusedAutoassociatorsNet, PLearn::StackedSVDNet, PLearn::StructuralLearner, and PLearn::TopDownAsymetricDeepNetwork.

Referenced by computeOutputAndCosts(), and remote_computeCostsFromOutputs().

Here is the caller graph for this function:

void PLearn::PLearner::computeCostsOnly ( const Vec input,
const Vec target,
Vec costs 
) const [virtual]

Default calls computeOutputAndCosts.

This may be overridden if there is a more efficient way to compute the costs directly, without computing the whole output vector.

Reimplemented in PLearn::GaussianProcessRegressor, PLearn::StatefulLearner, PLearn::SequentialLearner, and PLearn::SequentialModelSelector.

Definition at line 734 of file PLearner.cc.

References computeOutputAndCosts(), outputsize(), PLearn::TVec< T >::resize(), and tmp_output.

Referenced by PLearn::AdaBoost::computeTrainingError(), remote_computeCostsOnly(), and PLearn::GaussianContinuum::train().

{
    tmp_output.resize(outputsize());
    computeOutputAndCosts(input, target, tmp_output, costs);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Mat PLearn::PLearner::computeInputOutputConfMat ( VMat  inputs,
real  probability 
) const

Return a Mat that is the contatenation of inputs, outputs, lower confidence bound, and upper confidence bound.

If confidence intervals cannot be computed for the learner, they are filled with MISSING_VALUE.

Definition at line 1353 of file PLearner.cc.

References computeConfidenceFromOutput(), computeOutput(), PLearn::TVec< T >::first(), i, inputsize(), j, PLearn::VMat::length(), m, MISSING_VALUE, n, outputsize(), PLearn::TVec< T >::size(), and PLearn::TVec< T >::subVec().

Referenced by declareMethods().

{
    int l = inputs.length();
    int nin = inputsize();
    int nout = outputsize();
    Mat m(l, nin+3*nout);
    TVec< pair<real,real> > intervals;
    for(int i=0; i<l; i++)
    {
        Vec v = m(i);
        Vec invec   = v.subVec(0,nin);
        Vec outvec  = v.subVec(nin,nout);
        Vec lowconf = v.subVec(nin+nout, nout);
        Vec hiconf  = v.subVec(nin+2*nout, nout);
        inputs->getRow(i, invec);
        computeOutput(invec, outvec);
        bool conf_avail = computeConfidenceFromOutput(invec, outvec,
                                                      probability, intervals);
        if (conf_avail) {
            for (int j=0, n=intervals.size() ; j<n ; ++j) {
                lowconf[j] = intervals[j].first;
                hiconf[j]  = intervals[j].second;
            }
        }
        else {
            lowconf << MISSING_VALUE;
            hiconf  << MISSING_VALUE;
        }
    }
    return m;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Mat PLearn::PLearner::computeInputOutputMat ( VMat  inputs) const

Returns a Mat that is a concatenation of the inputs and computed outputs.

Definition at line 1333 of file PLearner.cc.

References computeOutput(), i, inputsize(), PLearn::VMat::length(), m, outputsize(), and PLearn::TVec< T >::subVec().

Referenced by declareMethods().

{
    int l = inputs.length();
    int nin = inputsize();
    int nout = outputsize();
    Mat m(l, nin+nout);
    for(int i=0; i<l; i++)
    {
        Vec v = m(i);
        Vec invec = v.subVec(0,nin);
        Vec outvec = v.subVec(nin,nout);
        inputs->getRow(i, invec);
        computeOutput(invec, outvec);
    }
    return m;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::PLearner::computeOutput ( const Vec input,
Vec output 
) const [virtual]

*** SUBCLASS WRITING: ***

This should be defined in subclasses to compute the output from the input.

Reimplemented in PLearn::AnalyzeDond2DiscreteVariables, PLearn::AnalyzeFieldStats, PLearn::CheckDond2FileSequence, PLearn::ComputeDond2Target, PLearn::ComputePurenneError, PLearn::DichotomizeDond2DiscreteVariables, PLearn::Experimentation, PLearn::FixDond2BinaryVariables, PLearn::MergeDond2Files, PLearn::NeighborhoodConditionalMean, PLearn::Preprocessing, PLearn::SecondIterationWrapper, PLearn::StabilisationLearner, PLearn::TestImputations, PLearn::BinaryStump, PLearn::ClassifierFromConditionalPDistribution, PLearn::ClassifierFromDensity, PLearn::KFoldLogisticClassifier, PLearn::LocalGaussianClassifier, PLearn::FeatureSetNaiveBayesClassifier, PLearn::KNNClassifier, PLearn::MultiInstanceNNet, PLearn::SVMClassificationTorch, PLearn::GaussianContinuumDistribution, PLearn::GaussianProcessRegressor, PLearn::PConditionalDistribution, PLearn::ManifoldParzen2, PLearn::NonLocalManifoldParzen, PLearn::PDistribution, PLearn::BestAveragingPLearner, PLearn::ChainedLearners, PLearn::DeepNNet, PLearn::DistRepNNet, PLearn::EmbeddedLearner, PLearn::DeepReconstructorNet, PLearn::mNNet, PLearn::NatGradNNet, PLearn::NatGradSMPNNet, PLearn::FeatureSetNNet, PLearn::IdentityPLearner, PLearn::IncrementalNNet, PLearn::NeighborhoodSmoothnessNNet, PLearn::NNet, PLearn::PythonProcessedLearner, PLearn::SelectInputSubsetLearner, PLearn::StackedLearner, PLearn::StatefulLearner, PLearn::TestingLearner, PLearn::TorchLearner, PLearn::TransformOutputLearner, PLearn::VPLCombinedLearner, PLearn::VPLPreprocessedLearner, PLearn::VPLPreprocessedLearner2, PLearn::VPLProcessor, PLearn::AdaBoost, PLearn::BaggingLearner, PLearn::CompareLearner, PLearn::MultiClassAdaBoost, PLearn::PrecomputedProcessedLearner, PLearn::VariableSelectionWithDirectedGradientDescent, PLearn::BallTreeNearestNeighbors, PLearn::ExhaustiveNearestNeighbors, PLearn::DeepBeliefNet, PLearn::StackedModulesLearner, PLearn::SemiSupervisedDBN, PLearn::SubsamplingDBN, PLearn::ModuleLearner, PLearn::ModulesLearner, PLearn::StackedAutoassociatorsNet, PLearn::AutoLinearRegressor, PLearn::BaseRegressorConfidence, PLearn::BaseRegressorWrapper, PLearn::BasisSelectionRegressor, PLearn::ConstantRegressor, PLearn::CubicSpline, PLearn::GaussianProcessRegressor, PLearn::KernelRidgeRegressor, PLearn::KNNRegressor, PLearn::LinearRegressor, PLearn::LocalMedBoost, PLearn::PLS, PLearn::PruningLinearRegressor, PLearn::RankLearner, PLearn::RegressionTree, PLearn::RegressorFromDistribution, PLearn::WPLS, PLearn::SequentialLearner, PLearn::SequentialModelSelector, PLearn::EntropyContrast, PLearn::EntropyContrastLearner, PLearn::DiverseComponentAnalysis, PLearn::GaussianContinuum, PLearn::GaussMixLocalProjections, PLearn::IsomapTangentLearner, PLearn::KernelProjection, PLearn::KMeansClustering, PLearn::KPCATangentLearner, PLearn::LLC, PLearn::NormalizationLearner, PLearn::PCA, PLearn::TangentLearner, PLearn::TargetEncodingLearner, PLearn::DeepFeatureExtractorNNet, PLearn::DeepNonLocalManifoldParzen, PLearn::DenoisingRecurrentNet, PLearn::MoleculeTemplateLearner, PLearn::TestLearner, PLearn::DiscriminativeDeepBeliefNet, PLearn::DiscriminativeRBM, PLearn::DynamicallyLinkedRBMsModel, PLearn::FeatureSetSequentialCRF, PLearn::LinearInductiveTransferClassifier, PLearn::ManifoldParzen, PLearn::NxProfileLearner, PLearn::NeuralProbabilisticLanguageModel, PLearn::NnlmOnlineLearner, PLearn::PseudolikelihoodRBM, PLearn::RankingFromKernel, PLearn::StackedFocusedAutoassociatorsNet, PLearn::StackedSVDNet, PLearn::StructuralLearner, and PLearn::TopDownAsymetricDeepNetwork.

Definition at line 1191 of file PLearner.cc.

References PLearn::Object::classname(), and PLERROR.

Referenced by batchComputeOutputAndConfidence(), computeInputOutputConfMat(), computeInputOutputMat(), computeOutputAndCosts(), computeOutputConfMat(), computeOutputCovMat(), computeOutputs(), remote_computeOutput(), and use().

{
    PLERROR("PLearner::computeOutput(Vec,Vec) not implemented in subclass %s\n",classname().c_str());
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::PLearner::computeOutputAndCosts ( const Vec input,
const Vec target,
Vec output,
Vec costs 
) const [virtual]

Default calls computeOutput and computeCostsFromOutputs.

You may override this if you have a more efficient way to compute both output and weighted costs at the same time.

Reimplemented in PLearn::ComputePurenneError, PLearn::SecondIterationWrapper, PLearn::FeatureSetNaiveBayesClassifier, PLearn::MultiInstanceNNet, PLearn::ToBagClassifier, PLearn::GaussianProcessRegressor, PLearn::AddCostToLearner, PLearn::DistRepNNet, PLearn::EmbeddedLearner, PLearn::FeatureSetNNet, PLearn::NeighborhoodSmoothnessNNet, PLearn::NNet, PLearn::SelectInputSubsetLearner, PLearn::StatefulLearner, PLearn::TransformOutputLearner, PLearn::VPLCombinedLearner, PLearn::VPLPreprocessedLearner, PLearn::VPLPreprocessedLearner2, PLearn::VPLProcessor, PLearn::AdaBoost, PLearn::MultiClassAdaBoost, PLearn::BallTreeNearestNeighbors, PLearn::ExhaustiveNearestNeighbors, PLearn::ModuleLearner, PLearn::BaseRegressorConfidence, PLearn::BaseRegressorWrapper, PLearn::LocalMedBoost, PLearn::RankLearner, PLearn::RegressionTree, PLearn::SequentialLearner, PLearn::SequentialModelSelector, PLearn::GaussMixLocalProjections, PLearn::DeepFeatureExtractorNNet, PLearn::MoleculeTemplateLearner, PLearn::FeatureSetSequentialCRF, PLearn::LinearInductiveTransferClassifier, and PLearn::NeuralProbabilisticLanguageModel.

Definition at line 727 of file PLearner.cc.

References computeCostsFromOutputs(), and computeOutput().

Referenced by computeCostsOnly(), PLearn::RankLearner::computeOutputAndCosts(), computeOutputsAndCosts(), remote_computeOutputAndCosts(), test(), PLearn::NnlmOnlineLearner::test(), and PLearn::StackedModulesLearner::train().

{
    computeOutput(input, output);
    computeCostsFromOutputs(input, output, target, costs);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Mat PLearn::PLearner::computeOutputConfMat ( VMat  inputs,
real  probability 
) const

Return a Mat that is the contatenation of outputs, lower confidence bound, and upper confidence bound.

If confidence intervals cannot be computed for the learner, they are filled with MISSING_VALUE.

Definition at line 1388 of file PLearner.cc.

References computeConfidenceFromOutput(), computeOutput(), PLearn::TVec< T >::first(), i, inputsize(), j, PLearn::VMat::length(), m, MISSING_VALUE, n, outputsize(), PLearn::TVec< T >::size(), and PLearn::TVec< T >::subVec().

Referenced by declareMethods().

{
    int l = inputs.length();
    int nin = inputsize();
    int nout = outputsize();
    Mat m(l, 3*nout);
    TVec< pair<real,real> > intervals;
    Vec invec(nin);
    for(int i=0; i<l; i++)
    {
        Vec v = m(i);
        Vec outvec  = v.subVec(0, nout);
        Vec lowconf = v.subVec(nout, nout);
        Vec hiconf  = v.subVec(2*nout, nout);
        inputs->getRow(i, invec);
        computeOutput(invec, outvec);
        bool conf_avail = computeConfidenceFromOutput(invec, outvec,
                                                      probability, intervals);
        if (conf_avail) {
            for (int j=0, n=intervals.size() ; j<n ; ++j) {
                lowconf[j] = intervals[j].first;
                hiconf[j]  = intervals[j].second;
            }
        }
        else {
            lowconf << MISSING_VALUE;
            hiconf  << MISSING_VALUE;
        }
    }
    return m;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::PLearner::computeOutputCovMat ( const Mat inputs,
Mat outputs,
TVec< Mat > &  covariance_matrices 
) const [virtual]

Version of computeOutput that is capable of returning an output matrix given an input matrix (set of output vectors), as well as the complete covariance matrix between the outputs.

A separate covariance matrix is returned for each output dimension, but these matrices are allowed to share the same storage. This would be the case in situations where the output covariance really depends only on the location of the training inputs, as in, e.g., GaussianProcessRegressor.

The default implementation is to repeatedly call computeOutput, followed by computeConfidenceFromOutput (sampled with probability Erf[1/(2*Sqrt(2))], to extract 1*stddev given by subtraction of the two intervals, then squaring the stddev to obtain the variance), thereby filling a diagonal output covariance matrix. If computeConfidenceFromOutput returns 'false' (confidence intervals not supported), the returned covariance matrix is filled with MISSING_VALUE.

Reimplemented in PLearn::GaussianProcessRegressor.

Definition at line 752 of file PLearner.cc.

References computeConfidenceFromOutput(), computeOutput(), PLearn::TVec< T >::first(), i, inputsize(), j, PLearn::TMat< T >::length(), MISSING_VALUE, N, outputsize(), PLearn::pl_erf(), PLASSERT, PLearn::TMat< T >::resize(), PLearn::TVec< T >::resize(), PLearn::sqrt(), PLearn::var(), and PLearn::TMat< T >::width().

Referenced by remote_computeOutputCovMat().

{
    PLASSERT( inputs.width() == inputsize() && outputsize() > 0 );
    const int N = inputs.length();
    const int M = outputsize();
    outputs.resize(N, M);
    covariance_matrices.resize(M);

    bool has_confidence  = true;
    bool init_covariance = 0;
    Vec cur_input, cur_output;
    TVec< pair<real,real> > intervals;
    for (int i=0 ; i<N ; ++i) {
        cur_input  = inputs(i);
        cur_output = outputs(i);
        computeOutput(cur_input, cur_output);
        if (has_confidence) {
            static const real probability = pl_erf(1. / (2*sqrt(2.0)));
            has_confidence = computeConfidenceFromOutput(cur_input, cur_output,
                                                         probability, intervals);
            if (has_confidence) {
                // Create the covariance matrices only once; filled with zeros
                if (! init_covariance) {
                    for (int j=0 ; j<M ; ++j)
                        covariance_matrices[j] = Mat(N, N, 0.0);
                    init_covariance = true;
                }
                
                // Compute the variance for each output j, and set it on
                // element i,i of the j-th covariance matrix
                for (int j=0 ; j<M ; ++j) {
                    float stddev = intervals[j].second - intervals[j].first;
                    float var = stddev*stddev;
                    covariance_matrices[j](i,i) = var;
                }
            }
        }
    }

    // If confidence intervals are not supported, fill the covariance matrices
    // with missing values
    for (int j=0 ; j<M ; ++j)
        covariance_matrices[j] = Mat(N, N, MISSING_VALUE);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::PLearner::computeOutputs ( const Mat input,
Mat output 
) const [virtual]

if it is more efficient to compute multipe outputs simultaneously, it can be advantageous to define the latter instead, in which each row of the matrices is associated with one example.

Reimplemented in PLearn::mNNet, PLearn::NatGradNNet, and PLearn::StackedAutoassociatorsNet.

Definition at line 1195 of file PLearner.cc.

References computeOutput(), i, PLearn::TMat< T >::length(), n, and PLASSERT.

Referenced by PLearn::StackedAutoassociatorsNet::computeOutputs(), remote_computeOutputs(), and use().

{
    // inefficient default implementation
    int n=input.length();
    PLASSERT(output.length()==n);
    for (int i=0;i<n;i++)
    {
        Vec in_i = input(i);
        Vec out_i = output(i); 
        computeOutput(in_i,out_i);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::PLearner::computeOutputsAndCosts ( const Mat input,
const Mat target,
Mat output,
Mat costs 
) const [virtual]

minibatch version of computeOutputAndCosts

Reimplemented in PLearn::ToBagClassifier, PLearn::AddCostToLearner, PLearn::EmbeddedLearner, PLearn::mNNet, PLearn::NatGradNNet, PLearn::DeepBeliefNet, PLearn::ModuleLearner, and PLearn::StackedAutoassociatorsNet.

Definition at line 1207 of file PLearner.cc.

References computeOutputAndCosts(), i, PLearn::TMat< T >::length(), n, nTestCosts(), outputsize(), PLASSERT, and PLearn::TMat< T >::resize().

Referenced by PLearn::StackedAutoassociatorsNet::computeOutputsAndCosts(), remote_computeOutputsAndCosts(), and test().

{
    // inefficient default implementation
    int n=input.length();
    PLASSERT(target.length()==n);
    output.resize(n,outputsize());
    costs.resize(n,nTestCosts());
    for (int i=0;i<n;i++)
    {
        Vec in_i = input(i);
        Vec out_i = output(i); 
        Vec target_i = target(i);
        Vec c_i = costs(i);
        computeOutputAndCosts(in_i,target_i,out_i,c_i);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::PLearner::declareMethods ( RemoteMethodMap rmm) [static, protected]

Declare the methods that are remote-callable.

Reimplemented from PLearn::Object.

Reimplemented in PLearn::TransformationLearner, PLearn::GaussianDistribution, PLearn::PDistribution, PLearn::EmbeddedLearner, PLearn::DeepReconstructorNet, PLearn::NatGradSMPNNet, PLearn::DeepBeliefNet, PLearn::StackedAutoassociatorsNet, and PLearn::DiverseComponentAnalysis.

Definition at line 280 of file PLearner.cc.

References PLearn::Object::_getRemoteMethodMap_(), computeInputOutputConfMat(), computeInputOutputMat(), computeOutputConfMat(), PLearn::declareMethod(), forget(), getExperimentDirectory(), getTestCostNames(), getTrainCostNames(), getTrainingSet(), getTrainStatsCollector(), PLearn::RemoteMethodMap::inherited(), outputsize(), remote_batchComputeOutputAndConfidence(), remote_computeConfidenceFromOutput(), remote_computeCostsFromOutputs(), remote_computeCostsOnly(), remote_computeOutput(), remote_computeOutputAndCosts(), remote_computeOutputCovMat(), remote_computeOutputs(), remote_computeOutputsAndCosts(), remote_test(), remote_use(), remote_use2(), remote_useOnTrain(), resetInternalState(), setExperimentDirectory(), setTrainingSet(), setTrainStatsCollector(), sub_test(), and train().

Referenced by PLearn::NatGradSMPNNet::declareMethods().

{
    // Insert a backpointer to remote methods; note that this is different from
    // declareOptions().
    rmm.inherited(inherited::_getRemoteMethodMap_());

    declareMethod(
        rmm, "setTrainingSet", &PLearner::setTrainingSet,
        (BodyDoc("Declares the training set.  Then calls build() and forget() if\n"
                 "necessary.\n"),
         ArgDoc ("training_set", "The training set VMatrix to set; should have\n"
                 "its inputsize, targetsize and weightsize fields set properly.\n"),
         ArgDoc ("call_forget", "Whether the forget() function should be called\n"
                 "upon setting the training set\n")));

    declareMethod(
        rmm, "getTrainingSet", &PLearner::getTrainingSet,
        (BodyDoc("Returns the current training set."),
         RetDoc ("The trainset")));

    declareMethod(
        rmm, "setExperimentDirectory", &PLearner::setExperimentDirectory,
        (BodyDoc("The experiment directory is the directory in which files related to\n"
                 "this model are to be saved.  If it is an empty string, it is understood\n"
                 "to mean that the user doesn't want any file created by this learner.\n"),
         ArgDoc ("expdir", "Experiment directory to set")));

    declareMethod(
        rmm, "getExperimentDirectory", &PLearner::getExperimentDirectory,
        (BodyDoc("This returns the currently set experiment directory\n"
                 "(see setExperimentDirectory)\n"),
         RetDoc ("Current experiment directory")));

    declareMethod(
        rmm, "outputsize", &PLearner::outputsize,
        (BodyDoc("Return the learner outputsize")));
    
    declareMethod(
        rmm, "setTrainStatsCollector", &PLearner::setTrainStatsCollector,
        (BodyDoc("Sets the statistics collector whose update() method will be called\n"
                 "during training.\n."),
         ArgDoc ("statscol", "The tatistics collector to set")));

    declareMethod(
        rmm, "getTrainStatsCollector", &PLearner::getTrainStatsCollector,
        (BodyDoc("Returns the statistics collector that was used during training.\n"),
         RetDoc ("Current training statistics collector")));

    declareMethod(
        rmm, "forget", &PLearner::forget,
        (BodyDoc("(Re-)initializes the PLearner in its fresh state (that state may depend\n"
                 "on the 'seed' option) and sets 'stage' back to 0 (this is the stage of\n"
                 "a fresh learner!)\n"
                 "\n"
                 "A typical forget() method should do the following:\n"
                 "\n"
                 "- call inherited::forget() to initialize the random number generator\n"
                 "  with the 'seed' option\n"
                 "\n"
                 "- initialize the learner's parameters, using this random generator\n"
                 "\n"
                 "- stage = 0;\n"
                 "\n"
                 "This method is typically called by the build_() method, after it has\n"
                 "finished setting up the parameters, and if it deemed useful to set or\n"
                 "reset the learner in its fresh state.  (remember build may be called\n"
                 "after modifying options that do not necessarily require the learner to\n"
                 "restart from a fresh state...)  forget is also called by the\n"
                 "setTrainingSet method, after calling build(), so it will generally be\n"
                 "called TWICE during setTrainingSet!\n")));

    declareMethod(
        rmm, "train", &PLearner::train,
        (BodyDoc("The role of the train method is to bring the learner up to\n"
                 "stage==nstages, updating the stats with training costs measured on-line\n"
                 "in the process.\n")));


    declareMethod(
        rmm, "sub_test", &PLearner::sub_test,
        (BodyDoc("Test on a given (chunk of a) testset and return stats, outputs and costs.  "
                 "Used by parallel test"),
         ArgDoc("testset","test set"),
         ArgDoc("test_stats","VecStatsCollector to use"),
         ArgDoc("rtestoutputs","wether to return outputs"),
         ArgDoc("rtestcosts","wether to return costs"),
         RetDoc ("tuple of (stats, outputs, costs)")));

    declareMethod(
        rmm, "test", &PLearner::remote_test,
        (BodyDoc("Test on a given testset and return stats, outputs and costs."),
         ArgDoc("testset","test set"),
         ArgDoc("test_stats","VecStatsCollector to use"),
         ArgDoc("rtestoutputs","whether to return outputs"),
         ArgDoc("rtestcosts","whether to return costs"),
         RetDoc ("tuple of (stats, outputs, costs)")));


    declareMethod(
        rmm, "resetInternalState", &PLearner::resetInternalState,
        (BodyDoc("If the learner is a stateful one (inherits from StatefulLearner),\n"
                 "this resets the internal state to its initial value; by default,\n"
                 "this function does nothing.")));

    declareMethod(
        rmm, "computeOutput", &PLearner::remote_computeOutput,
        (BodyDoc("On a trained learner, this computes the output from the input"),
         ArgDoc ("input", "Input vector (should have width inputsize)"),
         RetDoc ("Computed output (will have width outputsize)")));

    declareMethod(
        rmm, "computeOutputs", &PLearner::remote_computeOutputs,
        (BodyDoc("On a trained learner, this computes the output from the input, one\n"
                 "batch of examples at a time (one example per row of the arg. matrices.\n"),
         ArgDoc ("inputs", "Input matrix (batch_size x inputsize)"),
         RetDoc ("Resulting output matrix (batch_size x outputsize)")));

    declareMethod(
        rmm, "use", &PLearner::remote_use,
        (BodyDoc("Compute the output of a trained learner on every row of an\n"
                 "input VMatrix.  The outputs are stored in a .pmat matrix\n"
                 "under the specified filename."),
         ArgDoc ("input_vmat", "VMatrix containing the inputs"),
         ArgDoc ("output_pmat_fname", "Name of the .pmat to store the computed outputs")));

    declareMethod(
        rmm, "use2", &PLearner::remote_use2,
        (BodyDoc("Compute the output of a trained learner on every row of an\n"
                 "input VMatrix.  The outputs are returned as a matrix.\n"),
         ArgDoc ("input_vmat", "VMatrix containing the inputs"),
         RetDoc ("Matrix holding the computed outputs")));

    declareMethod(
        rmm, "useOnTrain", &PLearner::remote_useOnTrain,
        (BodyDoc("Compute the output of a trained learner on every row of \n"
                 "the trainset.  The outputs are returned as a matrix.\n"),
         RetDoc ("Matrix holding the computed outputs")));

    declareMethod(
        rmm, "computeInputOutputMat", &PLearner::computeInputOutputMat,
        (BodyDoc("Returns a matrix which is a (horizontal) concatenation\n"
                 "and the computed outputs.\n"),
         ArgDoc ("inputs", "VMatrix containing the inputs"),
         RetDoc ("Matrix holding the inputs+computed_outputs")));

    declareMethod(
        rmm, "computeInputOutputConfMat", &PLearner::computeInputOutputConfMat,
        (BodyDoc("Return a Mat that is the contatenation of inputs, outputs, lower\n"
                 "confidence bound, and upper confidence bound.  If confidence intervals\n"
                 "cannot be computed for the learner, they are filled with MISSING_VALUE.\n"),
         ArgDoc ("inputs", "VMatrix containing the inputs"),
         ArgDoc ("probability", "Level at which the confidence intervals should be computed, "
                                "e.g. 0.95."),
         RetDoc ("Matrix holding the inputs+outputs+confidence-low+confidence-high")));

    declareMethod(
        rmm, "computeOutputConfMat", &PLearner::computeOutputConfMat,
        (BodyDoc("Return a Mat that is the contatenation of outputs, lower confidence\n"
                 "bound, and upper confidence bound.  If confidence intervals cannot be\n"
                 "computed for the learner, they are filled with MISSING_VALUE.\n"),
         ArgDoc ("inputs", "VMatrix containing the inputs"),
         ArgDoc ("probability", "Level at which the confidence intervals should be computed, "
                                "e.g. 0.95."),
         RetDoc ("Matrix holding the outputs+confidence-low+confidence-high")));

    declareMethod(
        rmm, "computeOutputAndCosts", &PLearner::remote_computeOutputAndCosts,
        (BodyDoc("Compute both the output from the input, and the costs associated\n"
                 "with the desired target.  The computed costs\n"
                 "are returned in the order given by getTestCostNames()\n"),
         ArgDoc ("input",  "Input vector (should have width inputsize)"),
         ArgDoc ("target", "Target vector (for cost computation)"),
         RetDoc ("- Vec containing output \n"
                 "- Vec containing cost")));

    declareMethod(
        rmm, "computeOutputsAndCosts", &PLearner::remote_computeOutputsAndCosts,
        (BodyDoc("Compute both the output from the input, and the costs associated\n"
                 "with the desired target.  The computed costs\n"
                 "are returned in the order given by getTestCostNames()\n"
                 "This variant computes the outputs and the costs simultaneously\n"
                 "for a whole batch of examples (rows of the argument matrices)\n"),
         ArgDoc ("inputs", "Input matrix (batch_size x inputsize)"),
         ArgDoc ("targets", "Target matrix (batch_size x targetsize)"),
         RetDoc ("Pair containing first the resulting output matrix\n"
                 "(batch_size x outputsize), then the costs matrix\n"
                 "(batch_size x costsize)")));

    declareMethod(
        rmm, "computeCostsFromOutputs", &PLearner::remote_computeCostsFromOutputs,
        (BodyDoc("Compute the costs from already-computed output.  The computed costs\n"
                 "are returned in the order given by getTestCostNames()"),
         ArgDoc ("input",  "Input vector (should have width inputsize)"),
         ArgDoc ("output", "Output vector computed by previous call to computeOutput()"),
         ArgDoc ("target", "Target vector"),
         RetDoc ("The computed costs vector")));

    declareMethod(
        rmm, "computeCostsOnly", &PLearner::remote_computeCostsOnly,
        (BodyDoc("Compute the costs only, without the outputs; for some learners, this\n"
                 "may be more efficient than calling computeOutputAndCosts() if the\n"
                 "outputs are not needed.  (The default implementation simply calls\n"
                 "computeOutputAndCosts() and discards the output.)\n"),
         ArgDoc ("input",  "Input vector (should have width inputsize)"),
         ArgDoc ("target", "Target vector"),
         RetDoc ("The computed costs vector")));

    declareMethod(
        rmm, "computeConfidenceFromOutput", &PLearner::remote_computeConfidenceFromOutput,
        (BodyDoc("Compute a confidence intervals for the output, given the input and the\n"
                 "pre-computed output (resulting from computeOutput or similar).  The\n"
                 "probability level of the confidence interval must be specified.\n"
                 "(e.g. 0.95).  Result is stored in a TVec of pairs low:high for each\n"
                 "output variable (this is a \"box\" interval; it does not account for\n"
                 "correlations among the output variables).\n"),
         ArgDoc ("input",       "Input vector (should have width inputsize)"),
         ArgDoc ("output",      "Output vector computed by previous call to computeOutput()"),
         ArgDoc ("probability", "Level at which the confidence interval must be computed,\n"
                                "e.g. 0.95\n"),
         RetDoc ("Vector of pairs low:high giving, respectively, the lower-bound confidence\n"
                 "and upper-bound confidence for each dimension of the output vector.  If this\n"
                 "vector is empty, then confidence intervals could not be computed for the\n"
                 "given learner.  Note that this is the PLearner default (not to compute\n"
                 "any confidence intervals), but some learners such as LinearRegressor\n"
                 "know how to compute them.")));

    declareMethod(
        rmm, "computeOutputCovMat", &PLearner::remote_computeOutputCovMat,
        (BodyDoc("Version of computeOutput that is capable of returning an output matrix\n"
                 "given an input matrix (set of output vectors), as well as the complete\n"
                 "covariance matrix between the outputs.\n"
                 "\n"
                 "A separate covariance matrix is returned for each output dimension, but\n"
                 "these matrices are allowed to share the same storage.  This would be\n"
                 "the case in situations where the output covariance really depends only\n"
                 "on the location of the training inputs, as in, e.g.,\n"
                 "GaussianProcessRegressor.\n"
                 "\n"
                 "The default implementation is to repeatedly call computeOutput,\n"
                 "followed by computeConfidenceFromOutput (sampled with probability\n"
                 "Erf[1/(2*Sqrt(2))], to extract 1*stddev given by subtraction of the two\n"
                 "intervals, then squaring the stddev to obtain the variance), thereby\n"
                 "filling a diagonal output covariance matrix.  If\n"
                 "computeConfidenceFromOutput returns 'false' (confidence intervals not\n"
                 "supported), the returned covariance matrix is filled with\n"
                 "MISSING_VALUE.\n"),
         ArgDoc ("inputs", "Matrix containing the set of test points"),
         RetDoc ("Two quantities are returned:\n"
                 "- The matrix containing the expected output (as rows) for each input row.\n"
                 "- A vector of covariance matrices between the outputs (one covariance\n"
                 "  matrix per output dimension).\n")));
    
    declareMethod(
        rmm, "batchComputeOutputAndConfidencePMat",
        &PLearner::remote_batchComputeOutputAndConfidence,
        (BodyDoc("Repeatedly calls computeOutput and computeConfidenceFromOutput with the\n"
                 "rows of inputs.  Writes outputs_and_confidence rows (as a series of\n"
                 "triples (output, low, high), one for each output).  The results are\n"
                 "stored in a .pmat whose filename is passed as argument.\n"),
         ArgDoc ("input_vmat",  "VMatrix containing the input rows"),
         ArgDoc ("probability", "Level at which the confidence interval must be computed,\n"
                                "e.g. 0.95\n"),
         ArgDoc ("result_pmat_filename", "Filename where to store the results")));

    declareMethod(
        rmm, "getTestCostNames", &PLearner::getTestCostNames,
        (BodyDoc("Return the name of the costs computed by computeCostsFromOutputs()\n"
                 "and computeOutputAndCosts()"),
         RetDoc ("List of test cost names")));

    declareMethod(
        rmm, "getTrainCostNames", &PLearner::getTrainCostNames,
        (BodyDoc("Return the names of the objective costs that the train\n"
                 "method computes and for which it updates the VecStatsCollector\n"
                 "train_stats."),
         RetDoc ("List of train cost names")));
}

Here is the call graph for this function:

Here is the caller graph for this function:

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

Declares this class' options.

Reimplemented from PLearn::Object.

Reimplemented in PLearn::AnalyzeDond2DiscreteVariables, PLearn::AnalyzeFieldStats, PLearn::CheckDond2FileSequence, PLearn::ComputeDond2Target, PLearn::ComputePurenneError, PLearn::DichotomizeDond2DiscreteVariables, PLearn::Experimentation, PLearn::FixDond2BinaryVariables, PLearn::MergeDond2Files, PLearn::NeighborhoodConditionalMean, PLearn::Preprocessing, PLearn::SecondIterationWrapper, PLearn::StabilisationLearner, PLearn::TestImputations, PLearn::BinaryStump, PLearn::ClassifierFromConditionalPDistribution, PLearn::ClassifierFromDensity, PLearn::KFoldLogisticClassifier, PLearn::LocalGaussianClassifier, PLearn::FeatureSetNaiveBayesClassifier, PLearn::KNNClassifier, PLearn::MultiInstanceNNet, PLearn::SVMClassificationTorch, PLearn::ToBagClassifier, PLearn::ConditionalDensityNet, PLearn::GaussianContinuumDistribution, PLearn::GaussianProcessRegressor, PLearn::PConditionalDistribution, PLearn::LocallyMagnifiedDistribution, PLearn::NeighborhoodBoxVolumeDensityEstimator, PLearn::TransformationLearner, PLearn::GaussianDistribution, PLearn::GaussMix, PLearn::HistogramDistribution, PLearn::KernelDensityEstimator, PLearn::ManifoldParzen2, PLearn::MixtureDistribution, PLearn::NGramDistribution, PLearn::NonLocalManifoldParzen, PLearn::ParzenWindow, PLearn::PDistribution, PLearn::RandomGaussMix, PLearn::RBMDistribution, PLearn::SpiralDistribution, PLearn::UnconditionalDistribution, PLearn::UniformDistribution, PLearn::AddCostToLearner, PLearn::AddLayersNNet, PLearn::BestAveragingPLearner, PLearn::ChainedLearners, PLearn::DeepNNet, PLearn::DistRepNNet, PLearn::EmbeddedLearner, PLearn::DeepReconstructorNet, PLearn::mNNet, PLearn::NatGradNNet, PLearn::NatGradSMPNNet, PLearn::PvGradNNet, PLearn::FeatureSetNNet, PLearn::HorizonStatefulLearner, PLearn::IncrementalNNet, PLearn::NeighborhoodSmoothnessNNet, PLearn::NNet, PLearn::PythonProcessedLearner, PLearn::SelectInputSubsetLearner, PLearn::StackedLearner, PLearn::StatefulLearner, PLearn::TestingLearner, PLearn::TorchLearner, PLearn::TransformOutputLearner, PLearn::VPLCombinedLearner, PLearn::VPLPreprocessedLearner, PLearn::VPLPreprocessedLearner2, PLearn::VPLProcessor, PLearn::HyperLearner, PLearn::AdaBoost, PLearn::BaggingLearner, PLearn::CompareLearner, PLearn::MultiClassAdaBoost, PLearn::PrecomputedProcessedLearner, PLearn::VariableSelectionWithDirectedGradientDescent, PLearn::BallTreeNearestNeighbors, PLearn::ExhaustiveNearestNeighbors, PLearn::GenericNearestNeighbors, PLearn::DeepBeliefNet, PLearn::GaussianDBNClassification, PLearn::GaussianDBNRegression, PLearn::GaussPartSupervisedDBN, PLearn::HintonDeepBeliefNet, PLearn::PartSupervisedDBN, PLearn::StackedModulesLearner, PLearn::SupervisedDBN, PLearn::UnfrozenDeepBeliefNet, PLearn::SemiSupervisedDBN, PLearn::SubsamplingDBN, PLearn::ModuleLearner, PLearn::ModulesLearner, PLearn::StackedAutoassociatorsNet, PLearn::AutoLinearRegressor, PLearn::BaseRegressorConfidence, PLearn::BaseRegressorWrapper, PLearn::BasisSelectionRegressor, PLearn::ConstantRegressor, PLearn::CubicSpline, PLearn::GaussianProcessRegressor, PLearn::KernelRidgeRegressor, PLearn::KNNRegressor, PLearn::LinearRegressor, PLearn::LocalMedBoost, PLearn::PLS, PLearn::PruningLinearRegressor, PLearn::RankLearner, PLearn::RegressionTree, PLearn::RegressorFromDistribution, PLearn::WPLS, PLearn::EmbeddedSequentialLearner, PLearn::MovingAverage, PLearn::SequentialLearner, PLearn::SequentialModelSelector, PLearn::EntropyContrast, PLearn::EntropyContrastLearner, PLearn::DiverseComponentAnalysis, PLearn::GaussianContinuum, PLearn::GaussMixLocalProjections, PLearn::Isomap, PLearn::IsomapTangentLearner, PLearn::KernelPCA, PLearn::KernelProjection, PLearn::KMeansClustering, PLearn::KPCATangentLearner, PLearn::LLC, PLearn::LLE, PLearn::NormalizationLearner, PLearn::PCA, PLearn::SpectralClustering, PLearn::TangentLearner, PLearn::TargetEncodingLearner, PLearn::UniformizeLearner, PLearn::DeepFeatureExtractorNNet, PLearn::DeepNonLocalManifoldParzen, PLearn::DenoisingRecurrentNet, PLearn::MoleculeTemplateLearner, PLearn::TestLearner, PLearn::DiscriminativeDeepBeliefNet, PLearn::DiscriminativeRBM, PLearn::DynamicallyLinkedRBMsModel, PLearn::FeatureSetSequentialCRF, PLearn::LinearInductiveTransferClassifier, PLearn::ManifoldKNNDistribution, PLearn::ManifoldParzen, PLearn::NxProfileLearner, PLearn::NeuralProbabilisticLanguageModel, PLearn::NnlmOnlineLearner, PLearn::PseudolikelihoodRBM, PLearn::RankingFromKernel, PLearn::StackedFocusedAutoassociatorsNet, PLearn::StackedSVDNet, PLearn::StructuralLearner, PLearn::SurfaceTemplateLearner, and PLearn::TopDownAsymetricDeepNetwork.

Definition at line 130 of file PLearner.cc.

References PLearn::OptionBase::buildoption, PLearn::declareOption(), PLearn::Object::declareOptions(), PLearn::OptionBase::deprecated_level, expdir, finalized, forget_when_training_set_changes, inputsize_, PLearn::OptionBase::learntoption, master_sends_testset_rows, n_examples, PLearn::OptionBase::nosave, nservers, nstages, parallelize_here, random_gen, PLearn::OptionBase::remotetransmit, report_progress, save_trainingset_prefix, seed_, stage, targetsize_, test_minibatch_size, use_a_separate_random_generator_for_testing, verbosity, and weightsize_.

Referenced by PLearn::WPLS::declareOptions(), PLearn::VPLProcessor::declareOptions(), PLearn::VPLPreprocessedLearner2::declareOptions(), PLearn::VPLPreprocessedLearner::declareOptions(), PLearn::VPLCombinedLearner::declareOptions(), PLearn::VariableSelectionWithDirectedGradientDescent::declareOptions(), PLearn::UniformizeLearner::declareOptions(), PLearn::TorchLearner::declareOptions(), PLearn::TopDownAsymetricDeepNetwork::declareOptions(), PLearn::TargetEncodingLearner::declareOptions(), PLearn::TangentLearner::declareOptions(), PLearn::SubsamplingDBN::declareOptions(), PLearn::StatefulLearner::declareOptions(), PLearn::StackedSVDNet::declareOptions(), PLearn::StackedModulesLearner::declareOptions(), PLearn::StackedLearner::declareOptions(), PLearn::StackedFocusedAutoassociatorsNet::declareOptions(), PLearn::StackedAutoassociatorsNet::declareOptions(), PLearn::StabilisationLearner::declareOptions(), PLearn::SequentialLearner::declareOptions(), PLearn::SemiSupervisedDBN::declareOptions(), PLearn::SecondIterationWrapper::declareOptions(), PLearn::RegressionTree::declareOptions(), PLearn::PythonProcessedLearner::declareOptions(), PLearn::PseudolikelihoodRBM::declareOptions(), PLearn::PrecomputedProcessedLearner::declareOptions(), PLearn::PLS::declareOptions(), PLearn::PDistribution::declareOptions(), PLearn::PCA::declareOptions(), PLearn::NxProfileLearner::declareOptions(), PLearn::NormalizationLearner::declareOptions(), PLearn::NnlmOnlineLearner::declareOptions(), PLearn::NNet::declareOptions(), PLearn::NeuralProbabilisticLanguageModel::declareOptions(), PLearn::NeighborhoodSmoothnessNNet::declareOptions(), PLearn::NatGradSMPNNet::declareOptions(), PLearn::NatGradNNet::declareOptions(), PLearn::MultiInstanceNNet::declareOptions(), PLearn::MultiClassAdaBoost::declareOptions(), PLearn::MoleculeTemplateLearner::declareOptions(), PLearn::ModulesLearner::declareOptions(), PLearn::ModuleLearner::declareOptions(), PLearn::mNNet::declareOptions(), PLearn::ManifoldParzen::declareOptions(), PLearn::LocalMedBoost::declareOptions(), PLearn::LocalGaussianClassifier::declareOptions(), PLearn::LLC::declareOptions(), PLearn::LinearRegressor::declareOptions(), PLearn::LinearInductiveTransferClassifier::declareOptions(), PLearn::KPCATangentLearner::declareOptions(), PLearn::KNNRegressor::declareOptions(), PLearn::KNNClassifier::declareOptions(), PLearn::KMeansClustering::declareOptions(), PLearn::KFoldLogisticClassifier::declareOptions(), PLearn::KernelRidgeRegressor::declareOptions(), PLearn::KernelProjection::declareOptions(), PLearn::IsomapTangentLearner::declareOptions(), PLearn::IncrementalNNet::declareOptions(), PLearn::GenericNearestNeighbors::declareOptions(), PLearn::GaussianContinuum::declareOptions(), PLearn::FeatureSetSequentialCRF::declareOptions(), PLearn::FeatureSetNNet::declareOptions(), PLearn::FeatureSetNaiveBayesClassifier::declareOptions(), PLearn::EntropyContrastLearner::declareOptions(), PLearn::EntropyContrast::declareOptions(), PLearn::EmbeddedLearner::declareOptions(), PLearn::DynamicallyLinkedRBMsModel::declareOptions(), PLearn::DiverseComponentAnalysis::declareOptions(), PLearn::DistRepNNet::declareOptions(), PLearn::DiscriminativeRBM::declareOptions(), PLearn::DiscriminativeDeepBeliefNet::declareOptions(), PLearn::DenoisingRecurrentNet::declareOptions(), PLearn::DeepReconstructorNet::declareOptions(), PLearn::DeepNonLocalManifoldParzen::declareOptions(), PLearn::DeepNNet::declareOptions(), PLearn::DeepFeatureExtractorNNet::declareOptions(), PLearn::DeepBeliefNet::declareOptions(), PLearn::CubicSpline::declareOptions(), PLearn::ConstantRegressor::declareOptions(), PLearn::ComputeDond2Target::declareOptions(), PLearn::CompareLearner::declareOptions(), PLearn::ClassifierFromDensity::declareOptions(), PLearn::ClassifierFromConditionalPDistribution::declareOptions(), PLearn::BinaryStump::declareOptions(), PLearn::BestAveragingPLearner::declareOptions(), PLearn::BasisSelectionRegressor::declareOptions(), PLearn::BaseRegressorWrapper::declareOptions(), PLearn::BaseRegressorConfidence::declareOptions(), PLearn::BaggingLearner::declareOptions(), PLearn::AutoLinearRegressor::declareOptions(), PLearn::AnalyzeFieldStats::declareOptions(), and PLearn::AdaBoost::declareOptions().

{
    declareOption(
        ol, "expdir", &PLearner::expdir, OptionBase::buildoption | OptionBase::nosave | OptionBase::remotetransmit, 
        "Path of the directory associated with this learner, in which\n"
        "it should save any file it wishes to create. \n"
        "The directory will be created if it does not already exist.\n"
        "If expdir is the empty string (the default), then the learner \n"
        "should not create *any* file. Note that, anyway, most file creation and \n"
        "reporting are handled at the level of the PTester class rather than \n"
        "at the learner's. \n");

    declareOption(
        ol, "random_gen", &PLearner::random_gen, OptionBase::learntoption, 
        "The random number generator used in this learner. Constructed from the seed.\n");

    declareOption(
        ol, "seed", &PLearner::seed_, OptionBase::buildoption, 
        "The initial seed for the random number generator used in this\n"
        "learner, for instance for parameter initialization.\n"
        "If -1 is provided, then a 'random' seed is chosen based on time\n"
        "of day, ensuring that different experiments run differently.\n"
        "If 0 is provided, no (re)initialization of the random number\n"
        "generator is performed.\n"
        "With a given positive seed, build() and forget() should always\n"
        "initialize the parameters to the same values.");

    declareOption(
        ol, "stage", &PLearner::stage, OptionBase::learntoption, 
        "The current training stage, since last fresh initialization (forget()): \n"
        "0 means untrained, n often means after n epochs or optimization steps, etc...\n"
        "The true meaning is learner-dependant."
        "You should never modify this option directly!"
        "It is the role of forget() to bring it back to 0,\n"
        "and the role of train() to bring it up to 'nstages'...");

    declareOption(
        ol, "n_examples", &PLearner::n_examples, OptionBase::learntoption, 
        "The number of samples in the training set.\n"
        "Obtained from training set with setTrainingSet.");

    declareOption(
        ol, "inputsize", &PLearner::inputsize_, OptionBase::learntoption, 
        "The number of input columns in the data sets."
        "Obtained from training set with setTrainingSet.");

    declareOption(
        ol, "targetsize", &PLearner::targetsize_, OptionBase::learntoption, 
        "The number of target columns in the data sets."
        "Obtained from training set with setTrainingSet.");

    declareOption(
        ol, "weightsize", &PLearner::weightsize_, OptionBase::learntoption, 
        "The number of cost weight columns in the data sets."
        "Obtained from training set with setTrainingSet.");

    declareOption(
        ol, "forget_when_training_set_changes",
        &PLearner::forget_when_training_set_changes, OptionBase::buildoption, 
        "Whether or not to call the forget() method (re-initialize model \n"
        "as before training) in setTrainingSet when the\n"
        "training set changes (e.g. of dimension).");

    declareOption(
        ol, "nstages", &PLearner::nstages, OptionBase::buildoption, 
        "The stage until which train() should train this learner and return.\n"
        "The meaning of 'stage' is learner-dependent, but for learners whose \n"
        "training is incremental (such as involving incremental optimization), \n"
        "it is typically synonym with the number of 'epochs', i.e. the number \n"
        "of passages of the optimization process through the whole training set, \n"
        "since the last fresh initialisation.");

    declareOption(
        ol, "report_progress", &PLearner::report_progress, OptionBase::buildoption, 
        "should progress in learning and testing be reported in a ProgressBar.\n");

    declareOption(
        ol, "verbosity", &PLearner::verbosity, OptionBase::buildoption, 
        "Level of verbosity. If 0 should not write anything on perr. \n"
        "If >0 may write some info on the steps performed along the way.\n"
        "The level of details written should depend on this value.");

    declareOption(
        ol, "nservers", &PLearner::nservers, OptionBase::buildoption, 
        "DEPRECATED: use parallelize_here instead.\n"
        "Max number of computation servers to use in parallel with the main process.\n"
        "If <=0 no parallelization will occur at this level.\n",
        OptionBase::deprecated_level);

    declareOption(
        ol, "save_trainingset_prefix", &PLearner::save_trainingset_prefix,
        OptionBase::buildoption,
        "Whether the training set should be saved upon a call to\n"
        "setTrainingSet().  The saved file is put in the learner's expdir\n"
        "(assuming there is one) and has the form \"<prefix>_trainset_XXX.pmat\"\n"
        "The prefix is what this option specifies.  'XXX' is a unique\n"
        "serial number that is globally incremented with each saved\n"
        "setTrainingSet.  This option is useful when manipulating very\n"
        "complex nested learner structures, and you want to ensure that\n"
        "the inner learner is getting the correct results.  (Default="",\n"
        "i.e. don't save anything.)\n");

    declareOption(
        ol, "parallelize_here", &PLearner::parallelize_here, 
        OptionBase::buildoption | OptionBase::nosave,
        "Reserve remote servers at this level if true.\n");

    declareOption(
        ol, "master_sends_testset_rows", &PLearner::master_sends_testset_rows, 
        OptionBase::buildoption | OptionBase::nosave,
        "For parallel PLearner::test : wether the master should read the testset and\n"
        "send rows to the slaves, or send a serialized description of the testset.\n");
  
    declareOption(
        ol, "test_minibatch_size", &PLearner::test_minibatch_size,
        OptionBase::buildoption,
        "Size of minibatches used during testing to take advantage\n"
        "of efficient (possibly parallelized) implementations when\n"
        "multiple examples are processed at once. \n");

    declareOption(
        ol, "use_a_separate_random_generator_for_testing", 
        &PLearner::use_a_separate_random_generator_for_testing,
        OptionBase::buildoption,
        "This option allows to perform testing always in the same\n"
        "conditions in terms of the random generator (if testing involves\n"
        "some non-deterministic component, this can be useful in order\n"
        "to obtain repeatable test results).\n"
        "If non-zero, the base class test() method will use a different\n"
        "random generator than the rest of the code (i.e. training).\n"
        "The non-zero value is the seed to be used during testing.\n"
        "A value of -1 sets the seed differently each time depending on clock.\n"
        "(which is probably not desired here).\n"
        "Note that this option might not be taken into account in some\n"
        "sub-classes that override the PLearner's test method.");

    declareOption(
        ol, "finalized", &PLearner::finalized,
        OptionBase::learntoption,
        "(default false)"
        " After training(when finalized() is called) it will be set to true.\n"
        " When true, it mean the learner it won't be trained again and this\n"
        " allow some optimization.\n");

    inherited::declareOptions(ol);
}

Here is the call graph for this function:

static const PPath& PLearn::PLearner::declaringFile ( ) [inline, static]

Reimplemented from PLearn::Object.

Reimplemented in PLearn::AnalyzeDond2DiscreteVariables, PLearn::AnalyzeFieldStats, PLearn::CheckDond2FileSequence, PLearn::ComputeDond2Target, PLearn::ComputePurenneError, PLearn::DichotomizeDond2DiscreteVariables, PLearn::Experimentation, PLearn::FixDond2BinaryVariables, PLearn::MergeDond2Files, PLearn::NeighborhoodConditionalMean, PLearn::Preprocessing, PLearn::SecondIterationWrapper, PLearn::StabilisationLearner, PLearn::TestImputations, PLearn::BinaryStump, PLearn::ClassifierFromConditionalPDistribution, PLearn::ClassifierFromDensity, PLearn::KFoldLogisticClassifier, PLearn::LocalGaussianClassifier, PLearn::FeatureSetNaiveBayesClassifier, PLearn::KNNClassifier, PLearn::MultiInstanceNNet, PLearn::SVMClassificationTorch, PLearn::ToBagClassifier, PLearn::ConditionalDensityNet, PLearn::GaussianContinuumDistribution, PLearn::GaussianProcessRegressor, PLearn::PConditionalDistribution, PLearn::LocallyMagnifiedDistribution, PLearn::NeighborhoodBoxVolumeDensityEstimator, PLearn::TransformationLearner, PLearn::GaussianDistribution, PLearn::GaussMix, PLearn::HistogramDistribution, PLearn::KernelDensityEstimator, PLearn::ManifoldParzen2, PLearn::MixtureDistribution, PLearn::NGramDistribution, PLearn::NonLocalManifoldParzen, PLearn::ParzenWindow, PLearn::PDistribution, PLearn::RandomGaussMix, PLearn::RBMDistribution, PLearn::SpiralDistribution, PLearn::UnconditionalDistribution, PLearn::UniformDistribution, PLearn::AddCostToLearner, PLearn::AddLayersNNet, PLearn::BestAveragingPLearner, PLearn::ChainedLearners, PLearn::DeepNNet, PLearn::DistRepNNet, PLearn::EmbeddedLearner, PLearn::DeepReconstructorNet, PLearn::mNNet, PLearn::NatGradNNet, PLearn::NatGradSMPNNet, PLearn::PvGradNNet, PLearn::FeatureSetNNet, PLearn::HorizonStatefulLearner, PLearn::IdentityPLearner, PLearn::IncrementalNNet, PLearn::NeighborhoodSmoothnessNNet, PLearn::NNet, PLearn::PythonProcessedLearner, PLearn::SelectInputSubsetLearner, PLearn::StackedLearner, PLearn::StatefulLearner, PLearn::TestingLearner, PLearn::TorchLearner, PLearn::TransformOutputLearner, PLearn::VPLCombinedLearner, PLearn::VPLPreprocessedLearner, PLearn::VPLPreprocessedLearner2, PLearn::VPLProcessor, PLearn::HyperLearner, PLearn::AdaBoost, PLearn::BaggingLearner, PLearn::CompareLearner, PLearn::MultiClassAdaBoost, PLearn::PrecomputedProcessedLearner, PLearn::VariableSelectionWithDirectedGradientDescent, PLearn::BallTreeNearestNeighbors, PLearn::ExhaustiveNearestNeighbors, PLearn::GenericNearestNeighbors, PLearn::DeepBeliefNet, PLearn::GaussianDBNClassification, PLearn::GaussianDBNRegression, PLearn::GaussPartSupervisedDBN, PLearn::HintonDeepBeliefNet, PLearn::PartSupervisedDBN, PLearn::StackedModulesLearner, PLearn::SupervisedDBN, PLearn::UnfrozenDeepBeliefNet, PLearn::SemiSupervisedDBN, PLearn::SubsamplingDBN, PLearn::ModuleLearner, PLearn::ModulesLearner, PLearn::StackedAutoassociatorsNet, PLearn::AutoLinearRegressor, PLearn::BaseRegressorConfidence, PLearn::BaseRegressorWrapper, PLearn::BasisSelectionRegressor, PLearn::ConstantRegressor, PLearn::CubicSpline, PLearn::GaussianProcessRegressor, PLearn::KernelRidgeRegressor, PLearn::KNNRegressor, PLearn::LinearRegressor, PLearn::LocalMedBoost, PLearn::PLS, PLearn::PruningLinearRegressor, PLearn::RankLearner, PLearn::RegressionTree, PLearn::RegressorFromDistribution, PLearn::WPLS, PLearn::EmbeddedSequentialLearner, PLearn::MovingAverage, PLearn::SequentialLearner, PLearn::SequentialModelSelector, PLearn::EntropyContrast, PLearn::EntropyContrastLearner, PLearn::DiverseComponentAnalysis, PLearn::GaussianContinuum, PLearn::GaussMixLocalProjections, PLearn::Isomap, PLearn::IsomapTangentLearner, PLearn::KernelPCA, PLearn::KernelProjection, PLearn::KMeansClustering, PLearn::KPCATangentLearner, PLearn::LLC, PLearn::LLE, PLearn::NormalizationLearner, PLearn::PCA, PLearn::SpectralClustering, PLearn::TangentLearner, PLearn::TargetEncodingLearner, PLearn::UniformizeLearner, PLearn::DeepFeatureExtractorNNet, PLearn::DeepNonLocalManifoldParzen, PLearn::DenoisingRecurrentNet, PLearn::MoleculeTemplateLearner, PLearn::TestLearner, PLearn::DiscriminativeDeepBeliefNet, PLearn::DiscriminativeRBM, PLearn::DynamicallyLinkedRBMsModel, PLearn::FeatureSetSequentialCRF, PLearn::LinearInductiveTransferClassifier, PLearn::ManifoldKNNDistribution, PLearn::ManifoldParzen, PLearn::NxProfileLearner, PLearn::NeuralProbabilisticLanguageModel, PLearn::NnlmOnlineLearner, PLearn::PseudolikelihoodRBM, PLearn::RankingFromKernel, PLearn::StackedFocusedAutoassociatorsNet, PLearn::StackedSVDNet, PLearn::StructuralLearner, PLearn::SurfaceTemplateLearner, and PLearn::TopDownAsymetricDeepNetwork.

Definition at line 723 of file PLearner.h.

PLearner * PLearn::PLearner::deepCopy ( CopiesMap copies) const [virtual]

Reimplemented from PLearn::Object.

Reimplemented in PLearn::AnalyzeDond2DiscreteVariables, PLearn::AnalyzeFieldStats, PLearn::CheckDond2FileSequence, PLearn::ComputeDond2Target, PLearn::ComputePurenneError, PLearn::DichotomizeDond2DiscreteVariables, PLearn::Experimentation, PLearn::FixDond2BinaryVariables, PLearn::MergeDond2Files, PLearn::NeighborhoodConditionalMean, PLearn::Preprocessing, PLearn::SecondIterationWrapper, PLearn::StabilisationLearner, PLearn::TestImputations, PLearn::BinaryStump, PLearn::ClassifierFromConditionalPDistribution, PLearn::ClassifierFromDensity, PLearn::KFoldLogisticClassifier, PLearn::LocalGaussianClassifier, PLearn::FeatureSetNaiveBayesClassifier, PLearn::KNNClassifier, PLearn::MultiInstanceNNet, PLearn::SVMClassificationTorch, PLearn::ToBagClassifier, PLearn::ConditionalDensityNet, PLearn::GaussianContinuumDistribution, PLearn::GaussianProcessRegressor, PLearn::PConditionalDistribution, PLearn::LocallyMagnifiedDistribution, PLearn::NeighborhoodBoxVolumeDensityEstimator, PLearn::TransformationLearner, PLearn::GaussianDistribution, PLearn::GaussMix, PLearn::HistogramDistribution, PLearn::KernelDensityEstimator, PLearn::ManifoldParzen2, PLearn::MixtureDistribution, PLearn::NGramDistribution, PLearn::NonLocalManifoldParzen, PLearn::ParzenWindow, PLearn::PDistribution, PLearn::RandomGaussMix, PLearn::RBMDistribution, PLearn::SpiralDistribution, PLearn::UnconditionalDistribution, PLearn::UniformDistribution, PLearn::AddCostToLearner, PLearn::AddLayersNNet, PLearn::BestAveragingPLearner, PLearn::ChainedLearners, PLearn::DeepNNet, PLearn::DistRepNNet, PLearn::EmbeddedLearner, PLearn::DeepReconstructorNet, PLearn::mNNet, PLearn::NatGradNNet, PLearn::NatGradSMPNNet, PLearn::PvGradNNet, PLearn::FeatureSetNNet, PLearn::HorizonStatefulLearner, PLearn::IdentityPLearner, PLearn::IncrementalNNet, PLearn::NeighborhoodSmoothnessNNet, PLearn::NNet, PLearn::PythonProcessedLearner, PLearn::SelectInputSubsetLearner, PLearn::StackedLearner, PLearn::StatefulLearner, PLearn::TestingLearner, PLearn::TorchLearner, PLearn::TransformOutputLearner, PLearn::VPLCombinedLearner, PLearn::VPLPreprocessedLearner, PLearn::VPLPreprocessedLearner2, PLearn::VPLProcessor, PLearn::HyperLearner, PLearn::AdaBoost, PLearn::BaggingLearner, PLearn::CompareLearner, PLearn::MultiClassAdaBoost, PLearn::PrecomputedProcessedLearner, PLearn::VariableSelectionWithDirectedGradientDescent, PLearn::BallTreeNearestNeighbors, PLearn::ExhaustiveNearestNeighbors, PLearn::GenericNearestNeighbors, PLearn::DeepBeliefNet, PLearn::GaussianDBNClassification, PLearn::GaussianDBNRegression, PLearn::GaussPartSupervisedDBN, PLearn::HintonDeepBeliefNet, PLearn::PartSupervisedDBN, PLearn::StackedModulesLearner, PLearn::SupervisedDBN, PLearn::UnfrozenDeepBeliefNet, PLearn::SemiSupervisedDBN, PLearn::SubsamplingDBN, PLearn::ModuleLearner, PLearn::ModulesLearner, PLearn::StackedAutoassociatorsNet, PLearn::AutoLinearRegressor, PLearn::BaseRegressorConfidence, PLearn::BaseRegressorWrapper, PLearn::BasisSelectionRegressor, PLearn::ConstantRegressor, PLearn::CubicSpline, PLearn::GaussianProcessRegressor, PLearn::KernelRidgeRegressor, PLearn::KNNRegressor, PLearn::LinearRegressor, PLearn::LocalMedBoost, PLearn::PLS, PLearn::PruningLinearRegressor, PLearn::RankLearner, PLearn::RegressionTree, PLearn::RegressorFromDistribution, PLearn::WPLS, PLearn::EmbeddedSequentialLearner, PLearn::MovingAverage, PLearn::SequentialLearner, PLearn::SequentialModelSelector, PLearn::EntropyContrast, PLearn::EntropyContrastLearner, PLearn::DiverseComponentAnalysis, PLearn::GaussianContinuum, PLearn::GaussMixLocalProjections, PLearn::Isomap, PLearn::IsomapTangentLearner, PLearn::KernelPCA, PLearn::KernelProjection, PLearn::KMeansClustering, PLearn::KPCATangentLearner, PLearn::LLC, PLearn::LLE, PLearn::NormalizationLearner, PLearn::PCA, PLearn::SpectralClustering, PLearn::TangentLearner, PLearn::TargetEncodingLearner, PLearn::UniformizeLearner, PLearn::DeepFeatureExtractorNNet, PLearn::DeepNonLocalManifoldParzen, PLearn::DenoisingRecurrentNet, PLearn::MoleculeTemplateLearner, PLearn::TestLearner, PLearn::DiscriminativeDeepBeliefNet, PLearn::DiscriminativeRBM, PLearn::DynamicallyLinkedRBMsModel, PLearn::FeatureSetSequentialCRF, PLearn::LinearInductiveTransferClassifier, PLearn::ManifoldKNNDistribution, PLearn::ManifoldParzen, PLearn::NxProfileLearner, PLearn::NeuralProbabilisticLanguageModel, PLearn::NnlmOnlineLearner, PLearn::PseudolikelihoodRBM, PLearn::RankingFromKernel, PLearn::StackedFocusedAutoassociatorsNet, PLearn::StackedSVDNet, PLearn::StructuralLearner, PLearn::SurfaceTemplateLearner, and PLearn::TopDownAsymetricDeepNetwork.

Definition at line 107 of file PLearner.cc.

void PLearn::PLearner::finalize ( ) [virtual]

*** SUBCLASS WRITING: ***

When this method is called the learner know it we will never train it again. So it can free resources that are needed only during the training. The functions test()/computeOutputs()/... should continue to work.

Reimplemented in PLearn::HyperLearner, PLearn::AdaBoost, PLearn::MultiClassAdaBoost, and PLearn::RegressionTree.

Definition at line 679 of file PLearner.cc.

References finalized.

Referenced by PLearn::RegressionTree::finalize(), PLearn::MultiClassAdaBoost::finalize(), PLearn::HyperLearner::finalize(), and PLearn::AdaBoost::finalize().

{
    finalized=true;
}

Here is the caller graph for this function:

void PLearn::PLearner::forget ( ) [virtual]

*** SUBCLASS WRITING: ***

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

A typical forget() method should do the following:

  • call inherited::forget() to initialize the random number generator with the 'seed' option
  • initialize the learner's parameters, using this random generator
  • stage = 0;

This method is typically called by the build_() method, after it has finished setting up the parameters, and if it deemed useful to set or reset the learner in its fresh state. (remember build may be called after modifying options that do not necessarily require the learner to restart from a fresh state...) forget is also called by the setTrainingSet method, after calling build(), so it will generally be called TWICE during setTrainingSet!

Reimplemented in PLearn::ComputePurenneError, PLearn::SecondIterationWrapper, PLearn::StabilisationLearner, PLearn::BinaryStump, PLearn::ClassifierFromConditionalPDistribution, PLearn::ClassifierFromDensity, PLearn::KFoldLogisticClassifier, PLearn::LocalGaussianClassifier, PLearn::FeatureSetNaiveBayesClassifier, PLearn::KNNClassifier, PLearn::MultiInstanceNNet, PLearn::ConditionalDensityNet, PLearn::GaussianContinuumDistribution, PLearn::GaussianProcessRegressor, PLearn::LocallyMagnifiedDistribution, PLearn::NeighborhoodBoxVolumeDensityEstimator, PLearn::TransformationLearner, PLearn::GaussianDistribution, PLearn::GaussMix, PLearn::KernelDensityEstimator, PLearn::MixtureDistribution, PLearn::NGramDistribution, PLearn::NonLocalManifoldParzen, PLearn::PDistribution, PLearn::RBMDistribution, PLearn::UnconditionalDistribution, PLearn::AddCostToLearner, PLearn::BestAveragingPLearner, PLearn::ChainedLearners, PLearn::DeepNNet, PLearn::DistRepNNet, PLearn::EmbeddedLearner, PLearn::DeepReconstructorNet, PLearn::mNNet, PLearn::NatGradNNet, PLearn::NatGradSMPNNet, PLearn::PvGradNNet, PLearn::FeatureSetNNet, PLearn::IncrementalNNet, PLearn::NeighborhoodSmoothnessNNet, PLearn::NNet, PLearn::PythonProcessedLearner, PLearn::StackedLearner, PLearn::StatefulLearner, PLearn::TestingLearner, PLearn::TorchLearner, PLearn::VPLCombinedLearner, PLearn::VPLPreprocessedLearner, PLearn::VPLPreprocessedLearner2, PLearn::VPLProcessor, PLearn::HyperLearner, PLearn::AdaBoost, PLearn::BaggingLearner, PLearn::CompareLearner, PLearn::MultiClassAdaBoost, PLearn::PrecomputedProcessedLearner, PLearn::VariableSelectionWithDirectedGradientDescent, PLearn::BallTreeNearestNeighbors, PLearn::ExhaustiveNearestNeighbors, PLearn::DeepBeliefNet, PLearn::GaussianDBNClassification, PLearn::GaussianDBNRegression, PLearn::GaussPartSupervisedDBN, PLearn::HintonDeepBeliefNet, PLearn::PartSupervisedDBN, PLearn::StackedModulesLearner, PLearn::SupervisedDBN, PLearn::SemiSupervisedDBN, PLearn::SubsamplingDBN, PLearn::ModuleLearner, PLearn::ModulesLearner, PLearn::StackedAutoassociatorsNet, PLearn::AutoLinearRegressor, PLearn::BaseRegressorConfidence, PLearn::BaseRegressorWrapper, PLearn::BasisSelectionRegressor, PLearn::ConstantRegressor, PLearn::CubicSpline, PLearn::GaussianProcessRegressor, PLearn::KernelRidgeRegressor, PLearn::KNNRegressor, PLearn::LinearRegressor, PLearn::LocalMedBoost, PLearn::PLS, PLearn::RankLearner, PLearn::RegressionTree, PLearn::RegressorFromDistribution, PLearn::WPLS, PLearn::EmbeddedSequentialLearner, PLearn::MovingAverage, PLearn::SequentialLearner, PLearn::SequentialModelSelector, PLearn::EntropyContrast, PLearn::EntropyContrastLearner, PLearn::DiverseComponentAnalysis, PLearn::GaussianContinuum, PLearn::Isomap, PLearn::IsomapTangentLearner, PLearn::KernelPCA, PLearn::KernelProjection, PLearn::KMeansClustering, PLearn::KPCATangentLearner, PLearn::LLC, PLearn::LLE, PLearn::NormalizationLearner, PLearn::PCA, PLearn::SpectralClustering, PLearn::TangentLearner, PLearn::TargetEncodingLearner, PLearn::UniformizeLearner, PLearn::DeepFeatureExtractorNNet, PLearn::DeepNonLocalManifoldParzen, PLearn::DenoisingRecurrentNet, PLearn::MoleculeTemplateLearner, PLearn::TestLearner, PLearn::DiscriminativeDeepBeliefNet, PLearn::DiscriminativeRBM, PLearn::DynamicallyLinkedRBMsModel, PLearn::FeatureSetSequentialCRF, PLearn::LinearInductiveTransferClassifier, PLearn::ManifoldKNNDistribution, PLearn::ManifoldParzen, PLearn::NxProfileLearner, PLearn::NeuralProbabilisticLanguageModel, PLearn::NnlmOnlineLearner, PLearn::PseudolikelihoodRBM, PLearn::RankingFromKernel, PLearn::StackedFocusedAutoassociatorsNet, PLearn::StackedSVDNet, PLearn::StructuralLearner, and PLearn::TopDownAsymetricDeepNetwork.

Definition at line 668 of file PLearner.cc.

References finalized, random_gen, seed_, and stage.

Referenced by declareMethods(), PLearn::VPLProcessor::forget(), PLearn::TopDownAsymetricDeepNetwork::forget(), PLearn::TargetEncodingLearner::forget(), PLearn::SubsamplingDBN::forget(), PLearn::StackedSVDNet::forget(), PLearn::StackedFocusedAutoassociatorsNet::forget(), PLearn::StackedAutoassociatorsNet::forget(), PLearn::StabilisationLearner::forget(), PLearn::SemiSupervisedDBN::forget(), PLearn::PseudolikelihoodRBM::forget(), PLearn::PrecomputedProcessedLearner::forget(), PLearn::NxProfileLearner::forget(), PLearn::NormalizationLearner::forget(), PLearn::NnlmOnlineLearner::forget(), PLearn::NNet::forget(), PLearn::NatGradSMPNNet::forget(), PLearn::NatGradNNet::forget(), PLearn::MultiClassAdaBoost::forget(), PLearn::ModuleLearner::forget(), PLearn::mNNet::forget(), PLearn::ManifoldParzen::forget(), PLearn::LocalGaussianClassifier::forget(), PLearn::KFoldLogisticClassifier::forget(), PLearn::DynamicallyLinkedRBMsModel::forget(), PLearn::DiverseComponentAnalysis::forget(), PLearn::DiscriminativeRBM::forget(), PLearn::DiscriminativeDeepBeliefNet::forget(), PLearn::DenoisingRecurrentNet::forget(), PLearn::DeepReconstructorNet::forget(), PLearn::DeepNonLocalManifoldParzen::forget(), PLearn::DeepBeliefNet::forget(), PLearn::CubicSpline::forget(), PLearn::BestAveragingPLearner::forget(), PLearn::BaggingLearner::forget(), PLearn::AutoLinearRegressor::forget(), initTrain(), and setTrainingSet().

{
    if (random_gen && seed_ != 0)
        random_gen->manual_seed(seed_);
    stage = 0;
    finalized=false;
}

Here is the caller graph for this function:

PPath PLearn::PLearner::getExperimentDirectory ( ) const [inline]
TVec< string > PLearn::PLearner::getOutputNames ( ) const [virtual]

Returns a vector of length outputsize() containing the outputs' names.

Default version returns ["out0", "out1", ...] Don't forget name should not have space or it will cause trouble when they are saved in the file {metadatadir}/fieldnames

Reimplemented in PLearn::StabilisationLearner, PLearn::ChainedLearners, PLearn::EmbeddedLearner, PLearn::PythonProcessedLearner, PLearn::VPLCombinedLearner, PLearn::VPLPreprocessedLearner, PLearn::VPLPreprocessedLearner2, PLearn::VPLProcessor, PLearn::BaggingLearner, PLearn::MultiClassAdaBoost, PLearn::RegressionTree, PLearn::NormalizationLearner, PLearn::TargetEncodingLearner, and PLearn::UniformizeLearner.

Definition at line 943 of file PLearner.cc.

References n, outputsize(), and PLearn::tostring().

{
    int n = outputsize();
    TVec<string> outnames(n);
    for(int k=0; k<n; k++)
        outnames[k] = "out" + tostring(k);
    return outnames;
}

Here is the call graph for this function:

int PLearn::PLearner::getTestCostIndex ( const string &  costname) const

Returns the index of the given cost in the vector of testcosts; calls PLERROR (throws a PLearnException) if requested cost is not found.

Reimplemented in PLearn::GaussianProcessRegressor.

Definition at line 704 of file PLearner.cc.

References getTestCostNames(), i, PLearn::TVec< T >::length(), PLERROR, and PLearn::tostring().

{
    TVec<string> costnames = getTestCostNames();
    for(int i=0; i<costnames.length(); i++)
        if(costnames[i]==costname)
            return i;
    PLERROR("In PLearner::getTestCostIndex, No test cost named %s in this learner.\n"
            "Available test costs are: %s", costname.c_str(),
            tostring(costnames).c_str());
    return -1;
}

Here is the call graph for this function:

virtual TVec<string> PLearn::PLearner::getTestCostNames ( ) const [pure virtual]

*** SUBCLASS WRITING: ***

This should return the names of the costs computed by computeCostsFromOutputs.

Implemented in PLearn::AnalyzeDond2DiscreteVariables, PLearn::AnalyzeFieldStats, PLearn::CheckDond2FileSequence, PLearn::ComputeDond2Target, PLearn::ComputePurenneError, PLearn::DichotomizeDond2DiscreteVariables, PLearn::Experimentation, PLearn::FixDond2BinaryVariables, PLearn::MergeDond2Files, PLearn::NeighborhoodConditionalMean, PLearn::Preprocessing, PLearn::SecondIterationWrapper, PLearn::StabilisationLearner, PLearn::TestImputations, PLearn::BinaryStump, PLearn::ClassifierFromConditionalPDistribution, PLearn::ClassifierFromDensity, PLearn::KFoldLogisticClassifier, PLearn::LocalGaussianClassifier, PLearn::FeatureSetNaiveBayesClassifier, PLearn::KNNClassifier, PLearn::MultiInstanceNNet, PLearn::SVMClassificationTorch, PLearn::ToBagClassifier, PLearn::GaussianProcessRegressor, PLearn::PDistribution, PLearn::AddCostToLearner, PLearn::BestAveragingPLearner, PLearn::ChainedLearners, PLearn::DeepNNet, PLearn::DistRepNNet, PLearn::EmbeddedLearner, PLearn::DeepReconstructorNet, PLearn::mNNet, PLearn::NatGradNNet, PLearn::NatGradSMPNNet, PLearn::FeatureSetNNet, PLearn::IdentityPLearner, PLearn::IncrementalNNet, PLearn::NeighborhoodSmoothnessNNet, PLearn::NNet, PLearn::PythonProcessedLearner, PLearn::StackedLearner, PLearn::TestingLearner, PLearn::TorchLearner, PLearn::VPLCombinedLearner, PLearn::VPLPreprocessedLearner, PLearn::VPLPreprocessedLearner2, PLearn::VPLProcessor, PLearn::AdaBoost, PLearn::BaggingLearner, PLearn::CompareLearner, PLearn::MultiClassAdaBoost, PLearn::PrecomputedProcessedLearner, PLearn::VariableSelectionWithDirectedGradientDescent, PLearn::BallTreeNearestNeighbors, PLearn::ExhaustiveNearestNeighbors, PLearn::DeepBeliefNet, PLearn::GaussianDBNClassification, PLearn::GaussianDBNRegression, PLearn::GaussPartSupervisedDBN, PLearn::HintonDeepBeliefNet, PLearn::PartSupervisedDBN, PLearn::StackedModulesLearner, PLearn::SupervisedDBN, PLearn::SemiSupervisedDBN, PLearn::SubsamplingDBN, PLearn::ModuleLearner, PLearn::ModulesLearner, PLearn::StackedAutoassociatorsNet, PLearn::AutoLinearRegressor, PLearn::BaseRegressorConfidence, PLearn::BaseRegressorWrapper, PLearn::BasisSelectionRegressor, PLearn::ConstantRegressor, PLearn::CubicSpline, PLearn::GaussianProcessRegressor, PLearn::KernelRidgeRegressor, PLearn::KNNRegressor, PLearn::LinearRegressor, PLearn::LocalMedBoost, PLearn::PLS, PLearn::RankLearner, PLearn::RegressionTree, PLearn::RegressorFromDistribution, PLearn::WPLS, PLearn::EmbeddedSequentialLearner, PLearn::MovingAverage, PLearn::SequentialModelSelector, PLearn::EntropyContrast, PLearn::EntropyContrastLearner, PLearn::DiverseComponentAnalysis, PLearn::GaussianContinuum, PLearn::GaussMixLocalProjections, PLearn::IsomapTangentLearner, PLearn::KernelProjection, PLearn::KMeansClustering, PLearn::KPCATangentLearner, PLearn::LLC, PLearn::NormalizationLearner, PLearn::PCA, PLearn::TangentLearner, PLearn::TargetEncodingLearner, PLearn::UniformizeLearner, PLearn::DeepFeatureExtractorNNet, PLearn::DeepNonLocalManifoldParzen, PLearn::DenoisingRecurrentNet, PLearn::MoleculeTemplateLearner, PLearn::TestLearner, PLearn::DiscriminativeDeepBeliefNet, PLearn::DiscriminativeRBM, PLearn::DynamicallyLinkedRBMsModel, PLearn::FeatureSetSequentialCRF, PLearn::LinearInductiveTransferClassifier, PLearn::ManifoldParzen, PLearn::NxProfileLearner, PLearn::NeuralProbabilisticLanguageModel, PLearn::NnlmOnlineLearner, PLearn::PseudolikelihoodRBM, PLearn::RankingFromKernel, PLearn::StackedFocusedAutoassociatorsNet, PLearn::StackedSVDNet, PLearn::StructuralLearner, and PLearn::TopDownAsymetricDeepNetwork.

Referenced by declareMethods(), getTestCostIndex(), PLearn::SequentialLearner::matlabSave(), PLearn::SequentialLearner::nTestCosts(), nTestCosts(), and test().

Here is the caller graph for this function:

int PLearn::PLearner::getTrainCostIndex ( const string &  costname) const

Returns the index of the given cost in the vector of traincosts (objectives); calls PLERROR (throws a PLearnException) if requested cost is not found.

Reimplemented in PLearn::GaussianProcessRegressor.

Definition at line 716 of file PLearner.cc.

References getTrainCostNames(), i, PLearn::TVec< T >::length(), PLERROR, and PLearn::tostring().

{
    TVec<string> costnames = getTrainCostNames();
    for(int i=0; i<costnames.length(); i++)
        if(costnames[i]==costname)
            return i;
    PLERROR("In PLearner::getTrainCostIndex, No train cost named %s in this learner.\n"
            "Available train costs are: %s", costname.c_str(), tostring(costnames).c_str());
    return -1;
}

Here is the call graph for this function:

virtual TVec<string> PLearn::PLearner::getTrainCostNames ( ) const [pure virtual]

*** SUBCLASS WRITING: ***

This should return the names of the objective costs that the train method computes and for which it updates the VecStatsCollector train_stats.

Implemented in PLearn::AnalyzeDond2DiscreteVariables, PLearn::AnalyzeFieldStats, PLearn::CheckDond2FileSequence, PLearn::ComputeDond2Target, PLearn::ComputePurenneError, PLearn::DichotomizeDond2DiscreteVariables, PLearn::Experimentation, PLearn::FixDond2BinaryVariables, PLearn::MergeDond2Files, PLearn::NeighborhoodConditionalMean, PLearn::Preprocessing, PLearn::SecondIterationWrapper, PLearn::StabilisationLearner, PLearn::TestImputations, PLearn::BinaryStump, PLearn::ClassifierFromConditionalPDistribution, PLearn::ClassifierFromDensity, PLearn::KFoldLogisticClassifier, PLearn::LocalGaussianClassifier, PLearn::FeatureSetNaiveBayesClassifier, PLearn::KNNClassifier, PLearn::MultiInstanceNNet, PLearn::SVMClassificationTorch, PLearn::ConditionalDensityNet, PLearn::GaussianProcessRegressor, PLearn::GaussMix, PLearn::PDistribution, PLearn::AddCostToLearner, PLearn::BestAveragingPLearner, PLearn::ChainedLearners, PLearn::DeepNNet, PLearn::DistRepNNet, PLearn::EmbeddedLearner, PLearn::DeepReconstructorNet, PLearn::mNNet, PLearn::NatGradNNet, PLearn::NatGradSMPNNet, PLearn::FeatureSetNNet, PLearn::IdentityPLearner, PLearn::IncrementalNNet, PLearn::NeighborhoodSmoothnessNNet, PLearn::NNet, PLearn::PythonProcessedLearner, PLearn::StackedLearner, PLearn::TestingLearner, PLearn::TorchLearner, PLearn::VPLCombinedLearner, PLearn::VPLPreprocessedLearner, PLearn::VPLPreprocessedLearner2, PLearn::VPLProcessor, PLearn::HyperLearner, PLearn::AdaBoost, PLearn::BaggingLearner, PLearn::CompareLearner, PLearn::MultiClassAdaBoost, PLearn::PrecomputedProcessedLearner, PLearn::VariableSelectionWithDirectedGradientDescent, PLearn::BallTreeNearestNeighbors, PLearn::ExhaustiveNearestNeighbors, PLearn::DeepBeliefNet, PLearn::GaussPartSupervisedDBN, PLearn::HintonDeepBeliefNet, PLearn::PartSupervisedDBN, PLearn::StackedModulesLearner, PLearn::SupervisedDBN, PLearn::SemiSupervisedDBN, PLearn::SubsamplingDBN, PLearn::ModuleLearner, PLearn::ModulesLearner, PLearn::StackedAutoassociatorsNet, PLearn::AutoLinearRegressor, PLearn::BaseRegressorConfidence, PLearn::BaseRegressorWrapper, PLearn::BasisSelectionRegressor, PLearn::ConstantRegressor, PLearn::CubicSpline, PLearn::GaussianProcessRegressor, PLearn::KernelRidgeRegressor, PLearn::KNNRegressor, PLearn::LinearRegressor, PLearn::LocalMedBoost, PLearn::PLS, PLearn::RankLearner, PLearn::RegressionTree, PLearn::RegressorFromDistribution, PLearn::WPLS, PLearn::EmbeddedSequentialLearner, PLearn::MovingAverage, PLearn::SequentialModelSelector, PLearn::EntropyContrast, PLearn::EntropyContrastLearner, PLearn::DiverseComponentAnalysis, PLearn::GaussianContinuum, PLearn::GaussMixLocalProjections, PLearn::IsomapTangentLearner, PLearn::KernelProjection, PLearn::KMeansClustering, PLearn::KPCATangentLearner, PLearn::LLC, PLearn::NormalizationLearner, PLearn::PCA, PLearn::TangentLearner, PLearn::TargetEncodingLearner, PLearn::UniformizeLearner, PLearn::DeepFeatureExtractorNNet, PLearn::DeepNonLocalManifoldParzen, PLearn::DenoisingRecurrentNet, PLearn::MoleculeTemplateLearner, PLearn::TestLearner, PLearn::DiscriminativeDeepBeliefNet, PLearn::DiscriminativeRBM, PLearn::DynamicallyLinkedRBMsModel, PLearn::FeatureSetSequentialCRF, PLearn::LinearInductiveTransferClassifier, PLearn::ManifoldParzen, PLearn::NxProfileLearner, PLearn::NeuralProbabilisticLanguageModel, PLearn::NnlmOnlineLearner, PLearn::PseudolikelihoodRBM, PLearn::RankingFromKernel, PLearn::StackedFocusedAutoassociatorsNet, PLearn::StackedSVDNet, PLearn::StructuralLearner, and PLearn::TopDownAsymetricDeepNetwork.

Referenced by declareMethods(), getTrainCostIndex(), nTrainCosts(), and setTrainStatsCollector().

Here is the caller graph for this function:

VMat PLearn::PLearner::getTrainingSet ( ) const [inline]
PP<VecStatsCollector> PLearn::PLearner::getTrainStatsCollector ( ) [inline]

Returns the train stats collector.

Definition at line 298 of file PLearner.h.

Referenced by declareMethods(), PLearn::KernelRidgeRegressor::train(), and PLearn::BestAveragingPLearner::train().

    {
        return train_stats;
    }

Here is the caller graph for this function:

VMat PLearn::PLearner::getValidationSet ( ) const [inline]

Returns the current validation set.

Definition at line 285 of file PLearner.h.

    {
        return validation_set;
    }
bool PLearn::PLearner::initTrain ( ) [protected]

This method may be called by any PLearner at the very beginning of the 'train' method.

It will:

  • ensure that 'nstages' is non-negative (return false otherwise)
  • compare the stage to reach ('nstages') to the current PLearner stage: + if nstages > stage, do nothing (standard case) + if nstages == stage, return false + if nstages < stage, display a warning message (when verbosity >= 1) and call forget() (reverting to a previous stage means we need to start again from stage 0)
  • check that a training set has been properly set (if it is not the case, a warning is displayed and 'false' is returned)
  • initialize a standard train_stats VecStatsCollector if there is none already Except in the cases described above, 'true' is returned. A 'false' value means that no training should take place.

Definition at line 1271 of file PLearner.cc.

References PLearn::Object::classname(), forget(), nstages, PLWARNING, setTrainStatsCollector(), stage, PLearn::tostring(), train_set, train_stats, and verbosity.

Referenced by PLearn::UnfrozenDeepBeliefNet::train(), PLearn::TargetEncodingLearner::train(), PLearn::SupervisedDBN::train(), PLearn::SubsamplingDBN::train(), PLearn::StackedModulesLearner::train(), PLearn::PseudolikelihoodRBM::train(), PLearn::PartSupervisedDBN::train(), PLearn::NxProfileLearner::train(), PLearn::NormalizationLearner::train(), PLearn::NnlmOnlineLearner::train(), PLearn::ModulesLearner::train(), PLearn::ModuleLearner::train(), PLearn::KFoldLogisticClassifier::train(), PLearn::HintonDeepBeliefNet::train(), PLearn::GaussPartSupervisedDBN::train(), PLearn::GaussMix::train(), PLearn::GaussianDBNRegression::train(), PLearn::GaussianDBNClassification::train(), PLearn::DynamicallyLinkedRBMsModel::train(), PLearn::DiverseComponentAnalysis::train(), PLearn::DiscriminativeRBM::train(), PLearn::DenoisingRecurrentNet::train(), PLearn::DeepReconstructorNet::train(), PLearn::DeepBeliefNet::train(), PLearn::BestAveragingPLearner::train(), PLearn::BasisSelectionRegressor::train(), PLearn::BaggingLearner::train(), PLearn::AutoLinearRegressor::train(), and PLearn::DenoisingRecurrentNet::trainUnconditionalPredictor().

{
    string warn_msg = "In PLearner::initTrain (called by '" +
        this->classname() + "') - ";

    // Check 'nstages' is valid.
    if (nstages < 0) {
        PLWARNING((warn_msg + "Option nstages (set to " + tostring(nstages)
                    + ") must be non-negative").c_str());
        return false;
    }

    // Check we actually need to train.
    if (stage == nstages) {
        if (verbosity >= 1)
            PLWARNING((warn_msg + "The learner is already trained").c_str());
        return false;
    }

    if (stage > nstages) {
        if (verbosity >= 1) {
            string msg = warn_msg + "Learner was already trained up to stage "
                + tostring(stage) + ", but asked to train up to nstages="
                + tostring(nstages) + ": it will be reverted to stage 0 and "
                                      "trained again";
            PLWARNING(msg.c_str());
        }
        forget();
    }

    // Check there is a training set.
    if (!train_set) {
        if (verbosity >= 1)
            PLWARNING((warn_msg + "No training set specified").c_str());
        return false;
    }

    // Initialize train_stats if needed.
    if (!train_stats)
        train_stats = new VecStatsCollector();

    // Meta learners may need to set the stats_collector of their sub-learners
    setTrainStatsCollector(train_stats);

    // Everything is fine.
    return true;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int PLearn::PLearner::inputsize ( ) const [virtual]

Default returns inputsize_ cached from train_set->inputsize()

Reimplemented in PLearn::TransformationLearner, PLearn::GaussianDistribution, PLearn::SpiralDistribution, PLearn::EmbeddedLearner, and PLearn::SelectInputSubsetLearner.

Definition at line 616 of file PLearner.cc.

References inputsize_, and PLERROR.

Referenced by PLearn::BallTreeNearestNeighbors::anchorTrain(), PLearn::BasisSelectionRegressor::appendKernelFunctions(), PLearn::BallTreeNearestNeighbors::BallKNN(), batchComputeOutputAndConfidence(), PLearn::RegressionTree::build_(), PLearn::NnlmOnlineLearner::build_(), PLearn::NNet::build_(), PLearn::NGramDistribution::build_(), PLearn::NeighborhoodSmoothnessNNet::build_(), PLearn::MultiInstanceNNet::build_(), PLearn::ModulesLearner::build_(), PLearn::LocalMedBoost::build_(), PLearn::LinearInductiveTransferClassifier::build_(), PLearn::EntropyContrastLearner::build_(), PLearn::EntropyContrast::build_(), PLearn::DynamicallyLinkedRBMsModel::build_(), PLearn::DenoisingRecurrentNet::build_(), PLearn::DeepFeatureExtractorNNet::build_(), PLearn::ClassifierFromConditionalPDistribution::build_(), PLearn::SupervisedDBN::build_layers(), PLearn::PartSupervisedDBN::build_layers(), PLearn::HintonDeepBeliefNet::build_layers(), PLearn::GaussPartSupervisedDBN::build_layers(), PLearn::GaussianDBNRegression::build_layers(), PLearn::GaussianDBNClassification::build_layers(), PLearn::SubsamplingDBN::build_layers_and_connections(), PLearn::PseudolikelihoodRBM::build_layers_and_connections(), PLearn::DiscriminativeRBM::build_layers_and_connections(), PLearn::DeepNonLocalManifoldParzen::build_layers_and_connections(), PLearn::DeepBeliefNet::build_layers_and_connections(), PLearn::StackedModulesLearner::buildLayers(), PLearn::NnlmOnlineLearner::buildLayers(), PLearn::BasisSelectionRegressor::buildSimpleCandidateFunctions(), PLearn::DistRepNNet::buildVarGraph(), PLearn::PseudolikelihoodRBM::compute_Z(), PLearn::ClassifierFromConditionalPDistribution::computeCostsFromOutputs(), PLearn::BallTreeNearestNeighbors::computeCostsFromOutputs(), computeInputOutputConfMat(), computeInputOutputMat(), PLearn::DeepNonLocalManifoldParzen::computeManifoldParzenParameters(), PLearn::VPLCombinedLearner::computeOutput(), PLearn::VariableSelectionWithDirectedGradientDescent::computeOutput(), PLearn::ManifoldParzen::computeOutput(), PLearn::LocalGaussianClassifier::computeOutput(), PLearn::LinearRegressor::computeOutput(), PLearn::KPCATangentLearner::computeOutput(), PLearn::KNNRegressor::computeOutput(), PLearn::KNNClassifier::computeOutput(), PLearn::IsomapTangentLearner::computeOutput(), PLearn::EntropyContrastLearner::computeOutput(), PLearn::DeepNonLocalManifoldParzen::computeOutput(), PLearn::ClassifierFromConditionalPDistribution::computeOutput(), PLearn::AutoLinearRegressor::computeOutput(), PLearn::VPLPreprocessedLearner2::computeOutputAndCosts(), PLearn::VPLPreprocessedLearner::computeOutputAndCosts(), PLearn::VPLCombinedLearner::computeOutputAndCosts(), computeOutputConfMat(), computeOutputCovMat(), PLearn::StackedAutoassociatorsNet::computeOutputs(), PLearn::PLS::computeResidVariance(), PLearn::NnlmOnlineLearner::computeTrainCostsFromOutputs(), PLearn::GenericNearestNeighbors::constructOutputVector(), PLearn::BallTreeNearestNeighbors::createAnchors(), PLearn::DenoisingRecurrentNet::encode_artificialData(), PLearn::DeepNonLocalManifoldParzen::fineTuningStep(), PLearn::VariableSelectionWithDirectedGradientDescent::forget(), PLearn::KMeansClustering::forget(), PLearn::DynamicallyLinkedRBMsModel::generate(), PLearn::DenoisingRecurrentNet::generate(), PLearn::DenoisingRecurrentNet::generateArtificial(), PLearn::TangentLearner::initializeParams(), PLearn::NeighborhoodSmoothnessNNet::initializeParams(), PLearn::MultiInstanceNNet::initializeParams(), PLearn::GaussianContinuumDistribution::initializeParams(), PLearn::GaussianContinuum::initializeParams(), PLearn::DistRepNNet::initializeParams(), PLearn::LocalMedBoost::initializeSampleWeight(), PLearn::GaussianDistribution::inputsize(), PLearn::BallTreeNearestNeighbors::leafFromAnchor(), PLearn::NeighborhoodBoxVolumeDensityEstimator::log_density(), PLearn::LocallyMagnifiedDistribution::log_density(), PLearn::NnlmOnlineLearner::myGetExample(), PLearn::StackedAutoassociatorsNet::onlineStep(), PLearn::VPLProcessor::outputsize(), PLearn::UniformizeLearner::outputsize(), PLearn::KPCATangentLearner::outputsize(), PLearn::IsomapTangentLearner::outputsize(), PLearn::CubicSpline::outputsize(), PLearn::ClassifierFromConditionalPDistribution::outputsize(), PLearn::LocalMedBoost::recomputeSampleWeight(), PLearn::NnlmOnlineLearner::reevaluateGaussianParameters(), PLearn::PythonProcessedLearner::setOutputNamesFromParams(), PLearn::StackedFocusedAutoassociatorsNet::setTrainingSet(), PLearn::PythonProcessedLearner::setTrainingSet(), PLearn::LocalGaussianClassifier::setTrainingSet(), PLearn::DenoisingRecurrentNet::splitRawMaskedSupervisedSequence(), test(), PLearn::NnlmOnlineLearner::test(), PLearn::MultiClassAdaBoost::test(), PLearn::MovingAverage::test(), PLearn::DynamicallyLinkedRBMsModel::test(), PLearn::VariableSelectionWithDirectedGradientDescent::train(), PLearn::UnfrozenDeepBeliefNet::train(), PLearn::TopDownAsymetricDeepNetwork::train(), PLearn::TangentLearner::train(), PLearn::SupervisedDBN::train(), PLearn::SubsamplingDBN::train(), PLearn::StackedSVDNet::train(), PLearn::StackedModulesLearner::train(), PLearn::StackedFocusedAutoassociatorsNet::train(), PLearn::StackedAutoassociatorsNet::train(), PLearn::PseudolikelihoodRBM::train(), PLearn::PruningLinearRegressor::train(), PLearn::PartSupervisedDBN::train(), PLearn::NxProfileLearner::train(), PLearn::NnlmOnlineLearner::train(), PLearn::MovingAverage::train(), PLearn::ModulesLearner::train(), PLearn::ManifoldParzen::train(), PLearn::LinearRegressor::train(), PLearn::LinearInductiveTransferClassifier::train(), PLearn::KMeansClustering::train(), PLearn::KernelRidgeRegressor::train(), PLearn::IncrementalNNet::train(), PLearn::HistogramDistribution::train(), PLearn::HintonDeepBeliefNet::train(), PLearn::GaussPartSupervisedDBN::train(), PLearn::GaussianProcessRegressor::train(), PLearn::GaussianDBNRegression::train(), PLearn::GaussianDBNClassification::train(), PLearn::GaussianContinuumDistribution::train(), PLearn::GaussianContinuum::train(), PLearn::EntropyContrastLearner::train(), PLearn::DynamicallyLinkedRBMsModel::train(), PLearn::DiverseComponentAnalysis::train(), PLearn::DiscriminativeRBM::train(), PLearn::DiscriminativeDeepBeliefNet::train(), PLearn::DeepNonLocalManifoldParzen::train(), PLearn::DeepBeliefNet::train(), PLearn::CubicSpline::train(), PLearn::ConstantRegressor::train(), PLearn::ConditionalDensityNet::train(), PLearn::ClassifierFromDensity::train(), PLearn::ClassifierFromConditionalPDistribution::train(), PLearn::BinaryStump::train(), PLearn::AdaBoost::train(), PLearn::EntropyContrast::update_alpha(), PLearn::DeepNonLocalManifoldParzen::updateManifoldParzenParameters(), PLearn::DiscriminativeDeepBeliefNet::updateNearestNeighbors(), PLearn::StackedFocusedAutoassociatorsNet::updateTrainSetRepresentations(), and use().

{ 
    if (inputsize_<0)
        PLERROR("Must specify a training set before calling PLearner::inputsize()"
                " (or use a training set with a valid inputsize)"); 
    return inputsize_; 
}
bool PLearn::PLearner::isStatefulLearner ( ) const [virtual]

Does this PLearner has an internal state? Default: false.

Reimplemented in PLearn::EmbeddedLearner, PLearn::StatefulLearner, PLearn::VPLCombinedLearner, PLearn::VPLPreprocessedLearner, PLearn::VPLPreprocessedLearner2, and PLearn::BaggingLearner.

Definition at line 1325 of file PLearner.cc.

Referenced by test().

{
    return false;
}

Here is the caller graph for this function:

void PLearn::PLearner::makeDeepCopyFromShallowCopy ( CopiesMap copies) [protected, virtual]

Transforms a shallow copy into a deep copy.

Reimplemented from PLearn::Object.

Reimplemented in PLearn::AnalyzeDond2DiscreteVariables, PLearn::AnalyzeFieldStats, PLearn::CheckDond2FileSequence, PLearn::ComputeDond2Target, PLearn::ComputePurenneError, PLearn::DichotomizeDond2DiscreteVariables, PLearn::Experimentation, PLearn::FixDond2BinaryVariables, PLearn::MergeDond2Files, PLearn::NeighborhoodConditionalMean, PLearn::Preprocessing, PLearn::SecondIterationWrapper, PLearn::StabilisationLearner, PLearn::TestImputations, PLearn::BinaryStump, PLearn::ClassifierFromConditionalPDistribution, PLearn::ClassifierFromDensity, PLearn::KFoldLogisticClassifier, PLearn::LocalGaussianClassifier, PLearn::FeatureSetNaiveBayesClassifier, PLearn::KNNClassifier, PLearn::MultiInstanceNNet, PLearn::SVMClassificationTorch, PLearn::ToBagClassifier, PLearn::ConditionalDensityNet, PLearn::GaussianContinuumDistribution, PLearn::GaussianProcessRegressor, PLearn::PConditionalDistribution, PLearn::LocallyMagnifiedDistribution, PLearn::NeighborhoodBoxVolumeDensityEstimator, PLearn::TransformationLearner, PLearn::GaussianDistribution, PLearn::GaussMix, PLearn::HistogramDistribution, PLearn::KernelDensityEstimator, PLearn::ManifoldParzen2, PLearn::MixtureDistribution, PLearn::NGramDistribution, PLearn::NonLocalManifoldParzen, PLearn::ParzenWindow, PLearn::PDistribution, PLearn::RandomGaussMix, PLearn::RBMDistribution, PLearn::SpiralDistribution, PLearn::UnconditionalDistribution, PLearn::UniformDistribution, PLearn::AddCostToLearner, PLearn::AddLayersNNet, PLearn::BestAveragingPLearner, PLearn::ChainedLearners, PLearn::DeepNNet, PLearn::DistRepNNet, PLearn::EmbeddedLearner, PLearn::DeepReconstructorNet, PLearn::mNNet, PLearn::NatGradNNet, PLearn::NatGradSMPNNet, PLearn::PvGradNNet, PLearn::FeatureSetNNet, PLearn::HorizonStatefulLearner, PLearn::IncrementalNNet, PLearn::NeighborhoodSmoothnessNNet, PLearn::NNet, PLearn::PythonProcessedLearner, PLearn::SelectInputSubsetLearner, PLearn::StackedLearner, PLearn::StatefulLearner, PLearn::TestingLearner, PLearn::TorchLearner, PLearn::VPLCombinedLearner, PLearn::VPLPreprocessedLearner, PLearn::VPLPreprocessedLearner2, PLearn::VPLProcessor, PLearn::HyperLearner, PLearn::AdaBoost, PLearn::BaggingLearner, PLearn::CompareLearner, PLearn::MultiClassAdaBoost, PLearn::PrecomputedProcessedLearner, PLearn::VariableSelectionWithDirectedGradientDescent, PLearn::BallTreeNearestNeighbors, PLearn::ExhaustiveNearestNeighbors, PLearn::GenericNearestNeighbors, PLearn::DeepBeliefNet, PLearn::GaussianDBNClassification, PLearn::GaussianDBNRegression, PLearn::GaussPartSupervisedDBN, PLearn::HintonDeepBeliefNet, PLearn::PartSupervisedDBN, PLearn::StackedModulesLearner, PLearn::SupervisedDBN, PLearn::UnfrozenDeepBeliefNet, PLearn::SemiSupervisedDBN, PLearn::SubsamplingDBN, PLearn::ModuleLearner, PLearn::ModulesLearner, PLearn::StackedAutoassociatorsNet, PLearn::AutoLinearRegressor, PLearn::BaseRegressorConfidence, PLearn::BaseRegressorWrapper, PLearn::BasisSelectionRegressor, PLearn::ConstantRegressor, PLearn::CubicSpline, PLearn::GaussianProcessRegressor, PLearn::KernelRidgeRegressor, PLearn::KNNRegressor, PLearn::LinearRegressor, PLearn::LocalMedBoost, PLearn::PLS, PLearn::PruningLinearRegressor, PLearn::RankLearner, PLearn::RegressionTree, PLearn::RegressorFromDistribution, PLearn::WPLS, PLearn::EmbeddedSequentialLearner, PLearn::SequentialLearner, PLearn::SequentialModelSelector, PLearn::EntropyContrast, PLearn::EntropyContrastLearner, PLearn::DiverseComponentAnalysis, PLearn::GaussianContinuum, PLearn::GaussMixLocalProjections, PLearn::Isomap, PLearn::IsomapTangentLearner, PLearn::KernelPCA, PLearn::KernelProjection, PLearn::KMeansClustering, PLearn::KPCATangentLearner, PLearn::LLC, PLearn::LLE, PLearn::NormalizationLearner, PLearn::PCA, PLearn::SpectralClustering, PLearn::TangentLearner, PLearn::TargetEncodingLearner, PLearn::UniformizeLearner, PLearn::DeepFeatureExtractorNNet, PLearn::DeepNonLocalManifoldParzen, PLearn::DenoisingRecurrentNet, PLearn::MoleculeTemplateLearner, PLearn::TestLearner, PLearn::DiscriminativeDeepBeliefNet, PLearn::DiscriminativeRBM, PLearn::DynamicallyLinkedRBMsModel, PLearn::FeatureSetSequentialCRF, PLearn::LinearInductiveTransferClassifier, PLearn::ManifoldKNNDistribution, PLearn::ManifoldParzen, PLearn::NxProfileLearner, PLearn::NeuralProbabilisticLanguageModel, PLearn::NnlmOnlineLearner, PLearn::PseudolikelihoodRBM, PLearn::RankingFromKernel, PLearn::StackedFocusedAutoassociatorsNet, PLearn::StackedSVDNet, PLearn::StructuralLearner, PLearn::SurfaceTemplateLearner, and PLearn::TopDownAsymetricDeepNetwork.

Definition at line 112 of file PLearner.cc.

References b_costs, b_inputs, b_outputs, b_targets, b_weights, PLearn::deepCopyField(), PLearn::Object::makeDeepCopyFromShallowCopy(), random_gen, tmp_output, train_set, train_stats, and validation_set.

Referenced by PLearn::WPLS::makeDeepCopyFromShallowCopy(), PLearn::VPLProcessor::makeDeepCopyFromShallowCopy(), PLearn::VPLPreprocessedLearner2::makeDeepCopyFromShallowCopy(), PLearn::VPLPreprocessedLearner::makeDeepCopyFromShallowCopy(), PLearn::VPLCombinedLearner::makeDeepCopyFromShallowCopy(), PLearn::VariableSelectionWithDirectedGradientDescent::makeDeepCopyFromShallowCopy(), PLearn::UniformizeLearner::makeDeepCopyFromShallowCopy(), PLearn::TorchLearner::makeDeepCopyFromShallowCopy(), PLearn::TopDownAsymetricDeepNetwork::makeDeepCopyFromShallowCopy(), PLearn::TargetEncodingLearner::makeDeepCopyFromShallowCopy(), PLearn::TangentLearner::makeDeepCopyFromShallowCopy(), PLearn::SubsamplingDBN::makeDeepCopyFromShallowCopy(), PLearn::StatefulLearner::makeDeepCopyFromShallowCopy(), PLearn::StackedSVDNet::makeDeepCopyFromShallowCopy(), PLearn::StackedModulesLearner::makeDeepCopyFromShallowCopy(), PLearn::StackedLearner::makeDeepCopyFromShallowCopy(), PLearn::StackedFocusedAutoassociatorsNet::makeDeepCopyFromShallowCopy(), PLearn::StackedAutoassociatorsNet::makeDeepCopyFromShallowCopy(), PLearn::StabilisationLearner::makeDeepCopyFromShallowCopy(), PLearn::SequentialLearner::makeDeepCopyFromShallowCopy(), PLearn::SemiSupervisedDBN::makeDeepCopyFromShallowCopy(), PLearn::SecondIterationWrapper::makeDeepCopyFromShallowCopy(), PLearn::RegressionTree::makeDeepCopyFromShallowCopy(), PLearn::PythonProcessedLearner::makeDeepCopyFromShallowCopy(), PLearn::PseudolikelihoodRBM::makeDeepCopyFromShallowCopy(), PLearn::PrecomputedProcessedLearner::makeDeepCopyFromShallowCopy(), PLearn::PLS::makeDeepCopyFromShallowCopy(), PLearn::PDistribution::makeDeepCopyFromShallowCopy(), PLearn::PCA::makeDeepCopyFromShallowCopy(), PLearn::NxProfileLearner::makeDeepCopyFromShallowCopy(), PLearn::NormalizationLearner::makeDeepCopyFromShallowCopy(), PLearn::NnlmOnlineLearner::makeDeepCopyFromShallowCopy(), PLearn::NNet::makeDeepCopyFromShallowCopy(), PLearn::NeuralProbabilisticLanguageModel::makeDeepCopyFromShallowCopy(), PLearn::NeighborhoodSmoothnessNNet::makeDeepCopyFromShallowCopy(), PLearn::NatGradSMPNNet::makeDeepCopyFromShallowCopy(), PLearn::NatGradNNet::makeDeepCopyFromShallowCopy(), PLearn::MultiInstanceNNet::makeDeepCopyFromShallowCopy(), PLearn::MultiClassAdaBoost::makeDeepCopyFromShallowCopy(), PLearn::MoleculeTemplateLearner::makeDeepCopyFromShallowCopy(), PLearn::ModulesLearner::makeDeepCopyFromShallowCopy(), PLearn::ModuleLearner::makeDeepCopyFromShallowCopy(), PLearn::mNNet::makeDeepCopyFromShallowCopy(), PLearn::ManifoldParzen::makeDeepCopyFromShallowCopy(), PLearn::LocalMedBoost::makeDeepCopyFromShallowCopy(), PLearn::LocalGaussianClassifier::makeDeepCopyFromShallowCopy(), PLearn::LLC::makeDeepCopyFromShallowCopy(), PLearn::LinearRegressor::makeDeepCopyFromShallowCopy(), PLearn::LinearInductiveTransferClassifier::makeDeepCopyFromShallowCopy(), PLearn::KPCATangentLearner::makeDeepCopyFromShallowCopy(), PLearn::KNNRegressor::makeDeepCopyFromShallowCopy(), PLearn::KNNClassifier::makeDeepCopyFromShallowCopy(), PLearn::KMeansClustering::makeDeepCopyFromShallowCopy(), PLearn::KFoldLogisticClassifier::makeDeepCopyFromShallowCopy(), PLearn::KernelRidgeRegressor::makeDeepCopyFromShallowCopy(), PLearn::KernelProjection::makeDeepCopyFromShallowCopy(), PLearn::IsomapTangentLearner::makeDeepCopyFromShallowCopy(), PLearn::IncrementalNNet::makeDeepCopyFromShallowCopy(), PLearn::GenericNearestNeighbors::makeDeepCopyFromShallowCopy(), PLearn::GaussianContinuum::makeDeepCopyFromShallowCopy(), PLearn::FeatureSetSequentialCRF::makeDeepCopyFromShallowCopy(), PLearn::FeatureSetNNet::makeDeepCopyFromShallowCopy(), PLearn::FeatureSetNaiveBayesClassifier::makeDeepCopyFromShallowCopy(), PLearn::EntropyContrastLearner::makeDeepCopyFromShallowCopy(), PLearn::EntropyContrast::makeDeepCopyFromShallowCopy(), PLearn::EmbeddedLearner::makeDeepCopyFromShallowCopy(), PLearn::DynamicallyLinkedRBMsModel::makeDeepCopyFromShallowCopy(), PLearn::DiverseComponentAnalysis::makeDeepCopyFromShallowCopy(), PLearn::DistRepNNet::makeDeepCopyFromShallowCopy(), PLearn::DiscriminativeRBM::makeDeepCopyFromShallowCopy(), PLearn::DiscriminativeDeepBeliefNet::makeDeepCopyFromShallowCopy(), PLearn::DenoisingRecurrentNet::makeDeepCopyFromShallowCopy(), PLearn::DeepReconstructorNet::makeDeepCopyFromShallowCopy(), PLearn::DeepNonLocalManifoldParzen::makeDeepCopyFromShallowCopy(), PLearn::DeepNNet::makeDeepCopyFromShallowCopy(), PLearn::DeepFeatureExtractorNNet::makeDeepCopyFromShallowCopy(), PLearn::DeepBeliefNet::makeDeepCopyFromShallowCopy(), PLearn::CubicSpline::makeDeepCopyFromShallowCopy(), PLearn::ConstantRegressor::makeDeepCopyFromShallowCopy(), PLearn::ComputeDond2Target::makeDeepCopyFromShallowCopy(), PLearn::CompareLearner::makeDeepCopyFromShallowCopy(), PLearn::ClassifierFromDensity::makeDeepCopyFromShallowCopy(), PLearn::ClassifierFromConditionalPDistribution::makeDeepCopyFromShallowCopy(), PLearn::BinaryStump::makeDeepCopyFromShallowCopy(), PLearn::BestAveragingPLearner::makeDeepCopyFromShallowCopy(), PLearn::BasisSelectionRegressor::makeDeepCopyFromShallowCopy(), PLearn::BaseRegressorWrapper::makeDeepCopyFromShallowCopy(), PLearn::BaseRegressorConfidence::makeDeepCopyFromShallowCopy(), PLearn::BaggingLearner::makeDeepCopyFromShallowCopy(), PLearn::AutoLinearRegressor::makeDeepCopyFromShallowCopy(), PLearn::AnalyzeFieldStats::makeDeepCopyFromShallowCopy(), and PLearn::AdaBoost::makeDeepCopyFromShallowCopy().

Here is the call graph for this function:

int PLearn::PLearner::nTestCosts ( ) const [virtual]

Caches getTestCostNames().size() in an internal variable the first time it is called, and then returns the content of this variable.

Reimplemented in PLearn::GaussianProcessRegressor, PLearn::BaggingLearner, PLearn::ExhaustiveNearestNeighbors, and PLearn::SequentialLearner.

Definition at line 687 of file PLearner.cc.

References getTestCostNames(), n_test_costs_, and PLearn::TVec< T >::size().

Referenced by PLearn::NatGradSMPNNet::build_(), PLearn::AddCostToLearner::computeCostsFromOutputs(), PLearn::NNet::computeCostsFromOutputs(), PLearn::AdaBoost::computeCostsFromOutputs(), PLearn::StackedAutoassociatorsNet::computeCostsFromOutputs(), PLearn::MultiClassAdaBoost::computeCostsFromOutputs_(), PLearn::StatefulLearner::computeOutput(), PLearn::VPLProcessor::computeOutputAndCosts(), PLearn::AdaBoost::computeOutputAndCosts(), PLearn::RegressionTree::computeOutputAndCosts(), PLearn::VPLCombinedLearner::computeOutputAndCosts(), PLearn::VPLPreprocessedLearner2::computeOutputAndCosts(), PLearn::VPLPreprocessedLearner::computeOutputAndCosts(), PLearn::MultiClassAdaBoost::computeOutputAndCosts(), PLearn::NNet::computeOutputAndCosts(), PLearn::mNNet::computeOutputsAndCosts(), PLearn::NatGradNNet::computeOutputsAndCosts(), computeOutputsAndCosts(), PLearn::StackedAutoassociatorsNet::computeOutputsAndCosts(), remote_computeCostsFromOutputs(), remote_computeCostsOnly(), remote_computeOutputAndCosts(), remote_test(), sub_test(), PLearn::MultiClassAdaBoost::test(), PLearn::DynamicallyLinkedRBMsModel::test(), PLearn::AdaBoost::test(), PLearn::PseudolikelihoodRBM::test(), test(), PLearn::DenoisingRecurrentNet::test(), PLearn::RegressionTree::train(), PLearn::ToBagClassifier::updateCostAndBagOutput(), and use().

Here is the call graph for this function:

Here is the caller graph for this function:

int PLearn::PLearner::nTrainCosts ( ) const [virtual]

Caches getTrainCostNames().size() in an internal variable the first time it is called, and then returns the content of this variable.

Reimplemented in PLearn::GaussianProcessRegressor, and PLearn::BaggingLearner.

Definition at line 697 of file PLearner.cc.

References getTrainCostNames(), n_train_costs_, and PLearn::TVec< T >::size().

Referenced by PLearn::AdaBoost::computeCostsFromOutputs(), PLearn::AdaBoost::computeOutputAndCosts(), PLearn::AdaBoost::computeTrainingError(), PLearn::IncrementalNNet::train(), PLearn::NatGradSMPNNet::train(), PLearn::BestAveragingPLearner::train(), and PLearn::KMeansClustering::train().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual int PLearn::PLearner::outputsize ( ) const [pure virtual]

SUBCLASS WRITING: override this so that it returns the size of this learner's output, as a function of its inputsize(), targetsize() and set options.

Implemented in PLearn::AnalyzeDond2DiscreteVariables, PLearn::AnalyzeFieldStats, PLearn::CheckDond2FileSequence, PLearn::ComputeDond2Target, PLearn::ComputePurenneError, PLearn::DichotomizeDond2DiscreteVariables, PLearn::Experimentation, PLearn::FixDond2BinaryVariables, PLearn::MergeDond2Files, PLearn::NeighborhoodConditionalMean, PLearn::Preprocessing, PLearn::SecondIterationWrapper, PLearn::StabilisationLearner, PLearn::TestImputations, PLearn::BinaryStump, PLearn::ClassifierFromConditionalPDistribution, PLearn::ClassifierFromDensity, PLearn::KFoldLogisticClassifier, PLearn::LocalGaussianClassifier, PLearn::FeatureSetNaiveBayesClassifier, PLearn::KNNClassifier, PLearn::MultiInstanceNNet, PLearn::GaussianContinuumDistribution, PLearn::GaussianProcessRegressor, PLearn::GaussMix, PLearn::ManifoldParzen2, PLearn::NonLocalManifoldParzen, PLearn::PDistribution, PLearn::BestAveragingPLearner, PLearn::ChainedLearners, PLearn::DeepNNet, PLearn::DistRepNNet, PLearn::EmbeddedLearner, PLearn::DeepReconstructorNet, PLearn::mNNet, PLearn::NatGradNNet, PLearn::NatGradSMPNNet, PLearn::FeatureSetNNet, PLearn::IdentityPLearner, PLearn::IncrementalNNet, PLearn::NeighborhoodSmoothnessNNet, PLearn::NNet, PLearn::PythonProcessedLearner, PLearn::StackedLearner, PLearn::TestingLearner, PLearn::TorchLearner, PLearn::TransformOutputLearner, PLearn::VPLCombinedLearner, PLearn::VPLPreprocessedLearner, PLearn::VPLPreprocessedLearner2, PLearn::VPLProcessor, PLearn::AdaBoost, PLearn::BaggingLearner, PLearn::CompareLearner, PLearn::MultiClassAdaBoost, PLearn::PrecomputedProcessedLearner, PLearn::VariableSelectionWithDirectedGradientDescent, PLearn::GenericNearestNeighbors, PLearn::DeepBeliefNet, PLearn::StackedModulesLearner, PLearn::SemiSupervisedDBN, PLearn::SubsamplingDBN, PLearn::ModuleLearner, PLearn::ModulesLearner, PLearn::StackedAutoassociatorsNet, PLearn::AutoLinearRegressor, PLearn::BaseRegressorConfidence, PLearn::BaseRegressorWrapper, PLearn::BasisSelectionRegressor, PLearn::ConstantRegressor, PLearn::CubicSpline, PLearn::GaussianProcessRegressor, PLearn::KernelRidgeRegressor, PLearn::KNNRegressor, PLearn::LinearRegressor, PLearn::LocalMedBoost, PLearn::PLS, PLearn::RankLearner, PLearn::RegressionTree, PLearn::RegressorFromDistribution, PLearn::WPLS, PLearn::SequentialLearner, PLearn::EntropyContrast, PLearn::EntropyContrastLearner, PLearn::DiverseComponentAnalysis, PLearn::GaussianContinuum, PLearn::GaussMixLocalProjections, PLearn::IsomapTangentLearner, PLearn::KernelProjection, PLearn::KMeansClustering, PLearn::KPCATangentLearner, PLearn::LLC, PLearn::NormalizationLearner, PLearn::PCA, PLearn::TangentLearner, PLearn::TargetEncodingLearner, PLearn::UniformizeLearner, PLearn::DeepFeatureExtractorNNet, PLearn::DeepNonLocalManifoldParzen, PLearn::DenoisingRecurrentNet, PLearn::MoleculeTemplateLearner, PLearn::TestLearner, PLearn::DiscriminativeDeepBeliefNet, PLearn::DiscriminativeRBM, PLearn::DynamicallyLinkedRBMsModel, PLearn::FeatureSetSequentialCRF, PLearn::LinearInductiveTransferClassifier, PLearn::ManifoldParzen, PLearn::NxProfileLearner, PLearn::NeuralProbabilisticLanguageModel, PLearn::NnlmOnlineLearner, PLearn::PseudolikelihoodRBM, PLearn::RankingFromKernel, PLearn::StackedFocusedAutoassociatorsNet, PLearn::StackedSVDNet, PLearn::StructuralLearner, and PLearn::TopDownAsymetricDeepNetwork.

Referenced by batchComputeOutputAndConfidence(), computeCostsOnly(), PLearn::StatefulLearner::computeCostsOnly(), computeInputOutputConfMat(), computeInputOutputMat(), computeOutputConfMat(), computeOutputCovMat(), computeOutputsAndCosts(), declareMethods(), getOutputNames(), remote_batchComputeOutputAndConfidence(), remote_computeOutput(), remote_computeOutputAndCosts(), remote_computeOutputs(), remote_test(), remote_use(), remote_use2(), sub_test(), test(), use(), and useOnTrain().

Here is the caller graph for this function:

VMat PLearn::PLearner::processDataSet ( VMat  dataset) const [virtual]

Process a full dataset (possibly containing input,target,weight,extra parts).

Returns processed view of that dataset. The default version uses computeOutput to process the input part, and simply passes on the other parts unchanged.

Reimplemented in PLearn::FeatureSetNaiveBayesClassifier, PLearn::FeatureSetNNet, PLearn::VPLProcessor, PLearn::PrecomputedProcessedLearner, PLearn::FeatureSetSequentialCRF, and PLearn::NeuralProbabilisticLanguageModel.

Definition at line 936 of file PLearner.cc.

Referenced by PLearn::FeatureSetSequentialCRF::processDataSet(), PLearn::FeatureSetNNet::processDataSet(), PLearn::NeuralProbabilisticLanguageModel::processDataSet(), PLearn::FeatureSetNaiveBayesClassifier::processDataSet(), and PLearn::PrecomputedProcessedLearner::processDataSet().

{
    // PLearnerOutputVMatrix does exactly this.
    return new PLearnerOutputVMatrix(dataset, this);
}

Here is the caller graph for this function:

void PLearn::PLearner::remote_batchComputeOutputAndConfidence ( VMat  inputs,
real  probability,
string  pmat_fname 
) const [private]

Version of batchComputeOutputAndConfidence that's called by RMI.

Definition at line 1523 of file PLearner.cc.

References PLearn::TVec< T >::append(), batchComputeOutputAndConfidence(), j, PLearn::VMat::length(), outputsize(), and PLearn::tostring().

Referenced by declareMethods().

{
    TVec<string> fieldnames;
    for(int j=0; j<outputsize(); j++)
    {
        fieldnames.append("output_"+tostring(j));
        fieldnames.append("low_"+tostring(j));
        fieldnames.append("high_"+tostring(j));
    }
    VMat out_and_conf = new FileVMatrix(pmat_fname,inputs.length(),fieldnames);
    batchComputeOutputAndConfidence(inputs, probability, out_and_conf);
}

Here is the call graph for this function:

Here is the caller graph for this function:

TVec< pair< real, real > > PLearn::PLearner::remote_computeConfidenceFromOutput ( const Vec input,
const Vec output,
real  probability 
) const [private]

Version of computeConfidenceFromOutput that's called by RMI.

Definition at line 1501 of file PLearner.cc.

References computeConfidenceFromOutput(), and PLearn::TVec< T >::length().

Referenced by declareMethods().

{
    TVec< pair<real,real> > intervals(output.length());
    bool ok = computeConfidenceFromOutput(input, output, probability, intervals);
    if (ok)
        return intervals;
    else
        return TVec< pair<real,real> >();
}

Here is the call graph for this function:

Here is the caller graph for this function:

Vec PLearn::PLearner::remote_computeCostsFromOutputs ( const Vec input,
const Vec output,
const Vec target 
) const [private]

Version of computeCostsFromOutputs that's called by RMI.

Definition at line 1483 of file PLearner.cc.

References computeCostsFromOutputs(), and nTestCosts().

Referenced by declareMethods().

{
    Vec costs(nTestCosts());
    computeCostsFromOutputs(input,output,target,costs);
    return costs;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Vec PLearn::PLearner::remote_computeCostsOnly ( const Vec input,
const Vec target 
) const [private]

Version of computeCostsOnly that's called by RMI.

Definition at line 1492 of file PLearner.cc.

References computeCostsOnly(), and nTestCosts().

Referenced by declareMethods().

{
    Vec costs(nTestCosts());
    computeCostsOnly(input,target,costs);
    return costs;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Vec PLearn::PLearner::remote_computeOutput ( const Vec input) const [private]

Version of computeOutput that returns a result by value.

Definition at line 1425 of file PLearner.cc.

References computeOutput(), outputsize(), PLearn::TVec< T >::resize(), and tmp_output.

Referenced by declareMethods().

{
    int os = outputsize();
    tmp_output.resize(os >= 0 ? os : 0);
    computeOutput(input, tmp_output);
    return tmp_output;
}

Here is the call graph for this function:

Here is the caller graph for this function:

tuple< Vec, Vec > PLearn::PLearner::remote_computeOutputAndCosts ( const Vec input,
const Vec target 
) const [private]

Version of computeOutputAndCosts that's called by RMI.

Definition at line 1474 of file PLearner.cc.

References computeOutputAndCosts(), nTestCosts(), outputsize(), PLearn::TVec< T >::resize(), and tmp_output.

Referenced by declareMethods().

{
    tmp_output.resize(outputsize());
    Vec costs(nTestCosts());
    computeOutputAndCosts(input,target,tmp_output,costs);
    return make_tuple(tmp_output, costs);
}

Here is the call graph for this function:

Here is the caller graph for this function:

tuple< Mat, TVec< Mat > > PLearn::PLearner::remote_computeOutputCovMat ( const Mat inputs) const [private]

Version of computeOutputCovMat that's called by RMI.

Definition at line 1514 of file PLearner.cc.

References computeOutputCovMat().

Referenced by declareMethods().

{
    Mat outputs;
    TVec<Mat> covmat;
    computeOutputCovMat(inputs, outputs, covmat);
    return make_tuple(outputs, covmat);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Mat PLearn::PLearner::remote_computeOutputs ( const Mat input) const [private]

Definition at line 1436 of file PLearner.cc.

References computeOutputs(), PLearn::TMat< T >::length(), and outputsize().

Referenced by declareMethods().

{
    Mat out(input.length(), outputsize() >= 0 ? outputsize() : 0);
    computeOutputs(input, out);
    return out;
}

Here is the call graph for this function:

Here is the caller graph for this function:

pair< Mat, Mat > PLearn::PLearner::remote_computeOutputsAndCosts ( const Mat input,
const Mat target 
) const [private]

Definition at line 1446 of file PLearner.cc.

References computeOutputsAndCosts().

Referenced by declareMethods().

{
    Mat output, cost;
    computeOutputsAndCosts(input, target, output, cost);
    return pair<Mat, Mat>(output, cost);
}

Here is the call graph for this function:

Here is the caller graph for this function:

tuple< PP< VecStatsCollector >, VMat, VMat > PLearn::PLearner::remote_test ( VMat  testset,
PP< VecStatsCollector test_stats,
bool  rtestoutputs,
bool  rtestcosts 
) const [virtual]

'remote' interface for test

Definition at line 1252 of file PLearner.cc.

References PLearn::VMat::length(), nTestCosts(), outputsize(), and test().

Referenced by declareMethods().

{
    VMat testoutputs= 0;
    VMat testcosts= 0;
    int outsize= outputsize();
    if (outsize < 0)
        // Negative outputsize: the output will be empty to avoid a crash.
        outsize = 0;
    int costsize= nTestCosts();
    int len= testset.length();
    if(rtestoutputs) testoutputs= new MemoryVMatrix(len, outsize);
    if(rtestcosts) testcosts= new MemoryVMatrix(len, costsize);
    test(testset, test_stats, testoutputs, testcosts);
    return make_tuple(test_stats, testoutputs, testcosts);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::PLearner::remote_use ( VMat  inputs,
string  output_fname 
) const [private]

Version of use that's called by RMI.

Definition at line 1458 of file PLearner.cc.

References PLearn::VMat::length(), outputsize(), and use().

Referenced by declareMethods().

{
    VMat outputs = new FileVMatrix(output_fname, inputs.length(), outputsize());
    use(inputs,outputs);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Mat PLearn::PLearner::remote_use2 ( VMat  inputs) const [private]

Version of use2 that's called by RMI.

Definition at line 1465 of file PLearner.cc.

References PLearn::VMat::length(), outputsize(), and use().

Referenced by declareMethods().

{
    Mat outputs(inputs.length(), outputsize());
    use(inputs,outputs);
    return outputs;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Mat PLearn::PLearner::remote_useOnTrain ( ) const [virtual]

'remote' version of useOnTrain

Definition at line 961 of file PLearner.cc.

References useOnTrain().

Referenced by declareMethods().

{
    Mat outputs;
    useOnTrain(outputs);
    return outputs;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::PLearner::resetInternalState ( ) [virtual]

If any, reset the internal state Default: do nothing.

Reimplemented in PLearn::EmbeddedLearner, PLearn::StatefulLearner, PLearn::VPLCombinedLearner, PLearn::VPLPreprocessedLearner, PLearn::VPLPreprocessedLearner2, and PLearn::BaggingLearner.

Definition at line 1322 of file PLearner.cc.

Referenced by declareMethods().

{ }

Here is the caller graph for this function:

void PLearn::PLearner::setExperimentDirectory ( const PPath the_expdir) [virtual]

The experiment directory is the directory in which files related to this model are to be saved.

If it is an empty string, it is understood to mean that the user doesn't want any file created by this learner.

Reimplemented in PLearn::BestAveragingPLearner, PLearn::ChainedLearners, PLearn::EmbeddedLearner, PLearn::StackedLearner, PLearn::TestingLearner, PLearn::VPLCombinedLearner, PLearn::VPLPreprocessedLearner, PLearn::VPLPreprocessedLearner2, PLearn::BaggingLearner, PLearn::CompareLearner, PLearn::BasisSelectionRegressor, PLearn::SequentialModelSelector, and PLearn::TargetEncodingLearner.

Definition at line 561 of file PLearner.cc.

References PLearn::PPath::absolute(), expdir, PLearn::force_mkdir(), and PLERROR.

Referenced by declareMethods(), PLearn::VPLPreprocessedLearner2::setExperimentDirectory(), PLearn::VPLPreprocessedLearner::setExperimentDirectory(), PLearn::VPLCombinedLearner::setExperimentDirectory(), PLearn::TargetEncodingLearner::setExperimentDirectory(), PLearn::EmbeddedLearner::setExperimentDirectory(), PLearn::BestAveragingPLearner::setExperimentDirectory(), PLearn::BasisSelectionRegressor::setExperimentDirectory(), and PLearn::BaggingLearner::setExperimentDirectory().

{ 
    if(the_expdir=="")
        expdir = "";
    else
    {
        if(!force_mkdir(the_expdir))
            PLERROR("In PLearner::setExperimentDirectory Could not create experiment directory %s",
                    the_expdir.absolute().c_str());
        expdir = the_expdir / "";
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::PLearner::setTrainingSet ( VMat  training_set,
bool  call_forget = true 
) [virtual]

Declares the training set.

Then calls build() and forget() if necessary. Also sets this learner's inputsize_ targetsize_ weightsize_ from those of the training_set. Note: You shouldn't have to override this in subclasses, except in maybe to forward the call to an underlying learner.

Reimplemented in PLearn::LocalGaussianClassifier, PLearn::KNNClassifier, PLearn::MultiInstanceNNet, PLearn::SVMClassificationTorch, PLearn::ToBagClassifier, PLearn::GaussMix, PLearn::AddCostToLearner, PLearn::BestAveragingPLearner, PLearn::ChainedLearners, PLearn::EmbeddedLearner, PLearn::NeighborhoodSmoothnessNNet, PLearn::NNet, PLearn::PythonProcessedLearner, PLearn::SelectInputSubsetLearner, PLearn::StackedLearner, PLearn::StatefulLearner, PLearn::TestingLearner, PLearn::TorchLearner, PLearn::VPLCombinedLearner, PLearn::VPLPreprocessedLearner, PLearn::VPLPreprocessedLearner2, PLearn::VPLProcessor, PLearn::HyperLearner, PLearn::AdaBoost, PLearn::BaggingLearner, PLearn::CompareLearner, PLearn::MultiClassAdaBoost, PLearn::VariableSelectionWithDirectedGradientDescent, PLearn::ExhaustiveNearestNeighbors, PLearn::BasisSelectionRegressor, PLearn::GaussianProcessRegressor, PLearn::KNNRegressor, PLearn::PruningLinearRegressor, PLearn::RankLearner, PLearn::RegressorFromDistribution, PLearn::SequentialLearner, PLearn::KernelProjection, PLearn::PCA, PLearn::TargetEncodingLearner, PLearn::UniformizeLearner, PLearn::DeepNonLocalManifoldParzen, PLearn::DenoisingRecurrentNet, PLearn::DiscriminativeDeepBeliefNet, PLearn::ManifoldParzen, PLearn::StackedFocusedAutoassociatorsNet, and PLearn::SurfaceTemplateLearner.

Definition at line 574 of file PLearner.cc.

References build(), expdir, forget(), forget_when_training_set_changes, inputsize_, PLearn::VMat::length(), n_examples, save_trainingset_prefix, targetsize_, PLearn::tostring(), train_set, and weightsize_.

Referenced by PLearn::BallTreeNearestNeighbors::BallTreeNearestNeighbors(), declareMethods(), PLearn::HistogramDistribution::HistogramDistribution(), PLearn::VPLProcessor::setTrainingSet(), PLearn::VPLPreprocessedLearner2::setTrainingSet(), PLearn::VPLPreprocessedLearner::setTrainingSet(), PLearn::VPLCombinedLearner::setTrainingSet(), PLearn::VariableSelectionWithDirectedGradientDescent::setTrainingSet(), PLearn::UniformizeLearner::setTrainingSet(), PLearn::TorchLearner::setTrainingSet(), PLearn::TargetEncodingLearner::setTrainingSet(), PLearn::StackedLearner::setTrainingSet(), PLearn::StackedFocusedAutoassociatorsNet::setTrainingSet(), PLearn::RankLearner::setTrainingSet(), PLearn::PythonProcessedLearner::setTrainingSet(), PLearn::PruningLinearRegressor::setTrainingSet(), PLearn::PCA::setTrainingSet(), PLearn::NNet::setTrainingSet(), PLearn::MultiClassAdaBoost::setTrainingSet(), PLearn::ManifoldParzen::setTrainingSet(), PLearn::LocalGaussianClassifier::setTrainingSet(), PLearn::KNNRegressor::setTrainingSet(), PLearn::KNNClassifier::setTrainingSet(), PLearn::KernelProjection::setTrainingSet(), PLearn::GaussMix::setTrainingSet(), PLearn::ExhaustiveNearestNeighbors::setTrainingSet(), PLearn::EmbeddedLearner::setTrainingSet(), PLearn::DiscriminativeDeepBeliefNet::setTrainingSet(), PLearn::DenoisingRecurrentNet::setTrainingSet(), PLearn::DeepNonLocalManifoldParzen::setTrainingSet(), PLearn::BestAveragingPLearner::setTrainingSet(), PLearn::BasisSelectionRegressor::setTrainingSet(), PLearn::BaggingLearner::setTrainingSet(), and PLearn::AdaBoost::setTrainingSet().

{ 
    // YB: je ne suis pas sur qu'il soit necessaire de faire un build si la
    // LONGUEUR du train_set a change?  les methodes non-parametriques qui
    // utilisent la longueur devrait faire leur "resize" dans train, pas dans
    // build.
    bool training_set_has_changed = !train_set || !(train_set->looksTheSameAs(training_set));
    train_set = training_set;
    if (training_set_has_changed)
    {
        inputsize_ = train_set->inputsize();
        targetsize_ = train_set->targetsize();
        weightsize_ = train_set->weightsize();
        if (forget_when_training_set_changes)
            call_forget=true;
    }
    n_examples = train_set->length();
    if (training_set_has_changed || call_forget)
        build(); // MODIF FAITE PAR YOSHUA: sinon apres un setTrainingSet le build n'est pas complete dans un NNet train_set = training_set;
    if (call_forget)
        forget();

    // Save the new training set if desired
    if (save_trainingset_prefix != "" && expdir != "") {
        static int trainingset_serial = 1;
        PPath fname = expdir / (save_trainingset_prefix + "_trainset_" +
                                tostring(trainingset_serial++) + ".pmat");
        train_set->savePMAT(fname);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::PLearner::setTrainStatsCollector ( PP< VecStatsCollector statscol) [virtual]
void PLearn::PLearner::setValidationSet ( VMat  validset) [virtual]
tuple< PP< VecStatsCollector >, VMat, VMat > PLearn::PLearner::sub_test ( VMat  testset,
PP< VecStatsCollector test_stats,
bool  rtestoutputs,
bool  rtestcosts 
) const [virtual]

sub-test: Called by parallel test on chunks of the testset.

Performs test on testset, returns stats and optionally testoutputs and testcosts

Definition at line 1229 of file PLearner.cc.

References PLearn::VMat::length(), nTestCosts(), outputsize(), and test().

Referenced by declareMethods(), and PLearn::SequentialModelSelector::train().

{
    VMat testoutputs= 0;
    VMat testcosts= 0;
    int outsize= outputsize();
    int costsize= nTestCosts();
    int len= testset.length();
    if(rtestoutputs) testoutputs= new MemoryVMatrix(len, outsize);
    if(rtestcosts) testcosts= new MemoryVMatrix(len, costsize);
    if(test_stats)
    {
        if(test_stats->maxnvalues > 0) test_stats->maxnvalues= -1; // get all counts from a chunk
        if(test_stats->m_window == -1 || test_stats->m_window > 0)
            test_stats->setWindowSize(-2); // get all observations
    }
    test(testset, test_stats, testoutputs, testcosts);
    return make_tuple(test_stats, testoutputs, testcosts);
}

Here is the call graph for this function:

Here is the caller graph for this function:

int PLearn::PLearner::targetsize ( ) const [virtual]

Default returns targetsize_ cached from train_set->targetsize()

Reimplemented in PLearn::ToBagClassifier, and PLearn::EmbeddedLearner.

Definition at line 624 of file PLearner.cc.

References PLearn::Object::classname(), PLERROR, and targetsize_.

Referenced by PLearn::RegressionTree::build_(), PLearn::PseudolikelihoodRBM::build_(), PLearn::NeighborhoodSmoothnessNNet::build_(), PLearn::MultiInstanceNNet::build_(), PLearn::ModulesLearner::build_(), PLearn::LocalMedBoost::build_(), PLearn::LinearInductiveTransferClassifier::build_(), PLearn::DynamicallyLinkedRBMsModel::build_(), PLearn::DenoisingRecurrentNet::build_(), PLearn::DiscriminativeRBM::build_classification_cost(), PLearn::PseudolikelihoodRBM::build_costs(), PLearn::DiscriminativeRBM::build_costs(), PLearn::SubsamplingDBN::build_final_cost(), PLearn::DeepBeliefNet::build_final_cost(), PLearn::PseudolikelihoodRBM::build_layers_and_connections(), PLearn::NNet::buildTargetAndWeight(), PLearn::LinearInductiveTransferClassifier::buildTargetAndWeight(), PLearn::DeepFeatureExtractorNNet::buildTargetAndWeight(), PLearn::PseudolikelihoodRBM::compute_Z(), PLearn::PseudolikelihoodRBM::computeCostsFromOutputs(), PLearn::LinearInductiveTransferClassifier::computeCostsFromOutputs(), PLearn::DiscriminativeRBM::computeCostsFromOutputs(), PLearn::BallTreeNearestNeighbors::computeCostsFromOutputs(), PLearn::VariableSelectionWithDirectedGradientDescent::computeOutput(), PLearn::StatefulLearner::computeOutput(), PLearn::PseudolikelihoodRBM::computeOutput(), PLearn::ModuleLearner::computeOutput(), PLearn::ManifoldParzen::computeOutput(), PLearn::DiscriminativeRBM::computeOutput(), PLearn::DeepNonLocalManifoldParzen::computeOutput(), PLearn::VPLPreprocessedLearner2::computeOutputAndCosts(), PLearn::VPLPreprocessedLearner::computeOutputAndCosts(), PLearn::VPLCombinedLearner::computeOutputAndCosts(), PLearn::LinearInductiveTransferClassifier::computeOutputAndCosts(), PLearn::GenericNearestNeighbors::constructOutputVector(), PLearn::DenoisingRecurrentNet::encode_artificialData(), PLearn::KMeansClustering::forget(), PLearn::DiscriminativeRBM::forget(), PLearn::DynamicallyLinkedRBMsModel::generate(), PLearn::DenoisingRecurrentNet::generate(), PLearn::DenoisingRecurrentNet::generateArtificial(), PLearn::NNet::getCost(), PLearn::LocalMedBoost::initializeSampleWeight(), PLearn::LocallyMagnifiedDistribution::log_density(), PLearn::VariableSelectionWithDirectedGradientDescent::outputsize(), PLearn::PseudolikelihoodRBM::outputsize(), PLearn::LinearRegressor::outputsize(), PLearn::KernelRidgeRegressor::outputsize(), PLearn::ConstantRegressor::outputsize(), PLearn::AutoLinearRegressor::outputsize(), PLearn::LocalMedBoost::recomputeSampleWeight(), PLearn::DiscriminativeRBM::setLearningRate(), PLearn::PythonProcessedLearner::setOutputNamesFromParams(), PLearn::VariableSelectionWithDirectedGradientDescent::setTrainingSet(), PLearn::StackedFocusedAutoassociatorsNet::setTrainingSet(), PLearn::PythonProcessedLearner::setTrainingSet(), PLearn::PruningLinearRegressor::setTrainingSet(), PLearn::LocalGaussianClassifier::setTrainingSet(), PLearn::DenoisingRecurrentNet::splitRawMaskedSupervisedSequence(), PLearn::PseudolikelihoodRBM::test(), test(), PLearn::MultiClassAdaBoost::test(), PLearn::MovingAverage::test(), PLearn::DynamicallyLinkedRBMsModel::test(), PLearn::VariableSelectionWithDirectedGradientDescent::train(), PLearn::UnfrozenDeepBeliefNet::train(), PLearn::TopDownAsymetricDeepNetwork::train(), PLearn::SupervisedDBN::train(), PLearn::SubsamplingDBN::train(), PLearn::StackedSVDNet::train(), PLearn::StackedModulesLearner::train(), PLearn::StackedFocusedAutoassociatorsNet::train(), PLearn::StackedAutoassociatorsNet::train(), PLearn::PseudolikelihoodRBM::train(), PLearn::PartSupervisedDBN::train(), PLearn::NxProfileLearner::train(), PLearn::NatGradSMPNNet::train(), PLearn::NatGradNNet::train(), PLearn::MovingAverage::train(), PLearn::ModulesLearner::train(), PLearn::mNNet::train(), PLearn::ManifoldParzen::train(), PLearn::LinearRegressor::train(), PLearn::LinearInductiveTransferClassifier::train(), PLearn::KMeansClustering::train(), PLearn::KernelRidgeRegressor::train(), PLearn::IncrementalNNet::train(), PLearn::HistogramDistribution::train(), PLearn::HintonDeepBeliefNet::train(), PLearn::GaussPartSupervisedDBN::train(), PLearn::GaussianProcessRegressor::train(), PLearn::GaussianDBNRegression::train(), PLearn::GaussianDBNClassification::train(), PLearn::DynamicallyLinkedRBMsModel::train(), PLearn::DiscriminativeRBM::train(), PLearn::DiscriminativeDeepBeliefNet::train(), PLearn::DeepNonLocalManifoldParzen::train(), PLearn::DeepNNet::train(), PLearn::DeepBeliefNet::train(), PLearn::CubicSpline::train(), PLearn::ConstantRegressor::train(), PLearn::ConditionalDensityNet::train(), PLearn::ClassifierFromDensity::train(), PLearn::ClassifierFromConditionalPDistribution::train(), PLearn::AdaBoost::train(), PLearn::DeepNonLocalManifoldParzen::updateManifoldParzenParameters(), PLearn::DiscriminativeDeepBeliefNet::updateNearestNeighbors(), PLearn::StackedFocusedAutoassociatorsNet::updateTrainSetRepresentations(), and use().

{ 
    if(targetsize_ == -1) 
        PLERROR("In PLearner::targetsize (%s)- 'targetsize_' is -1,"
                " either no training set has beeen specified or its sizes"
                " were not set properly", this->classname().c_str());
    return targetsize_; 
}

Here is the call graph for this function:

void PLearn::PLearner::test ( VMat  testset,
PP< VecStatsCollector test_stats,
VMat  testoutputs = 0,
VMat  testcosts = 0 
) const [virtual]

Performs test on testset, updating test cost statistics, and optionally filling testoutputs and testcosts.

The default version repeatedly calls computeOutputAndCosts or computeCostsOnly. Note that neither test_stats->forget() nor test_stats->finalize() is called, so that you should call them yourself (respectively before and after calling this method) if you don't plan to accumulate statistics.

Reimplemented in PLearn::FeatureSetNaiveBayesClassifier, PLearn::AddCostToLearner, PLearn::EmbeddedLearner, PLearn::FeatureSetNNet, PLearn::TransformOutputLearner, PLearn::AdaBoost, PLearn::MultiClassAdaBoost, PLearn::DeepBeliefNet, PLearn::SubsamplingDBN, PLearn::EmbeddedSequentialLearner, PLearn::MovingAverage, PLearn::SequentialLearner, PLearn::SequentialModelSelector, PLearn::DenoisingRecurrentNet, PLearn::MoleculeTemplateLearner, PLearn::DynamicallyLinkedRBMsModel, PLearn::FeatureSetSequentialCRF, PLearn::NeuralProbabilisticLanguageModel, PLearn::NnlmOnlineLearner, PLearn::PseudolikelihoodRBM, PLearn::StructuralLearner, and PLearn::SurfaceTemplateLearner.

Definition at line 971 of file PLearner.cc.

References PLearn::PLearnService::availableServers(), b, b_costs, b_inputs, b_outputs, b_targets, b_weights, computeOutputAndCosts(), computeOutputsAndCosts(), PLearn::TVec< T >::fill(), PLearn::PLearnService::freeServer(), PLearn::VMat::getExample(), getTestCostNames(), i, inputsize(), PLearn::PLearnService::instance(), isStatefulLearner(), j, PLearn::TVec< T >::length(), PLearn::VMat::length(), master_sends_testset_rows, PLearn::min(), nservers, nTestCosts(), outputsize(), parallelize_here, PLearn::Profiler::pl_profile_end(), PLearn::Profiler::pl_profile_start(), random_gen, report_progress, PLearn::PLearnService::reserveServers(), PLearn::TVec< T >::resize(), PLearn::TMat< T >::resize(), targetsize(), test_minibatch_size, PLearn::VMat::toMat(), use_a_separate_random_generator_for_testing, and PLearn::PLearnService::waitForResult().

Referenced by remote_test(), sub_test(), PLearn::SurfaceTemplateLearner::test(), PLearn::SubsamplingDBN::test(), PLearn::PseudolikelihoodRBM::test(), PLearn::NeuralProbabilisticLanguageModel::test(), PLearn::MultiClassAdaBoost::test(), PLearn::MoleculeTemplateLearner::test(), PLearn::FeatureSetSequentialCRF::test(), PLearn::FeatureSetNNet::test(), PLearn::FeatureSetNaiveBayesClassifier::test(), PLearn::EmbeddedLearner::test(), PLearn::DeepBeliefNet::test(), PLearn::AdaBoost::test(), and PLearn::KernelRidgeRegressor::train().

{

    Profiler::pl_profile_start("PLearner::test");

    int len = testset.length();
    Vec input;
    Vec target;
    real weight;
    int out_size = outputsize() >= 0 ? outputsize() : 0;

    Vec output(out_size);
    Vec costs(nTestCosts());

    if (test_stats) {
        // Set names of test_stats costs
        test_stats->setFieldNames(getTestCostNames());

        if (len == 0) {
            // Empty test set: we give -1 cost arbitrarily.
            costs.fill(-1);
            test_stats->update(costs);
        }
    }

    PP<ProgressBar> pb;
    if (report_progress)
        pb = new ProgressBar("Testing learner", len);

    PP<PRandom> copy_random_gen=0;
    if (use_a_separate_random_generator_for_testing && random_gen)
    {
        CopiesMap copies;
        copy_random_gen = random_gen->deepCopy(copies);
        random_gen->manual_seed(use_a_separate_random_generator_for_testing);
    }

    PLearnService& service(PLearnService::instance());

    //DUMMY: need to find a better way to calc. nservers -xsm
    const int chunksize= 2500;//nb. rows in each chunk sent to a remote server
    const int chunks_per_server= 3;//ideal nb. chunks per server
    int nservers= min(len/(chunks_per_server*chunksize), service.availableServers());

    if(nservers > 1 && parallelize_here && !isStatefulLearner())
    {// parallel test
        CopiesMap copies;
        PP<VecStatsCollector> template_vsc= test_stats? test_stats->deepCopy(copies) : 0;
        TVec<PP<RemotePLearnServer> > servers= service.reserveServers(nservers);
        nservers= servers.length();
        int curpos= 0;
        int chunks_called= 0;
        int last_chunknum= -1;
        map<PP<RemotePLearnServer>, int> learners_ids;
        map<PP<RemotePLearnServer>, int> chunknums;
        map<int, PP<VecStatsCollector> > vscs;
        map<PP<RemotePLearnServer>, int> chunkszs;
        int rowsdone= 0;

        bool rep_prog= report_progress;
        const_cast<bool&>(report_progress)= false;//servers dont report progress
        for(int i= 0; i < nservers; ++i)
            servers[i]->newObjectAsync(*this);
        const_cast<bool&>(report_progress)= rep_prog;

        while(nservers > 0)
        {
            PP<RemotePLearnServer> s= service.waitForResult();
            if(learners_ids.find(s) == learners_ids.end())
            {
                if(curpos < len) // get learner id and send first chunk to process
                {
                    /* step 1 (once per slave) */
                    int id;
                    s->getResults(id);
                    learners_ids[s]= id;
                    int clen= min(chunksize, testset.length()-curpos);
                    chunkszs[s]= clen;
                    VMat sts= new RowsSubVMatrix(testset, curpos, clen);
                    if(master_sends_testset_rows)
                        sts= new MemoryVMatrix(sts.toMat());
                    else
                    {
                        // send testset once and for all, put it in object map of remote server
                        int tsid= s->newObject(*testset);
                        s->link(tsid, testset);
                    }
                    curpos+= clen;
                    s->callMethod(id, "sub_test", sts, template_vsc, 
                                  static_cast<bool>(testoutputs), static_cast<bool>(testcosts));
                    chunknums[s]= chunks_called;
                    ++chunks_called;
                }
                else // all chunks processed, free server
                {
                    /* step 4 (once per slave) */
                    s->getResults(); // learner deleted
                    s->unlink(testset);
                    service.freeServer(s);
                    --nservers;
                }
            }
            else // get chunk result
            {
                PP<VecStatsCollector> vsc;
                VMat chunkout, chunkcosts;

                s->getResults(vsc, chunkout, chunkcosts);

                rowsdone+= chunkszs[s];
                if(report_progress) pb->update(rowsdone);

                int chunknum= chunknums[s];
                if(curpos < len) // more chunks to do, assign one to this server
                {
                    /* step 2 (repeat as needed) */
                    int clen= min(chunksize, testset.length()-curpos);
                    chunkszs[s]= clen;
                    VMat sts= new RowsSubVMatrix(testset, curpos, clen);
                    if(master_sends_testset_rows)
                        sts= new MemoryVMatrix(sts.toMat());
                    curpos+= clen;
                    s->callMethod(learners_ids[s], "sub_test", sts, template_vsc, 
                                  static_cast<bool>(testoutputs), static_cast<bool>(testcosts));
                    chunknums[s]= chunks_called;
                    ++chunks_called;
                }
                else // all chunks processed, delete learner form server
                {
                    /* step 3 (once per slave) */
                    s->deleteObjectAsync(learners_ids[s]);
                    learners_ids.erase(s);
                }

                // now merge chunk results w/ global results
                if(test_stats)
                {
                    vscs[chunknum]= vsc;
                    map<int, PP<VecStatsCollector> >::iterator it= vscs.find(last_chunknum+1);
                    while(it != vscs.end())
                    {
                        ++last_chunknum;
                        test_stats->merge(*(it->second));
                        vscs.erase(it);
                        it= vscs.find(last_chunknum+1);
                    }
                }

                if(testoutputs)
                    for(int i= 0, j= chunknum*chunksize; i < chunksize && j < len; ++i, ++j)
                        testoutputs->forcePutRow(j, chunkout->getRowVec(i));
                if(testcosts)
                    for(int i= 0, j= chunknum*chunksize; i < chunksize && j < len; ++i, ++j)
                        testcosts->forcePutRow(j, chunkcosts->getRowVec(i));
            }
        }
    }
    else // Sequential test 
    {
        if (test_minibatch_size==1)
        {
            for (int i = 0; i < len; i++)
            {
                testset.getExample(i, input, target, weight);
                // Always call computeOutputAndCosts, since this is better
                // behaved with stateful learners
                computeOutputAndCosts(input,target,output,costs);
                if (testoutputs) testoutputs->putOrAppendRow(i, output);
                if (testcosts) testcosts->putOrAppendRow(i, costs);
                if (test_stats) test_stats->update(costs, weight);
                if (report_progress) pb->update(i);
            }
        } else
        {
            int n_batches = len/test_minibatch_size, i=0;
            b_inputs.resize(test_minibatch_size,inputsize());
            b_outputs.resize(test_minibatch_size, out_size);
            b_costs.resize(test_minibatch_size,costs.length());
            b_targets.resize(test_minibatch_size,targetsize());
            b_weights.resize(test_minibatch_size);
            for (int b=0;b<n_batches;b++,i+=test_minibatch_size)
            {
                testset->getExamples(i,test_minibatch_size,b_inputs,b_targets,b_weights);
                computeOutputsAndCosts(b_inputs,b_targets,b_outputs,b_costs);
                for (int j=0;j<test_minibatch_size;j++)
                {
                    if (testoutputs) testoutputs->putOrAppendRow(i+j, b_outputs(j));
                    if (testcosts) testcosts->putOrAppendRow(i+j, b_costs(j));
                    if (test_stats) test_stats->update(b_costs(j), b_weights[j]);
                    if (report_progress) pb->update(i+j);
                }
            }
            if (i<len)
            {
                b_inputs.resize(len-i,inputsize());
                b_outputs.resize(len-i, out_size);
                b_costs.resize(len-i,costs.length());
                b_targets.resize(len-i,targetsize());
                b_weights.resize(len-i);
                testset->getExamples(i,len-i,b_inputs,b_targets,b_weights);
                computeOutputsAndCosts(b_inputs,b_targets,b_outputs,b_costs);
                for (int j=0;j<len-i;j++)
                {
                    if (testoutputs) testoutputs->putOrAppendRow(i+j, b_outputs(j));
                    if (testcosts) testcosts->putOrAppendRow(i+j, b_costs(j));
                    if (test_stats) test_stats->update(b_costs(j), b_weights[j]);
                    if (report_progress) pb->update(i+j);
                }
            }
        }
    }

    if (use_a_separate_random_generator_for_testing && random_gen)
        *random_gen = *copy_random_gen;

    Profiler::pl_profile_end("PLearner::test");

}

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void PLearn::PLearner::train ( ) [pure virtual]

*** SUBCLASS WRITING: ***

The role of the train method is to bring the learner up to stage==nstages, updating the stats with training costs measured on-line in the process.

TYPICAL CODE:

  static Vec input;  // static so we don't reallocate/deallocate memory each time...
  static Vec target; // (but be careful that static means shared!)
  input.resize(inputsize());    // the train_set's inputsize()
  target.resize(targetsize());  // the train_set's targetsize()
  real weight;
  
  if(!train_stats)   // make a default stats collector, in case there's none
      train_stats = new VecStatsCollector();
  
  if(nstages<stage)  // asking to revert to a previous stage!
      forget();      // reset the learner to stage=0
  
  while(stage<nstages)
  {
      // clear statistics of previous epoch
      train_stats->forget(); 
            
      //... train for 1 stage, and update train_stats,
      // using train_set->getSample(input, target, weight);
      // and train_stats->update(train_costs)
          
      ++stage;
      train_stats->finalize(); // finalize statistics for this epoch
  }

Implemented in PLearn::AnalyzeDond2DiscreteVariables, PLearn::AnalyzeFieldStats, PLearn::CheckDond2FileSequence, PLearn::ComputeDond2Target, PLearn::ComputePurenneError, PLearn::DichotomizeDond2DiscreteVariables, PLearn::Experimentation, PLearn::FixDond2BinaryVariables, PLearn::MergeDond2Files, PLearn::NeighborhoodConditionalMean, PLearn::Preprocessing, PLearn::SecondIterationWrapper, PLearn::StabilisationLearner, PLearn::TestImputations, PLearn::BinaryStump, PLearn::ClassifierFromConditionalPDistribution, PLearn::ClassifierFromDensity, PLearn::KFoldLogisticClassifier, PLearn::LocalGaussianClassifier, PLearn::FeatureSetNaiveBayesClassifier, PLearn::KNNClassifier, PLearn::MultiInstanceNNet, PLearn::ConditionalDensityNet, PLearn::GaussianContinuumDistribution, PLearn::GaussianProcessRegressor, PLearn::LocallyMagnifiedDistribution, PLearn::NeighborhoodBoxVolumeDensityEstimator, PLearn::TransformationLearner, PLearn::GaussianDistribution, PLearn::GaussMix, PLearn::HistogramDistribution, PLearn::KernelDensityEstimator, PLearn::ManifoldParzen2, PLearn::MixtureDistribution, PLearn::NGramDistribution, PLearn::NonLocalManifoldParzen, PLearn::ParzenWindow, PLearn::PDistribution, PLearn::RandomGaussMix, PLearn::RBMDistribution, PLearn::AddCostToLearner, PLearn::BestAveragingPLearner, PLearn::ChainedLearners, PLearn::DeepNNet, PLearn::DistRepNNet, PLearn::EmbeddedLearner, PLearn::DeepReconstructorNet, PLearn::mNNet, PLearn::NatGradNNet, PLearn::NatGradSMPNNet, PLearn::FeatureSetNNet, PLearn::IdentityPLearner, PLearn::IncrementalNNet, PLearn::NeighborhoodSmoothnessNNet, PLearn::NNet, PLearn::PythonProcessedLearner, PLearn::StackedLearner, PLearn::TestingLearner, PLearn::TorchLearner, PLearn::VPLCombinedLearner, PLearn::VPLPreprocessedLearner, PLearn::VPLPreprocessedLearner2, PLearn::VPLProcessor, PLearn::HyperLearner, PLearn::AdaBoost, PLearn::BaggingLearner, PLearn::CompareLearner, PLearn::MultiClassAdaBoost, PLearn::PrecomputedProcessedLearner, PLearn::VariableSelectionWithDirectedGradientDescent, PLearn::BallTreeNearestNeighbors, PLearn::ExhaustiveNearestNeighbors, PLearn::DeepBeliefNet, PLearn::GaussianDBNClassification, PLearn::GaussianDBNRegression, PLearn::GaussPartSupervisedDBN, PLearn::HintonDeepBeliefNet, PLearn::PartSupervisedDBN, PLearn::StackedModulesLearner, PLearn::SupervisedDBN, PLearn::UnfrozenDeepBeliefNet, PLearn::SemiSupervisedDBN, PLearn::SubsamplingDBN, PLearn::ModuleLearner, PLearn::ModulesLearner, PLearn::StackedAutoassociatorsNet, PLearn::AutoLinearRegressor, PLearn::BaseRegressorConfidence, PLearn::BaseRegressorWrapper, PLearn::BasisSelectionRegressor, PLearn::ConstantRegressor, PLearn::CubicSpline, PLearn::GaussianProcessRegressor, PLearn::KernelRidgeRegressor, PLearn::KNNRegressor, PLearn::LinearRegressor, PLearn::LocalMedBoost, PLearn::PLS, PLearn::PruningLinearRegressor, PLearn::RankLearner, PLearn::RegressionTree, PLearn::RegressorFromDistribution, PLearn::WPLS, PLearn::EmbeddedSequentialLearner, PLearn::MovingAverage, PLearn::SequentialLearner, PLearn::SequentialModelSelector, PLearn::EntropyContrast, PLearn::EntropyContrastLearner, PLearn::DiverseComponentAnalysis, PLearn::GaussianContinuum, PLearn::IsomapTangentLearner, PLearn::KernelProjection, PLearn::KMeansClustering, PLearn::KPCATangentLearner, PLearn::LLC, PLearn::NormalizationLearner, PLearn::PCA, PLearn::TangentLearner, PLearn::TargetEncodingLearner, PLearn::UniformizeLearner, PLearn::DeepFeatureExtractorNNet, PLearn::DeepNonLocalManifoldParzen, PLearn::DenoisingRecurrentNet, PLearn::MoleculeTemplateLearner, PLearn::TestLearner, PLearn::DiscriminativeDeepBeliefNet, PLearn::DiscriminativeRBM, PLearn::DynamicallyLinkedRBMsModel, PLearn::FeatureSetSequentialCRF, PLearn::LinearInductiveTransferClassifier, PLearn::ManifoldKNNDistribution, PLearn::ManifoldParzen, PLearn::NxProfileLearner, PLearn::NeuralProbabilisticLanguageModel, PLearn::NnlmOnlineLearner, PLearn::PseudolikelihoodRBM, PLearn::RankingFromKernel, PLearn::StackedFocusedAutoassociatorsNet, PLearn::StackedSVDNet, PLearn::StructuralLearner, PLearn::SurfaceTemplateLearner, and PLearn::TopDownAsymetricDeepNetwork.

Referenced by declareMethods().

Here is the caller graph for this function:

void PLearn::PLearner::use ( VMat  testset,
VMat  outputs 
) const [virtual]

Computes outputs for the input part of testset.

testset is not required to contain a target part. The default version repeatedly calls computeOutput.

Reimplemented in PLearn::FeatureSetNaiveBayesClassifier, PLearn::FeatureSetNNet, PLearn::FeatureSetSequentialCRF, and PLearn::NeuralProbabilisticLanguageModel.

Definition at line 824 of file PLearner.cc.

References b, b_costs, b_inputs, b_outputs, b_targets, b_weights, computeOutput(), computeOutputs(), DBG_LOG, PLearn::endl(), PLearn::VMat::getExample(), i, inputsize(), PLearn::PLearnService::instance(), j, PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), PLearn::VMat::length(), PLearn::max(), n, PLearn::newObject(), nservers, nTestCosts(), outputsize(), PLERROR, report_progress, PLearn::PLearnService::reserveServers(), PLearn::TVec< T >::resize(), PLearn::TMat< T >::resize(), targetsize(), test_minibatch_size, w, and PLearn::VMat::width().

Referenced by remote_use(), remote_use2(), PLearn::NeuralProbabilisticLanguageModel::use(), PLearn::FeatureSetSequentialCRF::use(), PLearn::FeatureSetNNet::use(), PLearn::FeatureSetNaiveBayesClassifier::use(), and useOnTrain().

{
    int l = testset.length();
    int w = testset.width();

    TVec< PP<RemotePLearnServer> > servers;
    if(nservers>0)
        servers = PLearnService::instance().reserveServers(nservers);

    if(servers.length()==0) 
    { // sequential code      
        Vec input;
        Vec target;
        real weight;
        Vec output(outputsize());

        PP<ProgressBar> pb;
        if(report_progress)
            pb = new ProgressBar("Using learner",l);

        if (test_minibatch_size==1)
        {
            for(int i=0; i<l; i++)
            {
                testset.getExample(i, input, target, weight);
                computeOutput(input, output);
                outputs->putOrAppendRow(i,output);
                if(pb)
                    pb->update(i);
            }
        } else
        {
            int out_size = outputsize() >= 0 ? outputsize() : 0;
            int n_batches = l/test_minibatch_size, i=0;
            b_inputs.resize(test_minibatch_size,inputsize());
            b_outputs.resize(test_minibatch_size, out_size);
            b_costs.resize(test_minibatch_size,nTestCosts());
            b_targets.resize(test_minibatch_size,targetsize());
            b_weights.resize(test_minibatch_size);
            for (int b=0;b<n_batches;b++,i+=test_minibatch_size)
            {
                testset->getExamples(i,test_minibatch_size,b_inputs,b_targets,b_weights);
                computeOutputs(b_inputs,b_outputs);
                for (int j=0;j<test_minibatch_size;j++)
                {
                    outputs->putOrAppendRow(i+j, b_outputs(j));
                }
                if (pb) pb->update(i+test_minibatch_size);
            }
            if (i<l)
            {
                b_inputs.resize(l-i,inputsize());
                b_outputs.resize(l-i, out_size);
                b_costs.resize(l-i,nTestCosts());
                b_targets.resize(l-i,targetsize());
                b_weights.resize(l-i);
                testset->getExamples(i,l-i,b_inputs,b_targets,b_weights);
                computeOutputs(b_inputs,b_outputs);
                for (int j=0;j<l-i;j++)
                {
                    outputs->putOrAppendRow(i+j, b_outputs(j));
                }
                if (pb) pb->update(l);
            }
        }


    }
    else // parallel code
    {
        int n = servers.length(); // number of allocated servers
        DBG_LOG << "PLearner::use parallel code using " << n << " servers" << endl;
        for(int k=0; k<n; k++)  // send this object with objid 0
            servers[k]->newObject(0, *this);
        int chunksize = l/n;
        if(chunksize*n<l)
            ++chunksize;
        if(chunksize*w>1000000) // max 1 Mega elements
            chunksize = max(1,1000000/w);
        Mat chunk(chunksize,w);
        int send_i=0;
        Mat outmat;
        int receive_i = 0;
        while(send_i<l)
        {
            for(int k=0; k<n && send_i<l; k++)
            {
                int actualchunksize = chunksize;
                if(send_i+actualchunksize>l)
                    actualchunksize = l-send_i;
                chunk.resize(actualchunksize,w);
                testset->getMat(send_i, 0, chunk);
                VMat inputs(chunk);
                inputs->copySizesFrom(testset);
                DBG_LOG << "PLearner::use calling use2 remote method with chunk starting at " 
                        << send_i << " of length " << actualchunksize << ":" << inputs << endl;
                servers[k]->callMethod(0,"use2",inputs);
                send_i += actualchunksize;
            }
            for(int k=0; k<n && receive_i<l; k++)
            {
                outmat.resize(0,0);
                servers[k]->getResults(outmat);
                for(int ii=0; ii<outmat.length(); ii++)
                    outputs->putOrAppendRow(receive_i++,outmat(ii));
            }
        }
        if(send_i!=l || receive_i!=l)
            PLERROR("In PLearn::use parallel execution failed to complete successfully.");
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::PLearner::useOnTrain ( Mat outputs) const [virtual]

Compute the output on the training set of the learner, and save the result in the provided matrix.

Definition at line 955 of file PLearner.cc.

References PLearn::VMat::length(), outputsize(), PLearn::TMat< T >::resize(), train_set, and use().

Referenced by remote_useOnTrain().

                                            {
    outputs.resize(train_set.length(), outputsize());
    VMat train_output(outputs);
    use(train_set, train_output);
}

Here is the call graph for this function:

Here is the caller graph for this function:

int PLearn::PLearner::weightsize ( ) const [virtual]

Member Data Documentation

Reimplemented from PLearn::Object.

Reimplemented in PLearn::AnalyzeDond2DiscreteVariables, PLearn::AnalyzeFieldStats, PLearn::CheckDond2FileSequence, PLearn::ComputeDond2Target, PLearn::ComputePurenneError, PLearn::DichotomizeDond2DiscreteVariables, PLearn::Experimentation, PLearn::FixDond2BinaryVariables, PLearn::MergeDond2Files, PLearn::NeighborhoodConditionalMean, PLearn::Preprocessing, PLearn::SecondIterationWrapper, PLearn::StabilisationLearner, PLearn::TestImputations, PLearn::BinaryStump, PLearn::ClassifierFromConditionalPDistribution, PLearn::ClassifierFromDensity, PLearn::KFoldLogisticClassifier, PLearn::LocalGaussianClassifier, PLearn::FeatureSetNaiveBayesClassifier, PLearn::KNNClassifier, PLearn::MultiInstanceNNet, PLearn::SVMClassificationTorch, PLearn::ToBagClassifier, PLearn::ConditionalDensityNet, PLearn::GaussianContinuumDistribution, PLearn::GaussianProcessRegressor, PLearn::PConditionalDistribution, PLearn::LocallyMagnifiedDistribution, PLearn::NeighborhoodBoxVolumeDensityEstimator, PLearn::TransformationLearner, PLearn::GaussianDistribution, PLearn::GaussMix, PLearn::HistogramDistribution, PLearn::KernelDensityEstimator, PLearn::ManifoldParzen2, PLearn::MixtureDistribution, PLearn::NGramDistribution, PLearn::NonLocalManifoldParzen, PLearn::ParzenWindow, PLearn::PDistribution, PLearn::RandomGaussMix, PLearn::RBMDistribution, PLearn::SpiralDistribution, PLearn::UnconditionalDistribution, PLearn::UniformDistribution, PLearn::AddCostToLearner, PLearn::AddLayersNNet, PLearn::BestAveragingPLearner, PLearn::ChainedLearners, PLearn::DeepNNet, PLearn::DistRepNNet, PLearn::EmbeddedLearner, PLearn::DeepReconstructorNet, PLearn::mNNet, PLearn::NatGradNNet, PLearn::NatGradSMPNNet, PLearn::PvGradNNet, PLearn::FeatureSetNNet, PLearn::HorizonStatefulLearner, PLearn::IdentityPLearner, PLearn::IncrementalNNet, PLearn::NeighborhoodSmoothnessNNet, PLearn::NNet, PLearn::PythonProcessedLearner, PLearn::SelectInputSubsetLearner, PLearn::StackedLearner, PLearn::StatefulLearner, PLearn::TestingLearner, PLearn::TorchLearner, PLearn::TransformOutputLearner, PLearn::VPLCombinedLearner, PLearn::VPLPreprocessedLearner, PLearn::VPLPreprocessedLearner2, PLearn::VPLProcessor, PLearn::HyperLearner, PLearn::AdaBoost, PLearn::BaggingLearner, PLearn::CompareLearner, PLearn::MultiClassAdaBoost, PLearn::PrecomputedProcessedLearner, PLearn::VariableSelectionWithDirectedGradientDescent, PLearn::BallTreeNearestNeighbors, PLearn::ExhaustiveNearestNeighbors, PLearn::GenericNearestNeighbors, PLearn::DeepBeliefNet, PLearn::GaussianDBNClassification, PLearn::GaussianDBNRegression, PLearn::GaussPartSupervisedDBN, PLearn::HintonDeepBeliefNet, PLearn::PartSupervisedDBN, PLearn::StackedModulesLearner, PLearn::SupervisedDBN, PLearn::UnfrozenDeepBeliefNet, PLearn::SemiSupervisedDBN, PLearn::SubsamplingDBN, PLearn::ModuleLearner, PLearn::ModulesLearner, PLearn::StackedAutoassociatorsNet, PLearn::AutoLinearRegressor, PLearn::BaseRegressorConfidence, PLearn::BaseRegressorWrapper, PLearn::BasisSelectionRegressor, PLearn::ConstantRegressor, PLearn::CubicSpline, PLearn::KernelRidgeRegressor, PLearn::KNNRegressor, PLearn::LinearRegressor, PLearn::LocalMedBoost, PLearn::PLS, PLearn::PruningLinearRegressor, PLearn::RankLearner, PLearn::RegressionTree, PLearn::RegressorFromDistribution, PLearn::WPLS, PLearn::EmbeddedSequentialLearner, PLearn::MovingAverage, PLearn::SequentialLearner, PLearn::SequentialModelSelector, PLearn::EntropyContrast, PLearn::EntropyContrastLearner, PLearn::DiverseComponentAnalysis, PLearn::GaussianContinuum, PLearn::GaussMixLocalProjections, PLearn::Isomap, PLearn::IsomapTangentLearner, PLearn::KernelPCA, PLearn::KernelProjection, PLearn::KMeansClustering, PLearn::KPCATangentLearner, PLearn::LLC, PLearn::LLE, PLearn::NormalizationLearner, PLearn::PCA, PLearn::SpectralClustering, PLearn::TangentLearner, PLearn::TargetEncodingLearner, PLearn::UniformizeLearner, PLearn::DeepFeatureExtractorNNet, PLearn::DeepNonLocalManifoldParzen, PLearn::DenoisingRecurrentNet, PLearn::MoleculeTemplateLearner, PLearn::TestLearner, PLearn::DiscriminativeDeepBeliefNet, PLearn::DiscriminativeRBM, PLearn::DynamicallyLinkedRBMsModel, PLearn::FeatureSetSequentialCRF, PLearn::LinearInductiveTransferClassifier, PLearn::ManifoldKNNDistribution, PLearn::ManifoldParzen, PLearn::NxProfileLearner, PLearn::NeuralProbabilisticLanguageModel, PLearn::NnlmOnlineLearner, PLearn::PseudolikelihoodRBM, PLearn::RankingFromKernel, PLearn::StackedFocusedAutoassociatorsNet, PLearn::StackedSVDNet, PLearn::StructuralLearner, PLearn::SurfaceTemplateLearner, and PLearn::TopDownAsymetricDeepNetwork.

Definition at line 723 of file PLearner.h.

Mat PLearn::PLearner::b_costs [mutable, protected]

Definition at line 719 of file PLearner.h.

Referenced by makeDeepCopyFromShallowCopy(), test(), and use().

Mat PLearn::PLearner::b_inputs [mutable, protected]

Definition at line 719 of file PLearner.h.

Referenced by makeDeepCopyFromShallowCopy(), test(), and use().

Mat PLearn::PLearner::b_outputs [mutable, protected]

Definition at line 719 of file PLearner.h.

Referenced by makeDeepCopyFromShallowCopy(), test(), and use().

Mat PLearn::PLearner::b_targets [mutable, protected]

Definition at line 719 of file PLearner.h.

Referenced by makeDeepCopyFromShallowCopy(), test(), and use().

Vec PLearn::PLearner::b_weights [mutable, protected]

Definition at line 720 of file PLearner.h.

Referenced by makeDeepCopyFromShallowCopy(), test(), and use().

(default false) After training(when finalized() is called) it will be set to true.

When true, it mean the learner it won't be trained again and this allow some optimization.

Definition at line 205 of file PLearner.h.

Referenced by declareOptions(), finalize(), forget(), and PLearn::AdaBoost::setTrainingSet().

Whether or not to call 'forget' when the training set changes, in setTrainingSet.

Definition at line 247 of file PLearner.h.

Referenced by PLearn::RandomGaussMix::declareOptions(), PLearn::SurfaceTemplateLearner::declareOptions(), declareOptions(), and setTrainingSet().

Learnt inputsize obtained from train_set when doing setTrainingSet.

Definition at line 225 of file PLearner.h.

Referenced by PLearn::NeuralProbabilisticLanguageModel::bprop(), PLearn::FeatureSetSequentialCRF::bprop(), PLearn::FeatureSetNNet::bprop(), PLearn::UniformDistribution::build_(), PLearn::TorchLearner::build_(), PLearn::TopDownAsymetricDeepNetwork::build_(), PLearn::TangentLearner::build_(), PLearn::StackedSVDNet::build_(), PLearn::StackedModulesLearner::build_(), PLearn::StackedFocusedAutoassociatorsNet::build_(), PLearn::StackedAutoassociatorsNet::build_(), PLearn::SelectInputSubsetLearner::build_(), PLearn::PseudolikelihoodRBM::build_(), PLearn::NonLocalManifoldParzen::build_(), PLearn::NNet::build_(), PLearn::NeuralProbabilisticLanguageModel::build_(), PLearn::NeighborhoodSmoothnessNNet::build_(), PLearn::NatGradSMPNNet::build_(), PLearn::NatGradNNet::build_(), PLearn::MultiInstanceNNet::build_(), PLearn::ModulesLearner::build_(), PLearn::mNNet::build_(), PLearn::ManifoldParzen::build_(), PLearn::ManifoldKNNDistribution::build_(), PLearn::LinearInductiveTransferClassifier::build_(), PLearn::IncrementalNNet::build_(), PLearn::GaussianContinuumDistribution::build_(), PLearn::GaussianContinuum::build_(), PLearn::FeatureSetSequentialCRF::build_(), PLearn::FeatureSetNNet::build_(), PLearn::FeatureSetNaiveBayesClassifier::build_(), PLearn::DiverseComponentAnalysis::build_(), PLearn::DistRepNNet::build_(), PLearn::DiscriminativeRBM::build_(), PLearn::DiscriminativeDeepBeliefNet::build_(), PLearn::DeepNonLocalManifoldParzen::build_(), PLearn::DeepNNet::build_(), PLearn::DeepFeatureExtractorNNet::build_(), PLearn::ConditionalDensityNet::build_(), PLearn::AddLayersNNet::build_(), PLearn::SupervisedDBN::build_layers(), PLearn::PartSupervisedDBN::build_layers(), PLearn::HintonDeepBeliefNet::build_layers(), PLearn::GaussPartSupervisedDBN::build_layers(), PLearn::GaussianDBNRegression::build_layers(), PLearn::GaussianDBNClassification::build_layers(), PLearn::TopDownAsymetricDeepNetwork::build_layers_and_connections(), PLearn::SubsamplingDBN::build_layers_and_connections(), PLearn::StackedFocusedAutoassociatorsNet::build_layers_and_connections(), PLearn::StackedAutoassociatorsNet::build_layers_and_connections(), PLearn::PseudolikelihoodRBM::build_layers_and_connections(), PLearn::DiscriminativeRBM::build_layers_and_connections(), PLearn::DiscriminativeDeepBeliefNet::build_layers_and_connections(), PLearn::DeepNonLocalManifoldParzen::build_layers_and_connections(), PLearn::DeepBeliefNet::build_layers_and_connections(), PLearn::DistRepNNet::buildVarGraph(), PLearn::ManifoldKNNDistribution::computeLocalPrincipalComponents(), PLearn::DistRepNNet::computeOutput(), PLearn::DistRepNNet::computeOutputAndCosts(), declareOptions(), PLearn::IncrementalNNet::forget(), PLearn::DiverseComponentAnalysis::forget(), PLearn::NeuralProbabilisticLanguageModel::fpropBeforeOutputWeights(), PLearn::FeatureSetSequentialCRF::fpropOutput(), PLearn::FeatureSetNNet::fpropOutput(), PLearn::FeatureSetNaiveBayesClassifier::getProbs(), PLearn::NeuralProbabilisticLanguageModel::importance_sampling_gradient_update(), PLearn::NonLocalManifoldParzen::initializeParams(), PLearn::NeuralProbabilisticLanguageModel::initializeParams(), PLearn::FeatureSetSequentialCRF::initializeParams(), PLearn::FeatureSetNNet::initializeParams(), PLearn::DeepNNet::initializeParams(), PLearn::SelectInputSubsetLearner::inputsize(), inputsize(), PLearn::NonLocalManifoldParzen::log_density(), PLearn::ManifoldKNNDistribution::log_density(), PLearn::PrecomputedProcessedLearner::outputsize(), PLearn::PDistribution::setPredictorPredictedSizes(), PLearn::StatefulLearner::setTrainingSet(), setTrainingSet(), PLearn::NeighborhoodSmoothnessNNet::setTrainingSet(), PLearn::MultiInstanceNNet::setTrainingSet(), PLearn::NatGradSMPNNet::train(), PLearn::NatGradNNet::train(), PLearn::mNNet::train(), PLearn::LinearInductiveTransferClassifier::train(), PLearn::FeatureSetNaiveBayesClassifier::train(), PLearn::DiverseComponentAnalysis::train(), PLearn::BinaryStump::train(), PLearn::NeuralProbabilisticLanguageModel::verify_gradient(), PLearn::FeatureSetSequentialCRF::verify_gradient(), and PLearn::FeatureSetNNet::verify_gradient().

For PLearner::test in parallel: if true, the master reads the testset and sends rows to the slaves; otherwise, the master sends a description of the testset to the slaves.

Definition at line 183 of file PLearner.h.

Referenced by declareOptions(), test(), and PLearn::BaggingLearner::train().

Cached number of test costs.

Definition at line 93 of file PLearner.h.

Referenced by nTestCosts().

Cached number of training costs.

Definition at line 90 of file PLearner.h.

Referenced by nTrainCosts().

Max number of computation servers to use in parallel with the main process.

DEPRECATED: use parallelize_here instead

Definition at line 152 of file PLearner.h.

Referenced by PLearn::RandomGaussMix::declareOptions(), PLearn::SurfaceTemplateLearner::declareOptions(), declareOptions(), test(), PLearn::BaggingLearner::train(), and use().

The stage until which train() should train this learner and return.

The meaning of 'stage' is learner-dependent, but for learners whose training is incremental (such as involving incremental optimization), it is typically synonym with the number of 'epochs', i.e. the number of passages of the optimization process through the whole training set, since the last fresh initialisation.

Definition at line 135 of file PLearner.h.

Referenced by PLearn::BallTreeNearestNeighbors::anchorTrain(), PLearn::BallTreeNearestNeighbors::BallTreeNearestNeighbors(), PLearn::LocalMedBoost::build_(), PLearn::BasisSelectionRegressor::build_(), PLearn::DeepNNet::computeCostsFromOutputs(), PLearn::WPLS::computeOutput(), PLearn::TorchLearner::declareOptions(), PLearn::RandomGaussMix::declareOptions(), PLearn::GaussMixLocalProjections::declareOptions(), declareOptions(), PLearn::DiscriminativeDeepBeliefNet::DiscriminativeDeepBeliefNet(), PLearn::PCA::em_algo(), PLearn::PCA::em_orth_algo(), PLearn::AdaBoost::forget(), PLearn::GaussMix::GaussMix(), PLearn::RegressionTree::initialiseTree(), initTrain(), PLearn::ManifoldParzen2::ManifoldParzen2(), PLearn::WPLS::outputsize(), PLearn::ParzenWindow::ParzenWindow(), PLearn::PCA::setTrainingSet(), PLearn::StackedAutoassociatorsNet::StackedAutoassociatorsNet(), PLearn::StackedFocusedAutoassociatorsNet::StackedFocusedAutoassociatorsNet(), PLearn::StackedSVDNet::StackedSVDNet(), PLearn::TopDownAsymetricDeepNetwork::TopDownAsymetricDeepNetwork(), PLearn::DeepReconstructorNet::train(), PLearn::HyperLearner::train(), PLearn::AdaBoost::train(), PLearn::BasisSelectionRegressor::train(), PLearn::DeepBeliefNet::train(), PLearn::IncrementalNNet::train(), PLearn::LLC::train(), PLearn::PartSupervisedDBN::train(), PLearn::StackedFocusedAutoassociatorsNet::train(), PLearn::TopDownAsymetricDeepNetwork::train(), PLearn::FeatureSetNNet::train(), PLearn::StackedModulesLearner::train(), PLearn::ClassifierFromDensity::train(), PLearn::DenoisingRecurrentNet::train(), PLearn::DiscriminativeRBM::train(), PLearn::DiverseComponentAnalysis::train(), PLearn::HintonDeepBeliefNet::train(), PLearn::MultiClassAdaBoost::train(), PLearn::NatGradSMPNNet::train(), PLearn::NonLocalManifoldParzen::train(), PLearn::NNet::train(), PLearn::GaussianContinuum::train(), PLearn::LocalMedBoost::train(), PLearn::mNNet::train(), PLearn::DeepNonLocalManifoldParzen::train(), PLearn::FeatureSetSequentialCRF::train(), PLearn::GaussianDBNRegression::train(), PLearn::NGramDistribution::train(), PLearn::ConditionalDensityNet::train(), PLearn::DynamicallyLinkedRBMsModel::train(), PLearn::GaussMix::train(), PLearn::ModuleLearner::train(), PLearn::RegressionTree::train(), PLearn::GaussianContinuumDistribution::train(), PLearn::GaussianDBNClassification::train(), PLearn::NeighborhoodSmoothnessNNet::train(), PLearn::NeuralProbabilisticLanguageModel::train(), PLearn::NnlmOnlineLearner::train(), PLearn::SupervisedDBN::train(), PLearn::DiscriminativeDeepBeliefNet::train(), PLearn::GaussPartSupervisedDBN::train(), PLearn::StackedLearner::train(), PLearn::DeepNNet::train(), PLearn::DistRepNNet::train(), PLearn::ModulesLearner::train(), PLearn::NxProfileLearner::train(), PLearn::PseudolikelihoodRBM::train(), PLearn::EntropyContrastLearner::train(), PLearn::LinearInductiveTransferClassifier::train(), PLearn::SubsamplingDBN::train(), PLearn::TorchLearner::train(), PLearn::EntropyContrast::train(), PLearn::MultiInstanceNNet::train(), PLearn::PCA::train(), PLearn::RBMDistribution::train(), PLearn::StackedAutoassociatorsNet::train(), PLearn::StackedSVDNet::train(), PLearn::TangentLearner::train(), PLearn::TransformationLearner::train(), PLearn::UnfrozenDeepBeliefNet::train(), PLearn::BaggingLearner::train(), PLearn::DeepFeatureExtractorNNet::train(), PLearn::KMeansClustering::train(), PLearn::MoleculeTemplateLearner::train(), PLearn::NatGradNNet::train(), PLearn::SecondIterationWrapper::train(), PLearn::VariableSelectionWithDirectedGradientDescent::train(), PLearn::ClassifierFromConditionalPDistribution::train(), PLearn::EmbeddedLearner::train(), PLearn::WPLS::train(), and PLearn::DenoisingRecurrentNet::trainUnconditionalPredictor().

Wether parallelism should be exploited at this object's level.

Definition at line 176 of file PLearner.h.

Referenced by declareOptions(), test(), and PLearn::BaggingLearner::train().

PP<PRandom> PLearn::PLearner::random_gen [mutable, protected]

The random generator used by this PLearner.

A subclass of PLearner that wants to use it must create it in its own constructor, as by default it is not created in the PLearner class itself. The random generator, if present, will be automatically initialized from the 'seed' option in build() and forget().

Definition at line 256 of file PLearner.h.

Referenced by PLearn::BasisSelectionRegressor::appendKernelFunctions(), PLearn::DeepReconstructorNet::build(), PLearn::LinearInductiveTransferClassifier::build_(), PLearn::ModuleLearner::build_(), PLearn::DynamicallyLinkedRBMsModel::build_(), build_(), PLearn::StackedModulesLearner::build_(), PLearn::DenoisingRecurrentNet::build_(), PLearn::ModulesLearner::build_(), PLearn::DeepFeatureExtractorNNet::build_(), PLearn::StackedSVDNet::build_(), PLearn::SubsamplingDBN::build_classification_cost(), PLearn::DiscriminativeRBM::build_classification_cost(), PLearn::DeepBeliefNet::build_classification_cost(), PLearn::SubsamplingDBN::build_costs(), PLearn::StackedAutoassociatorsNet::build_costs(), PLearn::DeepBeliefNet::build_costs(), PLearn::SubsamplingDBN::build_final_cost(), PLearn::DeepBeliefNet::build_final_cost(), PLearn::PartSupervisedDBN::build_layers(), PLearn::SupervisedDBN::build_layers(), PLearn::GaussPartSupervisedDBN::build_layers(), PLearn::GaussianDBNRegression::build_layers(), PLearn::GaussianDBNClassification::build_layers(), PLearn::HintonDeepBeliefNet::build_layers(), PLearn::DeepBeliefNet::build_layers_and_connections(), PLearn::SubsamplingDBN::build_layers_and_connections(), PLearn::DeepNonLocalManifoldParzen::build_layers_and_connections(), PLearn::StackedFocusedAutoassociatorsNet::build_layers_and_connections(), PLearn::DiscriminativeDeepBeliefNet::build_layers_and_connections(), PLearn::TopDownAsymetricDeepNetwork::build_layers_and_connections(), PLearn::DiscriminativeRBM::build_layers_and_connections(), PLearn::StackedAutoassociatorsNet::build_layers_and_connections(), PLearn::PseudolikelihoodRBM::build_layers_and_connections(), PLearn::TopDownAsymetricDeepNetwork::build_output_layer_and_cost(), PLearn::StackedFocusedAutoassociatorsNet::build_output_layer_and_cost(), PLearn::DiscriminativeDeepBeliefNet::build_output_layer_and_cost(), PLearn::PartSupervisedDBN::build_params(), PLearn::HintonDeepBeliefNet::build_params(), PLearn::GaussianDBNRegression::build_params(), PLearn::SupervisedDBN::build_params(), PLearn::GaussPartSupervisedDBN::build_params(), PLearn::GaussianDBNClassification::build_params(), PLearn::NnlmOnlineLearner::buildLayers(), PLearn::PseudolikelihoodRBM::compute_Z(), PLearn::GaussMix::computeMeansAndCovariances(), PLearn::StackedAutoassociatorsNet::corrupt_input(), PLearn::DeepBeliefNet::corrupt_input(), PLearn::StackedModulesLearner::declareOptions(), declareOptions(), PLearn::DeepBeliefNet::DeepBeliefNet(), PLearn::DeepFeatureExtractorNNet::DeepFeatureExtractorNNet(), PLearn::DeepNonLocalManifoldParzen::DeepNonLocalManifoldParzen(), PLearn::DenoisingRecurrentNet::DenoisingRecurrentNet(), PLearn::DiscriminativeDeepBeliefNet::DiscriminativeDeepBeliefNet(), PLearn::DiscriminativeRBM::DiscriminativeRBM(), PLearn::DiverseComponentAnalysis::DiverseComponentAnalysis(), PLearn::DynamicallyLinkedRBMsModel::DynamicallyLinkedRBMsModel(), PLearn::DeepBeliefNet::fantasizeKTime(), PLearn::StackedAutoassociatorsNet::fantasizeKTime(), PLearn::DeepFeatureExtractorNNet::fillWeights(), PLearn::NNet::fillWeights(), PLearn::LinearInductiveTransferClassifier::fillWeights(), PLearn::TransformationLearner::findBestTargetReconstructionCandidates(), PLearn::TransformationLearner::findBestWeightedNeighbors(), PLearn::TransformationLearner::findNearestNeighbors(), PLearn::PseudolikelihoodRBM::forget(), PLearn::DiverseComponentAnalysis::forget(), PLearn::NatGradSMPNNet::forget(), forget(), PLearn::NatGradNNet::forget(), PLearn::StackedModulesLearner::forget(), PLearn::NxProfileLearner::forget(), PLearn::ModulesLearner::forget(), PLearn::mNNet::forget(), PLearn::TransformationLearner::gamma_sample(), PLearn::GaussianDBNClassification::GaussianDBNClassification(), PLearn::GaussianDBNRegression::GaussianDBNRegression(), PLearn::GaussPartSupervisedDBN::GaussPartSupervisedDBN(), PLearn::GaussianDistribution::generate(), PLearn::UniformDistribution::generate(), PLearn::RBMDistribution::generate(), PLearn::SpiralDistribution::generate(), PLearn::GaussMix::generateFromGaussian(), PLearn::RBMDistribution::generateN(), PLearn::TransformationLearner::generatePredictedFrom(), PLearn::TopDownAsymetricDeepNetwork::greedyStep(), PLearn::StackedAutoassociatorsNet::greedyStep(), PLearn::HintonDeepBeliefNet::HintonDeepBeliefNet(), PLearn::NNet::initializeParams(), PLearn::NonLocalManifoldParzen::initializeParams(), PLearn::DeepReconstructorNet::initializeParams(), PLearn::TransformationLearner::initTransformsParameters(), PLearn::DenoisingRecurrentNet::inject_zero_forcing_noise(), PLearn::GaussMix::kmeans(), PLearn::LinearInductiveTransferClassifier::LinearInductiveTransferClassifier(), PLearn::StackedModulesLearner::makeDeepCopyFromShallowCopy(), makeDeepCopyFromShallowCopy(), PLearn::mNNet::mNNet(), PLearn::ModuleLearner::ModuleLearner(), PLearn::ModulesLearner::ModulesLearner(), PLearn::NatGradNNet::NatGradNNet(), PLearn::NatGradSMPNNet::NatGradSMPNNet(), PLearn::NNet::NNet(), PLearn::NnlmOnlineLearner::NnlmOnlineLearner(), PLearn::NxProfileLearner::NxProfileLearner(), PLearn::StackedAutoassociatorsNet::onlineStep(), PLearn::PartSupervisedDBN::PartSupervisedDBN(), PLearn::PDistribution::PDistribution(), PLearn::TransformationLearner::pickNeighborIdx(), PLearn::TransformationLearner::pickTransformIdx(), PLearn::PseudolikelihoodRBM::PseudolikelihoodRBM(), PLearn::PvGradNNet::PvGradNNet(), PLearn::NatGradSMPNNet::pvGradUpdate(), PLearn::TransformationLearner::randomWeight(), PLearn::PDistribution::resetGenerator(), PLearn::SemiSupervisedDBN::SemiSupervisedDBN(), PLearn::StackedAutoassociatorsNet::StackedAutoassociatorsNet(), PLearn::StackedFocusedAutoassociatorsNet::StackedFocusedAutoassociatorsNet(), PLearn::StackedModulesLearner::StackedModulesLearner(), PLearn::StackedSVDNet::StackedSVDNet(), PLearn::SubsamplingDBN::SubsamplingDBN(), PLearn::SupervisedDBN::SupervisedDBN(), PLearn::PseudolikelihoodRBM::test(), test(), PLearn::TopDownAsymetricDeepNetwork::TopDownAsymetricDeepNetwork(), PLearn::StackedFocusedAutoassociatorsNet::train(), PLearn::ModuleLearner::train(), PLearn::DiscriminativeDeepBeliefNet::train(), PLearn::PseudolikelihoodRBM::train(), PLearn::LinearInductiveTransferClassifier::train(), and PLearn::StackedSVDNet::train().

Should progress in learning and testing be reported in a ProgressBar.

Definition at line 138 of file PLearner.h.

Referenced by PLearn::BallTreeNearestNeighbors::BallTreeNearestNeighbors(), PLearn::LLE::build_(), PLearn::Isomap::build_(), PLearn::TargetEncodingLearner::buildEncodingsFromTrainset(), PLearn::PCA::classical_algo(), PLearn::SecondIterationWrapper::computeClassStatistics(), PLearn::SecondIterationWrapper::computeSalesStatistics(), PLearn::AdaBoost::computeTrainingError(), PLearn::BasisSelectionRegressor::computeWeightedAveragesWithResidue(), declareOptions(), PLearn::PCA::em_algo(), PLearn::PCA::em_orth_algo(), PLearn::PDistribution::generateN(), PLearn::GaussMix::getInitialWeightsFrom(), PLearn::PCA::incremental_algo(), PLearn::RegressionTree::initialiseTree(), PLearn::GaussMix::kmeans(), main(), PLearn::AdaBoost::setTrainingSet(), PLearn::SequentialModelSelector::test(), PLearn::PseudolikelihoodRBM::test(), test(), PLearn::NnlmOnlineLearner::test(), PLearn::MovingAverage::test(), PLearn::DynamicallyLinkedRBMsModel::test(), PLearn::DenoisingRecurrentNet::test(), PLearn::WPLS::train(), PLearn::VariableSelectionWithDirectedGradientDescent::train(), PLearn::TopDownAsymetricDeepNetwork::train(), PLearn::TangentLearner::train(), PLearn::SupervisedDBN::train(), PLearn::SubsamplingDBN::train(), PLearn::StackedSVDNet::train(), PLearn::StackedFocusedAutoassociatorsNet::train(), PLearn::StackedAutoassociatorsNet::train(), PLearn::SequentialModelSelector::train(), PLearn::RegressionTree::train(), PLearn::PseudolikelihoodRBM::train(), PLearn::PLS::train(), PLearn::PartSupervisedDBN::train(), PLearn::NxProfileLearner::train(), PLearn::NormalizationLearner::train(), PLearn::NonLocalManifoldParzen::train(), PLearn::NnlmOnlineLearner::train(), PLearn::NNet::train(), PLearn::NeuralProbabilisticLanguageModel::train(), PLearn::NeighborhoodSmoothnessNNet::train(), PLearn::NatGradSMPNNet::train(), PLearn::NatGradNNet::train(), PLearn::MultiInstanceNNet::train(), PLearn::MovingAverage::train(), PLearn::MoleculeTemplateLearner::train(), PLearn::ModulesLearner::train(), PLearn::ModuleLearner::train(), PLearn::ManifoldParzen::train(), PLearn::LocalMedBoost::train(), PLearn::LinearRegressor::train(), PLearn::LinearInductiveTransferClassifier::train(), PLearn::KFoldLogisticClassifier::train(), PLearn::KernelProjection::train(), PLearn::HintonDeepBeliefNet::train(), PLearn::GaussPartSupervisedDBN::train(), PLearn::GaussMix::train(), PLearn::GaussianDBNRegression::train(), PLearn::GaussianDBNClassification::train(), PLearn::GaussianContinuumDistribution::train(), PLearn::GaussianContinuum::train(), PLearn::FeatureSetNNet::train(), PLearn::FeatureSetNaiveBayesClassifier::train(), PLearn::EntropyContrastLearner::train(), PLearn::DynamicallyLinkedRBMsModel::train(), PLearn::DistRepNNet::train(), PLearn::DiscriminativeRBM::train(), PLearn::DiscriminativeDeepBeliefNet::train(), PLearn::DenoisingRecurrentNet::train(), PLearn::DeepNonLocalManifoldParzen::train(), PLearn::DeepNNet::train(), PLearn::DeepFeatureExtractorNNet::train(), PLearn::DeepBeliefNet::train(), PLearn::ConditionalDensityNet::train(), PLearn::BinaryStump::train(), PLearn::BaggingLearner::train(), PLearn::AdaBoost::train(), PLearn::DenoisingRecurrentNet::trainUnconditionalPredictor(), and use().

Whether the training set should be saved upon a call to setTrainingSet().

The saved file is put in the learner's expdir (assuming there is one) and has the form "<prefix>_trainset_XXX.pmat" The prefix is what this option specifies. 'XXX' is a unique serial number that is globally incremented with each saved setTrainingSet. This option is useful when manipulating very complex nested learner structures, and you want to ensure that the inner learner is getting the correct results. (Default="", i.e. don't save anything.)

Definition at line 171 of file PLearner.h.

Referenced by PLearn::RandomGaussMix::declareOptions(), PLearn::SurfaceTemplateLearner::declareOptions(), declareOptions(), and setTrainingSet().

The seed used for the random number generator in initializing the learner (see forget() method).

Default value=1827 for experiment reproducibility.

Definition at line 116 of file PLearner.h.

Referenced by PLearn::BasisSelectionRegressor::appendKernelFunctions(), PLearn::StackedModulesLearner::build_(), build_(), PLearn::PDistribution::build_(), PLearn::MoleculeTemplateLearner::build_(), PLearn::LinearInductiveTransferClassifier::build_(), PLearn::FeatureSetNaiveBayesClassifier::build_(), PLearn::DeepFeatureExtractorNNet::build_(), PLearn::TorchLearner::declareOptions(), declareOptions(), PLearn::LinearRegressor::declareOptions(), PLearn::KernelProjection::declareOptions(), PLearn::HyperLearner::declareOptions(), PLearn::GaussMixLocalProjections::declareOptions(), PLearn::SupervisedDBN::forget(), PLearn::StackedModulesLearner::forget(), forget(), PLearn::PDistribution::forget(), PLearn::PartSupervisedDBN::forget(), PLearn::ModulesLearner::forget(), PLearn::KMeansClustering::forget(), PLearn::HintonDeepBeliefNet::forget(), PLearn::GaussPartSupervisedDBN::forget(), PLearn::GaussianDBNRegression::forget(), PLearn::GaussianDBNClassification::forget(), PLearn::AdaBoost::forget(), PLearn::TangentLearner::initializeParams(), PLearn::NNet::initializeParams(), PLearn::NeuralProbabilisticLanguageModel::initializeParams(), PLearn::NeighborhoodSmoothnessNNet::initializeParams(), PLearn::MultiInstanceNNet::initializeParams(), PLearn::GaussianContinuumDistribution::initializeParams(), PLearn::GaussianContinuum::initializeParams(), PLearn::FeatureSetSequentialCRF::initializeParams(), PLearn::FeatureSetNNet::initializeParams(), PLearn::DistRepNNet::initializeParams(), PLearn::DeepReconstructorNet::initializeParams(), PLearn::DeepNNet::initializeParams(), PLearn::ConditionalDensityNet::initializeParams(), PLearn::AddLayersNNet::initializeParams(), PLearn::PDistribution::resetGenerator(), PLearn::RBMDistribution::train(), and PLearn::KFoldLogisticClassifier::train().

The current training stage, since last fresh initialization (forget()): 0 means untrained, n often means after n epochs or optimization steps, etc...

The true meaning is learner-dependant. You should never modify this option directly! It is the role of forget() to bring it back to 0, and the role of train() to bring it up to 'nstages'...

Definition at line 125 of file PLearner.h.

Referenced by PLearn::BallTreeNearestNeighbors::anchorTrain(), PLearn::BallTreeNearestNeighbors::BallTreeNearestNeighbors(), PLearn::LinearInductiveTransferClassifier::build_(), PLearn::StackedAutoassociatorsNet::build_(), PLearn::GaussMix::build_(), PLearn::DiscriminativeDeepBeliefNet::build_(), PLearn::FeatureSetSequentialCRF::build_(), PLearn::UnfrozenDeepBeliefNet::build_(), PLearn::FeatureSetNNet::build_(), PLearn::FeatureSetNaiveBayesClassifier::build_(), PLearn::StackedFocusedAutoassociatorsNet::build_(), PLearn::DeepNonLocalManifoldParzen::build_(), PLearn::NeuralProbabilisticLanguageModel::build_(), PLearn::DeepFeatureExtractorNNet::build_(), PLearn::IncrementalNNet::build_(), PLearn::TopDownAsymetricDeepNetwork::build_(), PLearn::GaussMix::changeOptions(), PLearn::PCA::classical_algo(), PLearn::LocalMedBoost::computeBaseAwards(), PLearn::StackedSVDNet::computeCostsFromOutputs(), PLearn::GaussMix::computeLogLikelihood(), PLearn::LocalMedBoost::computeLossBound(), PLearn::GaussMix::computeMeansAndCovariances(), PLearn::GaussMix::computeMixtureWeights(), PLearn::IncrementalNNet::computeOutput(), PLearn::StackedSVDNet::computeOutput(), PLearn::AdaBoost::computeTrainingError(), declareOptions(), PLearn::PvGradNNet::discountGrad(), PLearn::PCA::em_algo(), PLearn::PCA::em_orth_algo(), PLearn::TransformationLearner::EStep(), PLearn::RegressionTree::expandTree(), PLearn::LLC::forget(), PLearn::TransformationLearner::forget(), PLearn::EntropyContrastLearner::forget(), PLearn::KMeansClustering::forget(), PLearn::LinearInductiveTransferClassifier::forget(), PLearn::TorchLearner::forget(), PLearn::AutoLinearRegressor::forget(), PLearn::SupervisedDBN::forget(), PLearn::DeepNonLocalManifoldParzen::forget(), PLearn::GaussianContinuum::forget(), PLearn::HyperLearner::forget(), PLearn::VPLProcessor::forget(), PLearn::DynamicallyLinkedRBMsModel::forget(), PLearn::HintonDeepBeliefNet::forget(), PLearn::IncrementalNNet::forget(), PLearn::StackedFocusedAutoassociatorsNet::forget(), PLearn::KernelProjection::forget(), PLearn::NNet::forget(), PLearn::TargetEncodingLearner::forget(), PLearn::UniformizeLearner::forget(), PLearn::DeepNNet::forget(), PLearn::NatGradSMPNNet::forget(), PLearn::PartSupervisedDBN::forget(), PLearn::PDistribution::forget(), forget(), PLearn::PLS::forget(), PLearn::FeatureSetNaiveBayesClassifier::forget(), PLearn::VPLCombinedLearner::forget(), PLearn::ClassifierFromDensity::forget(), PLearn::GaussianProcessRegressor::forget(), PLearn::NatGradNNet::forget(), PLearn::StackedModulesLearner::forget(), PLearn::TangentLearner::forget(), PLearn::GaussianContinuumDistribution::forget(), PLearn::StackedAutoassociatorsNet::forget(), PLearn::VPLPreprocessedLearner2::forget(), PLearn::AdaBoost::forget(), PLearn::DiscriminativeDeepBeliefNet::forget(), PLearn::EmbeddedLearner::forget(), PLearn::NeighborhoodSmoothnessNNet::forget(), PLearn::NonLocalManifoldParzen::forget(), PLearn::NormalizationLearner::forget(), PLearn::PCA::forget(), PLearn::VariableSelectionWithDirectedGradientDescent::forget(), PLearn::BasisSelectionRegressor::forget(), PLearn::ManifoldParzen::forget(), PLearn::NnlmOnlineLearner::forget(), PLearn::NxProfileLearner::forget(), PLearn::TopDownAsymetricDeepNetwork::forget(), PLearn::GaussPartSupervisedDBN::forget(), PLearn::WPLS::forget(), PLearn::BallTreeNearestNeighbors::forget(), PLearn::ConditionalDensityNet::forget(), PLearn::DistRepNNet::forget(), PLearn::GaussianDBNClassification::forget(), PLearn::NeuralProbabilisticLanguageModel::forget(), PLearn::RegressionTree::forget(), PLearn::StackedSVDNet::forget(), PLearn::FeatureSetSequentialCRF::forget(), PLearn::ModulesLearner::forget(), PLearn::MultiClassAdaBoost::forget(), PLearn::ClassifierFromConditionalPDistribution::forget(), PLearn::DenoisingRecurrentNet::forget(), PLearn::FeatureSetNNet::forget(), PLearn::LocalMedBoost::forget(), PLearn::mNNet::forget(), PLearn::MultiInstanceNNet::forget(), PLearn::VPLPreprocessedLearner::forget(), PLearn::BinaryStump::forget(), PLearn::DeepFeatureExtractorNNet::forget(), PLearn::GaussianDBNRegression::forget(), PLearn::DeepBeliefNet::greedyStep(), PLearn::PCA::incremental_algo(), initTrain(), PLearn::DeepBeliefNet::jointGreedyStep(), PLearn::mNNet::l1regularizeOutputs(), PLearn::TransformationLearner::MStep(), PLearn::PvGradNNet::neuronDiscountGrad(), PLearn::TransformationLearner::nextStage(), PLearn::StackedAutoassociatorsNet::onlineStep(), PLearn::DeepBeliefNet::onlineStep(), PLearn::StackedSVDNet::outputsize(), PLearn::PvGradNNet::pvGrad(), PLearn::LocalMedBoost::recomputeSampleWeight(), PLearn::GaussMix::setPredictor(), PLearn::MultiClassAdaBoost::test(), PLearn::NnlmOnlineLearner::test(), PLearn::AdaBoost::test(), PLearn::DeepReconstructorNet::train(), PLearn::HyperLearner::train(), PLearn::AdaBoost::train(), PLearn::BasisSelectionRegressor::train(), PLearn::DeepBeliefNet::train(), PLearn::IncrementalNNet::train(), PLearn::LLC::train(), PLearn::PartSupervisedDBN::train(), PLearn::StackedFocusedAutoassociatorsNet::train(), PLearn::SurfaceTemplateLearner::train(), PLearn::TopDownAsymetricDeepNetwork::train(), PLearn::FeatureSetNNet::train(), PLearn::StackedModulesLearner::train(), PLearn::ClassifierFromDensity::train(), PLearn::DenoisingRecurrentNet::train(), PLearn::DiscriminativeRBM::train(), PLearn::DiverseComponentAnalysis::train(), PLearn::HintonDeepBeliefNet::train(), PLearn::KFoldLogisticClassifier::train(), PLearn::MultiClassAdaBoost::train(), PLearn::NatGradSMPNNet::train(), PLearn::NonLocalManifoldParzen::train(), PLearn::TargetEncodingLearner::train(), PLearn::NNet::train(), PLearn::UniformizeLearner::train(), PLearn::VPLCombinedLearner::train(), PLearn::AutoLinearRegressor::train(), PLearn::GaussianContinuum::train(), PLearn::LocalMedBoost::train(), PLearn::mNNet::train(), PLearn::VPLPreprocessedLearner::train(), PLearn::DeepNonLocalManifoldParzen::train(), PLearn::FeatureSetSequentialCRF::train(), PLearn::GaussianDBNRegression::train(), PLearn::NGramDistribution::train(), PLearn::ParzenWindow::train(), PLearn::FeatureSetNaiveBayesClassifier::train(), PLearn::PLS::train(), PLearn::ConditionalDensityNet::train(), PLearn::DynamicallyLinkedRBMsModel::train(), PLearn::GaussMix::train(), PLearn::ModuleLearner::train(), PLearn::RegressionTree::train(), PLearn::GaussianContinuumDistribution::train(), PLearn::GaussianDBNClassification::train(), PLearn::ManifoldParzen2::train(), PLearn::NeighborhoodSmoothnessNNet::train(), PLearn::NeuralProbabilisticLanguageModel::train(), PLearn::NnlmOnlineLearner::train(), PLearn::SupervisedDBN::train(), PLearn::DiscriminativeDeepBeliefNet::train(), PLearn::GaussPartSupervisedDBN::train(), PLearn::KernelProjection::train(), PLearn::ManifoldParzen::train(), PLearn::NormalizationLearner::train(), PLearn::StackedLearner::train(), PLearn::DeepNNet::train(), PLearn::DistRepNNet::train(), PLearn::ModulesLearner::train(), PLearn::NxProfileLearner::train(), PLearn::PseudolikelihoodRBM::train(), PLearn::EntropyContrastLearner::train(), PLearn::LinearInductiveTransferClassifier::train(), PLearn::SubsamplingDBN::train(), PLearn::TorchLearner::train(), PLearn::EntropyContrast::train(), PLearn::MultiInstanceNNet::train(), PLearn::PCA::train(), PLearn::RBMDistribution::train(), PLearn::StackedAutoassociatorsNet::train(), PLearn::StackedSVDNet::train(), PLearn::TangentLearner::train(), PLearn::TransformationLearner::train(), PLearn::VPLPreprocessedLearner2::train(), PLearn::UnfrozenDeepBeliefNet::train(), PLearn::BaggingLearner::train(), PLearn::DeepFeatureExtractorNNet::train(), PLearn::KMeansClustering::train(), PLearn::MoleculeTemplateLearner::train(), PLearn::NatGradNNet::train(), PLearn::VariableSelectionWithDirectedGradientDescent::train(), PLearn::ClassifierFromConditionalPDistribution::train(), PLearn::EmbeddedLearner::train(), PLearn::WPLS::train(), and PLearn::DenoisingRecurrentNet::trainUnconditionalPredictor().

Learnt targetsize obtained from train_set when doing setTrainingSet.

Definition at line 228 of file PLearner.h.

Referenced by PLearn::LinearInductiveTransferClassifier::build_(), PLearn::StackedAutoassociatorsNet::build_(), PLearn::DistRepNNet::build_(), PLearn::DiscriminativeDeepBeliefNet::build_(), PLearn::PseudolikelihoodRBM::build_(), PLearn::ConditionalDensityNet::build_(), PLearn::FeatureSetSequentialCRF::build_(), PLearn::FeatureSetNNet::build_(), PLearn::FeatureSetNaiveBayesClassifier::build_(), PLearn::mNNet::build_(), PLearn::NeighborhoodSmoothnessNNet::build_(), PLearn::StackedFocusedAutoassociatorsNet::build_(), PLearn::NatGradSMPNNet::build_(), PLearn::NeuralProbabilisticLanguageModel::build_(), PLearn::NNet::build_(), PLearn::MultiInstanceNNet::build_(), PLearn::NatGradNNet::build_(), PLearn::DeepFeatureExtractorNNet::build_(), PLearn::DeepNNet::build_(), PLearn::TopDownAsymetricDeepNetwork::build_(), PLearn::DiscriminativeRBM::build_(), PLearn::StackedSVDNet::build_(), PLearn::StackedAutoassociatorsNet::build_costs(), PLearn::SubsamplingDBN::build_final_cost(), PLearn::DeepBeliefNet::build_final_cost(), PLearn::DistRepNNet::buildVarGraph(), declareOptions(), PLearn::FeatureSetNNet::outputsize(), PLearn::FeatureSetSequentialCRF::outputsize(), PLearn::NeuralProbabilisticLanguageModel::outputsize(), PLearn::DistRepNNet::outputsize(), PLearn::FeatureSetNaiveBayesClassifier::outputsize(), PLearn::NeighborhoodSmoothnessNNet::setTrainingSet(), PLearn::StatefulLearner::setTrainingSet(), PLearn::MultiInstanceNNet::setTrainingSet(), setTrainingSet(), targetsize(), and PLearn::BinaryStump::train().

Size of minibatches used during testing to take advantage of efficient (possibly parallelized) implementations when multiple exemples are processed at once.

Definition at line 159 of file PLearner.h.

Referenced by PLearn::mNNet::computeOutputs(), PLearn::NatGradNNet::computeOutputs(), declareOptions(), PLearn::ModuleLearner::ModuleLearner(), PLearn::StackedAutoassociatorsNet::StackedAutoassociatorsNet(), test(), and use().

Vec PLearn::PLearner::tmp_output [mutable, private]

The training set as set by setTrainingSet.

Data-sets are seen as matrices whose columns or fields are layed out as follows: a number of input fields, followed by (optional) target fields, followed by a (optional) weight field (to weigh each example). The sizes of those areas are given by the VMatrix options inputsize targetsize, and weightsize, which are typically used by the learner upon building.

Definition at line 217 of file PLearner.h.

Referenced by PLearn::AnalyzeFieldStats::analyzeVariableStats(), PLearn::BallTreeNearestNeighbors::anchorTrain(), PLearn::BasisSelectionRegressor::appendCandidateFunctionsOfSingleField(), PLearn::BasisSelectionRegressor::appendFunctionToSelection(), PLearn::BasisSelectionRegressor::appendKernelFunctions(), PLearn::BallTreeNearestNeighbors::BallKNN(), PLearn::NeuralProbabilisticLanguageModel::batchComputeOutputAndConfidence(), PLearn::FeatureSetNNet::batchComputeOutputAndConfidence(), PLearn::FeatureSetNaiveBayesClassifier::batchComputeOutputAndConfidence(), PLearn::FeatureSetSequentialCRF::batchComputeOutputAndConfidence(), PLearn::SurfaceTemplateLearner::build(), PLearn::LinearInductiveTransferClassifier::build_(), PLearn::NeighborhoodBoxVolumeDensityEstimator::build_(), PLearn::VPLProcessor::build_(), PLearn::GaussianProcessRegressor::build_(), PLearn::ManifoldParzen::build_(), PLearn::RegressionTree::build_(), PLearn::SecondIterationWrapper::build_(), PLearn::VPLPreprocessedLearner2::build_(), PLearn::WPLS::build_(), PLearn::ConditionalDensityNet::build_(), PLearn::DynamicallyLinkedRBMsModel::build_(), PLearn::FeatureSetSequentialCRF::build_(), PLearn::MultiClassAdaBoost::build_(), PLearn::NGramDistribution::build_(), PLearn::PLS::build_(), PLearn::FeatureSetNNet::build_(), PLearn::LocalGaussianClassifier::build_(), PLearn::FeatureSetNaiveBayesClassifier::build_(), PLearn::GaussianContinuum::build_(), PLearn::mNNet::build_(), PLearn::BaseRegressorConfidence::build_(), PLearn::PConditionalDistribution::build_(), PLearn::AnalyzeFieldStats::build_(), PLearn::DeepNonLocalManifoldParzen::build_(), PLearn::LocalMedBoost::build_(), PLearn::NatGradSMPNNet::build_(), PLearn::NnlmOnlineLearner::build_(), PLearn::DiverseComponentAnalysis::build_(), PLearn::NeuralProbabilisticLanguageModel::build_(), PLearn::ClassifierFromConditionalPDistribution::build_(), PLearn::DenoisingRecurrentNet::build_(), PLearn::GaussianContinuumDistribution::build_(), PLearn::BaseRegressorWrapper::build_(), PLearn::EntropyContrast::build_(), PLearn::IsomapTangentLearner::build_(), PLearn::NatGradNNet::build_(), PLearn::NxProfileLearner::build_(), PLearn::TransformationLearner::build_(), PLearn::VPLCombinedLearner::build_(), PLearn::BallTreeNearestNeighbors::build_(), PLearn::DeepFeatureExtractorNNet::build_(), PLearn::IncrementalNNet::build_(), PLearn::NonLocalManifoldParzen::build_(), PLearn::EntropyContrastLearner::build_(), PLearn::ManifoldKNNDistribution::build_(), PLearn::MoleculeTemplateLearner::build_(), PLearn::ComputeDond2Target::build_(), PLearn::BasisSelectionRegressor::buildAllCandidateFunctions(), PLearn::NnlmOnlineLearner::buildCandidates(), PLearn::TargetEncodingLearner::buildEncodingsFromTrainset(), PLearn::NNet::buildFuncs(), PLearn::DistRepNNet::buildVarGraph(), PLearn::PCA::classical_algo(), PLearn::EntropyContrast::compute_diversity_cost(), PLearn::MoleculeTemplateLearner::compute_S_mean_std(), PLearn::GaussianContinuum::compute_train_and_validation_costs(), PLearn::PseudolikelihoodRBM::compute_Z(), PLearn::LocalMedBoost::computeBaseAwards(), PLearn::SecondIterationWrapper::computeClassStatistics(), PLearn::BallTreeNearestNeighbors::computeCostsFromOutputs(), PLearn::ClassifierFromConditionalPDistribution::computeCostsFromOutputs(), PLearn::GaussMix::computeMeansAndCovariances(), PLearn::ClassifierFromConditionalPDistribution::computeOutput(), PLearn::BaseRegressorConfidence::computeOutput(), PLearn::LocalGaussianClassifier::computeOutput(), PLearn::DistRepNNet::computeOutput(), PLearn::DeepNonLocalManifoldParzen::computeOutput(), PLearn::BaseRegressorWrapper::computeOutput(), PLearn::ManifoldParzen::computeOutput(), PLearn::DistRepNNet::computeOutputAndCosts(), PLearn::GaussMix::computePosteriors(), PLearn::LinearRegressor::computeResidualsVariance(), PLearn::SecondIterationWrapper::computeSalesStatistics(), PLearn::ComputeDond2Target::computeTarget(), PLearn::AdaBoost::computeTrainingError(), PLearn::BasisSelectionRegressor::computeWeightedAveragesWithResidue(), PLearn::GenericNearestNeighbors::constructOutputVector(), PLearn::BallTreeNearestNeighbors::createAnchors(), PLearn::AnalyzeFieldStats::createHeaderFile(), PLearn::AdaBoost::declareOptions(), PLearn::FeatureSetSequentialCRF::declareOptions(), PLearn::LocalGaussianClassifier::declareOptions(), PLearn::ManifoldParzen::declareOptions(), PLearn::TransformationLearner::declareOptions(), PLearn::BallTreeNearestNeighbors::declareOptions(), PLearn::GenericNearestNeighbors::declareOptions(), PLearn::LocallyMagnifiedDistribution::declareOptions(), PLearn::NeighborhoodBoxVolumeDensityEstimator::declareOptions(), PLearn::FeatureSetNNet::declareOptions(), PLearn::DistRepNNet::declareOptions(), PLearn::NeuralProbabilisticLanguageModel::declareOptions(), PLearn::DeepNonLocalManifoldParzen::declareOptions(), PLearn::PCA::em_algo(), PLearn::PCA::em_orth_algo(), PLearn::ManifoldParzen2::evaluate(), PLearn::AdaBoost::finalize(), PLearn::ExhaustiveNearestNeighbors::findNearestNeighbors(), PLearn::DeepReconstructorNet::fineTuningFor1Epoch(), PLearn::EntropyContrastLearner::forget(), PLearn::KMeansClustering::forget(), PLearn::GaussianContinuum::forget(), PLearn::NNet::forget(), PLearn::DeepNNet::forget(), PLearn::FeatureSetNaiveBayesClassifier::forget(), PLearn::TangentLearner::forget(), PLearn::GaussianContinuumDistribution::forget(), PLearn::NeighborhoodSmoothnessNNet::forget(), PLearn::NonLocalManifoldParzen::forget(), PLearn::ConditionalDensityNet::forget(), PLearn::DistRepNNet::forget(), PLearn::NeuralProbabilisticLanguageModel::forget(), PLearn::FeatureSetSequentialCRF::forget(), PLearn::FeatureSetNNet::forget(), PLearn::MultiInstanceNNet::forget(), PLearn::LocallyMagnifiedDistribution::getActualNComputationNeighbors(), PLearn::LocallyMagnifiedDistribution::getActualNWidthNeighbors(), PLearn::AnalyzeFieldStats::getHeaderRecord(), PLearn::DenoisingRecurrentNet::getSequence(), PLearn::RegressionTree::getTestCostNames(), PLearn::PCA::incremental_algo(), PLearn::RegressionTree::initialiseTree(), PLearn::FeatureSetSequentialCRF::initializeParams(), PLearn::DistRepNNet::initializeParams(), PLearn::FeatureSetNNet::initializeParams(), PLearn::TangentLearner::initializeParams(), PLearn::NeuralProbabilisticLanguageModel::initializeParams(), PLearn::LocalMedBoost::initializeSampleWeight(), PLearn::BasisSelectionRegressor::initTargetsResidueWeight(), initTrain(), PLearn::GaussianDistribution::inputsize(), PLearn::BallTreeNearestNeighbors::leafFromAnchor(), PLearn::LocallyMagnifiedDistribution::log_density(), PLearn::KernelDensityEstimator::log_density(), PLearn::NeighborhoodBoxVolumeDensityEstimator::log_density(), PLearn::TransformationLearner::mainLearnerBuild(), PLearn::GaussianContinuum::make_random_walk(), PLearn::GaussianContinuumDistribution::make_random_walk(), makeDeepCopyFromShallowCopy(), PLearn::GenericNearestNeighbors::outputsize(), PLearn::ClassifierFromConditionalPDistribution::outputsize(), PLearn::KNNRegressor::outputsize(), PLearn::ExhaustiveNearestNeighbors::preloadInputCache(), PLearn::DeepReconstructorNet::prepareForFineTuning(), PLearn::FeatureSetSequentialCRF::processDataSet(), PLearn::FeatureSetNNet::processDataSet(), PLearn::NeuralProbabilisticLanguageModel::processDataSet(), PLearn::FeatureSetNaiveBayesClassifier::processDataSet(), PLearn::BasisSelectionRegressor::recomputeFeatures(), PLearn::BasisSelectionRegressor::recomputeResidue(), PLearn::LocalMedBoost::recomputeSampleWeight(), PLearn::NnlmOnlineLearner::reevaluateGaussianParameters(), PLearn::GaussMix::resizeDataBeforeTraining(), PLearn::BasisSelectionRegressor::retrainLearner(), PLearn::TransformationLearner::returnTrainingPoint(), PLearn::AnalyzeFieldStats::reviewGlobalStats(), PLearn::TransformationLearner::seeTrainingPoint(), PLearn::MultiClassAdaBoost::setTrainingSet(), PLearn::SequentialLearner::setTrainingSet(), PLearn::NeighborhoodSmoothnessNNet::setTrainingSet(), PLearn::VPLPreprocessedLearner2::setTrainingSet(), PLearn::UniformizeLearner::setTrainingSet(), PLearn::VPLPreprocessedLearner::setTrainingSet(), PLearn::StatefulLearner::setTrainingSet(), PLearn::MultiInstanceNNet::setTrainingSet(), PLearn::AddCostToLearner::setTrainingSet(), setTrainingSet(), PLearn::VPLCombinedLearner::setTrainingSet(), PLearn::NeuralProbabilisticLanguageModel::test(), PLearn::FeatureSetNNet::test(), PLearn::FeatureSetNaiveBayesClassifier::test(), PLearn::FeatureSetSequentialCRF::test(), PLearn::DeepReconstructorNet::train(), PLearn::KNNClassifier::train(), PLearn::AdaBoost::train(), PLearn::DeepBeliefNet::train(), PLearn::IncrementalNNet::train(), PLearn::LinearRegressor::train(), PLearn::LLC::train(), PLearn::PartSupervisedDBN::train(), PLearn::StackedFocusedAutoassociatorsNet::train(), PLearn::SurfaceTemplateLearner::train(), PLearn::TopDownAsymetricDeepNetwork::train(), PLearn::FeatureSetNNet::train(), PLearn::StackedModulesLearner::train(), PLearn::ClassifierFromDensity::train(), PLearn::DiscriminativeRBM::train(), PLearn::DiverseComponentAnalysis::train(), PLearn::HintonDeepBeliefNet::train(), PLearn::KernelRidgeRegressor::train(), PLearn::KFoldLogisticClassifier::train(), PLearn::NatGradSMPNNet::train(), PLearn::NonLocalManifoldParzen::train(), PLearn::NeighborhoodBoxVolumeDensityEstimator::train(), PLearn::NNet::train(), PLearn::UniformizeLearner::train(), PLearn::AutoLinearRegressor::train(), PLearn::ConstantRegressor::train(), PLearn::GaussianContinuum::train(), PLearn::HistogramDistribution::train(), PLearn::LocalMedBoost::train(), PLearn::mNNet::train(), PLearn::AddCostToLearner::train(), PLearn::DeepNonLocalManifoldParzen::train(), PLearn::GaussianDBNRegression::train(), PLearn::NGramDistribution::train(), PLearn::ParzenWindow::train(), PLearn::BaseRegressorConfidence::train(), PLearn::FeatureSetNaiveBayesClassifier::train(), PLearn::PLS::train(), PLearn::ConditionalDensityNet::train(), PLearn::DynamicallyLinkedRBMsModel::train(), PLearn::GaussMix::train(), PLearn::LocallyMagnifiedDistribution::train(), PLearn::ModuleLearner::train(), PLearn::MovingAverage::train(), PLearn::SequentialModelSelector::train(), PLearn::GaussianContinuumDistribution::train(), PLearn::GaussianDBNClassification::train(), PLearn::ManifoldParzen2::train(), PLearn::NeighborhoodSmoothnessNNet::train(), PLearn::NeuralProbabilisticLanguageModel::train(), PLearn::NnlmOnlineLearner::train(), PLearn::SupervisedDBN::train(), PLearn::DiscriminativeDeepBeliefNet::train(), PLearn::GaussPartSupervisedDBN::train(), PLearn::KPCATangentLearner::train(), PLearn::ManifoldParzen::train(), PLearn::NormalizationLearner::train(), PLearn::DeepNNet::train(), PLearn::DistRepNNet::train(), PLearn::ModulesLearner::train(), PLearn::NxProfileLearner::train(), PLearn::PseudolikelihoodRBM::train(), PLearn::CubicSpline::train(), PLearn::EntropyContrastLearner::train(), PLearn::LinearInductiveTransferClassifier::train(), PLearn::SubsamplingDBN::train(), PLearn::EntropyContrast::train(), PLearn::MultiInstanceNNet::train(), PLearn::RBMDistribution::train(), PLearn::StackedAutoassociatorsNet::train(), PLearn::StackedSVDNet::train(), PLearn::TangentLearner::train(), PLearn::BinaryStump::train(), PLearn::PruningLinearRegressor::train(), PLearn::UnfrozenDeepBeliefNet::train(), PLearn::BaggingLearner::train(), PLearn::DeepFeatureExtractorNNet::train(), PLearn::GaussianProcessRegressor::train(), PLearn::KMeansClustering::train(), PLearn::MoleculeTemplateLearner::train(), PLearn::NatGradNNet::train(), PLearn::VariableSelectionWithDirectedGradientDescent::train(), PLearn::ClassifierFromConditionalPDistribution::train(), PLearn::WPLS::train(), PLearn::DeepNonLocalManifoldParzen::updateManifoldParzenParameters(), PLearn::DiscriminativeDeepBeliefNet::updateNearestNeighbors(), PLearn::StackedFocusedAutoassociatorsNet::updateTrainSetRepresentations(), PLearn::FeatureSetNaiveBayesClassifier::use(), PLearn::FeatureSetSequentialCRF::use(), PLearn::NeuralProbabilisticLanguageModel::use(), PLearn::FeatureSetNNet::use(), and useOnTrain().

The stats_collector responsible for collecting train cost statistics during training.

This is typically set by some external training harness that wants to collect some stats.

Reimplemented in PLearn::TestImputations.

Definition at line 241 of file PLearner.h.

Referenced by PLearn::MultiClassAdaBoost::build_(), PLearn::SecondIterationWrapper::computeClassStatistics(), PLearn::AdaBoost::computeCostsFromOutputs(), PLearn::AdaBoost::computeOutputAndCosts(), PLearn::SecondIterationWrapper::computeSalesStatistics(), PLearn::AdaBoost::computeTrainingError(), PLearn::DeepReconstructorNet::fineTuningFor1Epoch(), PLearn::MultiClassAdaBoost::forget(), initTrain(), makeDeepCopyFromShallowCopy(), setTrainStatsCollector(), PLearn::DeepReconstructorNet::train(), PLearn::HyperLearner::train(), PLearn::AdaBoost::train(), PLearn::BasisSelectionRegressor::train(), PLearn::DeepBeliefNet::train(), PLearn::IncrementalNNet::train(), PLearn::LinearRegressor::train(), PLearn::PartSupervisedDBN::train(), PLearn::StackedFocusedAutoassociatorsNet::train(), PLearn::TopDownAsymetricDeepNetwork::train(), PLearn::FeatureSetNNet::train(), PLearn::StackedModulesLearner::train(), PLearn::ClassifierFromDensity::train(), PLearn::DenoisingRecurrentNet::train(), PLearn::DiscriminativeRBM::train(), PLearn::DiverseComponentAnalysis::train(), PLearn::HintonDeepBeliefNet::train(), PLearn::MultiClassAdaBoost::train(), PLearn::NatGradSMPNNet::train(), PLearn::NonLocalManifoldParzen::train(), PLearn::NNet::train(), PLearn::AutoLinearRegressor::train(), PLearn::ConstantRegressor::train(), PLearn::GaussianContinuum::train(), PLearn::LocalMedBoost::train(), PLearn::mNNet::train(), PLearn::DeepNonLocalManifoldParzen::train(), PLearn::GaussianDBNRegression::train(), PLearn::FeatureSetNaiveBayesClassifier::train(), PLearn::ConditionalDensityNet::train(), PLearn::DynamicallyLinkedRBMsModel::train(), PLearn::GaussMix::train(), PLearn::ModuleLearner::train(), PLearn::MovingAverage::train(), PLearn::RegressionTree::train(), PLearn::SequentialModelSelector::train(), PLearn::GaussianContinuumDistribution::train(), PLearn::GaussianDBNClassification::train(), PLearn::NeighborhoodSmoothnessNNet::train(), PLearn::NeuralProbabilisticLanguageModel::train(), PLearn::NnlmOnlineLearner::train(), PLearn::SupervisedDBN::train(), PLearn::DiscriminativeDeepBeliefNet::train(), PLearn::GaussPartSupervisedDBN::train(), PLearn::ManifoldParzen::train(), PLearn::NormalizationLearner::train(), PLearn::StackedLearner::train(), PLearn::DeepNNet::train(), PLearn::DistRepNNet::train(), PLearn::ModulesLearner::train(), PLearn::NxProfileLearner::train(), PLearn::PseudolikelihoodRBM::train(), PLearn::EntropyContrastLearner::train(), PLearn::LinearInductiveTransferClassifier::train(), PLearn::SubsamplingDBN::train(), PLearn::MultiInstanceNNet::train(), PLearn::StackedAutoassociatorsNet::train(), PLearn::StackedSVDNet::train(), PLearn::TangentLearner::train(), PLearn::BinaryStump::train(), PLearn::UnfrozenDeepBeliefNet::train(), PLearn::DeepFeatureExtractorNNet::train(), PLearn::KMeansClustering::train(), PLearn::MoleculeTemplateLearner::train(), PLearn::NatGradNNet::train(), PLearn::VariableSelectionWithDirectedGradientDescent::train(), PLearn::ClassifierFromConditionalPDistribution::train(), PLearn::ModuleLearner::trainingStep(), and PLearn::DenoisingRecurrentNet::trainUnconditionalPredictor().

This option allows to perform testing always in the same conditions in terms of the random generator (if testing involves some non-deterministic component, this can be useful in order to obtain repeatable test results).

If non-zero, the base class test() method will use a different random generator than the rest of the code (i.e. training). The non-zero value is the seed to be used during testing. A value of -1 sets the seed differently each time depending on clock. (which is probably not desired here).

Definition at line 196 of file PLearner.h.

Referenced by declareOptions(), PLearn::PseudolikelihoodRBM::test(), test(), PLearn::ModuleLearner::train(), and PLearn::RBMDistribution::train().

Validation set used in some contexts.

Reimplemented in PLearn::EntropyContrast.

Definition at line 220 of file PLearner.h.

Referenced by PLearn::NGramDistribution::declareOptions(), makeDeepCopyFromShallowCopy(), setValidationSet(), and PLearn::NGramDistribution::train().

Level of verbosity.

If 0, should not write anything on cerr. If >0 may write some info on the steps performed (the amount of detail written depends on the value of this option).

Reimplemented in PLearn::NatGradSMPNNet.

Definition at line 145 of file PLearner.h.

Referenced by PLearn::HyperLearner::auto_save(), PLearn::NnlmOnlineLearner::build_(), PLearn::AddCostToLearner::build_(), PLearn::GaussianContinuum::compute_train_and_validation_costs(), PLearn::GaussianDistribution::computeEigenDecomposition(), PLearn::LocalGaussianClassifier::computeOutput(), PLearn::AdaBoost::computeTrainingError(), declareOptions(), PLearn::BasisSelectionRegressor::findBestCandidateFunction(), PLearn::KernelProjection::forget(), PLearn::RBMDistribution::generateN(), PLearn::RegressionTree::initialiseTree(), initTrain(), PLearn::GaussMix::kmeans(), PLearn::VPLProcessor::processDataSet(), PLearn::VPLProcessor::setTrainingSet(), PLearn::VPLPreprocessedLearner2::setTrainingSet(), PLearn::AdaBoost::setTrainingSet(), PLearn::WPLS::train(), PLearn::TangentLearner::train(), PLearn::SubsamplingDBN::train(), PLearn::StackedSVDNet::train(), PLearn::StackedFocusedAutoassociatorsNet::train(), PLearn::PLS::train(), PLearn::NonLocalManifoldParzen::train(), PLearn::NNet::train(), PLearn::NGramDistribution::train(), PLearn::NeuralProbabilisticLanguageModel::train(), PLearn::NeighborhoodSmoothnessNNet::train(), PLearn::NatGradNNet::train(), PLearn::MultiInstanceNNet::train(), PLearn::mNNet::train(), PLearn::LocalMedBoost::train(), PLearn::LLC::train(), PLearn::LinearRegressor::train(), PLearn::LinearInductiveTransferClassifier::train(), PLearn::KernelProjection::train(), PLearn::IncrementalNNet::train(), PLearn::HyperLearner::train(), PLearn::GaussMix::train(), PLearn::GaussianContinuumDistribution::train(), PLearn::GaussianContinuum::train(), PLearn::FeatureSetNNet::train(), PLearn::FeatureSetNaiveBayesClassifier::train(), PLearn::EntropyContrastLearner::train(), PLearn::DynamicallyLinkedRBMsModel::train(), PLearn::DistRepNNet::train(), PLearn::DenoisingRecurrentNet::train(), PLearn::DeepFeatureExtractorNNet::train(), PLearn::DeepBeliefNet::train(), PLearn::ConditionalDensityNet::train(), PLearn::ClassifierFromDensity::train(), PLearn::ClassifierFromConditionalPDistribution::train(), PLearn::BinaryStump::train(), PLearn::BestAveragingPLearner::train(), PLearn::BasisSelectionRegressor::train(), PLearn::AddCostToLearner::train(), PLearn::AdaBoost::train(), PLearn::VariableSelectionWithDirectedGradientDescent::verbose(), PLearn::RegressionTree::verbose(), PLearn::LocalMedBoost::verbose(), PLearn::BaseRegressorWrapper::verbose(), and PLearn::BaseRegressorConfidence::verbose().

Learnt weightsize obtained from train_set when doing setTrainingSet.

Definition at line 231 of file PLearner.h.

Referenced by PLearn::LinearInductiveTransferClassifier::build_(), PLearn::StackedAutoassociatorsNet::build_(), PLearn::DistRepNNet::build_(), PLearn::DiscriminativeDeepBeliefNet::build_(), PLearn::ManifoldParzen::build_(), PLearn::ConditionalDensityNet::build_(), PLearn::FeatureSetSequentialCRF::build_(), PLearn::FeatureSetNNet::build_(), PLearn::FeatureSetNaiveBayesClassifier::build_(), PLearn::NeighborhoodSmoothnessNNet::build_(), PLearn::StackedFocusedAutoassociatorsNet::build_(), PLearn::DeepNonLocalManifoldParzen::build_(), PLearn::NeuralProbabilisticLanguageModel::build_(), PLearn::NNet::build_(), PLearn::MultiInstanceNNet::build_(), PLearn::DeepFeatureExtractorNNet::build_(), PLearn::DeepNNet::build_(), PLearn::TopDownAsymetricDeepNetwork::build_(), PLearn::StackedSVDNet::build_(), PLearn::DistRepNNet::buildCosts(), PLearn::DeepFeatureExtractorNNet::buildCosts(), PLearn::NNet::buildCosts(), PLearn::LinearInductiveTransferClassifier::buildTargetAndWeight(), PLearn::NNet::buildTargetAndWeight(), PLearn::DeepFeatureExtractorNNet::buildTargetAndWeight(), PLearn::DistRepNNet::buildVarGraph(), PLearn::MultiInstanceNNet::computeOutputAndCosts(), declareOptions(), PLearn::NeighborhoodSmoothnessNNet::setTrainingSet(), PLearn::StatefulLearner::setTrainingSet(), PLearn::MultiInstanceNNet::setTrainingSet(), setTrainingSet(), PLearn::VariableSelectionWithDirectedGradientDescent::train(), and weightsize().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines