TMVA::MethodMLP Class Reference

#include <MethodMLP.h>

Inheritance diagram for TMVA::MethodMLP:

TMVA::MethodANNBase TMVA::IFitterTarget TMVA::ConvergenceTest TMVA::MethodANNBase TMVA::IFitterTarget TMVA::ConvergenceTest TMVA::MethodBase TMVA::MethodBase TMVA::MethodBase TMVA::MethodBase TMVA::Configurable TMVA::IMethod TMVA::Configurable TMVA::IMethod TMVA::Configurable TMVA::IMethod TMVA::Configurable TMVA::IMethod TMVA::Configurable TMVA::IMethod TMVA::Configurable TMVA::IMethod TMVA::Configurable TMVA::IMethod TMVA::Configurable TMVA::IMethod List of all members.

Public Types

enum  ETrainingMethod
enum  EBPTrainingMode
enum  ETrainingMethod
enum  EBPTrainingMode

Public Member Functions

 MethodMLP (const TString &jobName, const TString &methodTitle, DataSetInfo &theData, const TString &theOption, TDirectory *theTargetDir=0)
 MethodMLP (DataSetInfo &theData, const TString &theWeightFile, TDirectory *theTargetDir=0)
virtual ~MethodMLP ()
virtual Bool_t HasAnalysisType (Types::EAnalysisType type, UInt_t numberClasses, UInt_t numberTargets)
void Train ()
Double_t ComputeEstimator (std::vector< Double_t > &parameters)
Double_t EstimatorFunction (std::vector< Double_t > &parameters)
bool HasInverseHessian ()
Double_t GetMvaValueAsymError (Double_t *errUpper, Double_t *errLower)
 MethodMLP (const TString &jobName, const TString &methodTitle, DataSetInfo &theData, const TString &theOption, TDirectory *theTargetDir=0)
 MethodMLP (DataSetInfo &theData, const TString &theWeightFile, TDirectory *theTargetDir=0)
virtual ~MethodMLP ()
virtual Bool_t HasAnalysisType (Types::EAnalysisType type, UInt_t numberClasses, UInt_t numberTargets)
void Train ()
Double_t ComputeEstimator (std::vector< Double_t > &parameters)
Double_t EstimatorFunction (std::vector< Double_t > &parameters)
bool HasInverseHessian ()
Double_t GetMvaValueAsymError (Double_t *errUpper, Double_t *errLower)

Protected Member Functions

void MakeClassSpecific (std::ostream &, const TString &) const
void GetHelpMessage () const
void MakeClassSpecific (std::ostream &, const TString &) const
void GetHelpMessage () const

Private Member Functions

void DeclareOptions ()
void ProcessOptions ()
void Train (Int_t nEpochs)
void Init ()
void InitializeLearningRates ()
Double_t CalculateEstimator (Types::ETreeType treeType=Types::kTraining, Int_t iEpoch=-1)
void BFGSMinimize (Int_t nEpochs)
void SetGammaDelta (TMatrixD &Gamma, TMatrixD &Delta, std::vector< Double_t > &Buffer)
void SteepestDir (TMatrixD &Dir)
Bool_t GetHessian (TMatrixD &Hessian, TMatrixD &Gamma, TMatrixD &Delta)
void SetDir (TMatrixD &Hessian, TMatrixD &Dir)
Double_t DerivDir (TMatrixD &Dir)
Bool_t LineSearch (TMatrixD &Dir, std::vector< Double_t > &Buffer, Double_t *dError=0)
void ComputeDEDw ()
void SimulateEvent (const Event *ev)
void SetDirWeights (std::vector< Double_t > &Origin, TMatrixD &Dir, Double_t alpha)
Double_t GetError ()
Double_t GetMSEErr (const Event *ev, UInt_t index=0)
Double_t GetCEErr (const Event *ev, UInt_t index=0)
void BackPropagationMinimize (Int_t nEpochs)
void TrainOneEpoch ()
void Shuffle (Int_t *index, Int_t n)
void DecaySynapseWeights (Bool_t lateEpoch)
void TrainOneEvent (Int_t ievt)
Double_t GetDesiredOutput (const Event *ev)
void UpdateNetwork (Double_t desired, Double_t eventWeight=1.0)
void UpdateNetwork (std::vector< Float_t > &desired, Double_t eventWeight=1.0)
void CalculateNeuronDeltas ()
void UpdateSynapses ()
void AdjustSynapseWeights ()
void TrainOneEventFast (Int_t ievt, Float_t *&branchVar, Int_t &type)
void GeneticMinimize ()
void GetApproxInvHessian (TMatrixD &InvHessian, bool regulate=true)
void UpdateRegulators ()
void UpdatePriors ()
void DeclareOptions ()
void ProcessOptions ()
void Train (Int_t nEpochs)
void Init ()
void InitializeLearningRates ()
Double_t CalculateEstimator (Types::ETreeType treeType=Types::kTraining, Int_t iEpoch=-1)
void BFGSMinimize (Int_t nEpochs)
void SetGammaDelta (TMatrixD &Gamma, TMatrixD &Delta, std::vector< Double_t > &Buffer)
void SteepestDir (TMatrixD &Dir)
Bool_t GetHessian (TMatrixD &Hessian, TMatrixD &Gamma, TMatrixD &Delta)
void SetDir (TMatrixD &Hessian, TMatrixD &Dir)
Double_t DerivDir (TMatrixD &Dir)
Bool_t LineSearch (TMatrixD &Dir, std::vector< Double_t > &Buffer, Double_t *dError=0)
void ComputeDEDw ()
void SimulateEvent (const Event *ev)
void SetDirWeights (std::vector< Double_t > &Origin, TMatrixD &Dir, Double_t alpha)
Double_t GetError ()
Double_t GetMSEErr (const Event *ev, UInt_t index=0)
Double_t GetCEErr (const Event *ev, UInt_t index=0)
void BackPropagationMinimize (Int_t nEpochs)
void TrainOneEpoch ()
void Shuffle (Int_t *index, Int_t n)
void DecaySynapseWeights (Bool_t lateEpoch)
void TrainOneEvent (Int_t ievt)
Double_t GetDesiredOutput (const Event *ev)
void UpdateNetwork (Double_t desired, Double_t eventWeight=1.0)
void UpdateNetwork (std::vector< Float_t > &desired, Double_t eventWeight=1.0)
void CalculateNeuronDeltas ()
void UpdateSynapses ()
void AdjustSynapseWeights ()
void TrainOneEventFast (Int_t ievt, Float_t *&branchVar, Int_t &type)
void GeneticMinimize ()
void GetApproxInvHessian (TMatrixD &InvHessian, bool regulate=true)
void UpdateRegulators ()
void UpdatePriors ()

Private Attributes

bool fUseRegulator
bool fCalculateErrors
Double_t fPrior
std::vector< Double_tfPriorDev
Int_t fUpdateLimit
ETrainingMethod fTrainingMethod
TString fTrainMethodS
Float_t fSamplingFraction
Float_t fSamplingEpoch
Float_t fSamplingWeight
Bool_t fSamplingTraining
Bool_t fSamplingTesting
Double_t fLastAlpha
Double_t fTau
Int_t fResetStep
Double_t fLearnRate
Double_t fDecayRate
EBPTrainingMode fBPMode
TString fBpModeS
Int_t fBatchSize
Int_t fTestRate
Bool_t fEpochMon
Int_t fGA_nsteps
Int_t fGA_preCalc
Int_t fGA_SC_steps
Int_t fGA_SC_rate
Double_t fGA_SC_factor
std::vector< Double_tfPriorDev

Static Private Attributes

static const Int_t fgPRINT_ESTIMATOR_INC = 10
static const Bool_t fgPRINT_SEQ = kFALSE
static const Bool_t fgPRINT_BATCH = kFALSE

Detailed Description

Definition at line 86 of file MethodMLP.h.


Member Enumeration Documentation

enum TMVA::MethodMLP::ETrainingMethod

Definition at line 111 of file MethodMLP.h.

enum TMVA::MethodMLP::EBPTrainingMode

Definition at line 112 of file MethodMLP.h.

enum TMVA::MethodMLP::ETrainingMethod

Definition at line 111 of file MethodMLP.h.

enum TMVA::MethodMLP::EBPTrainingMode

Definition at line 112 of file MethodMLP.h.


Constructor & Destructor Documentation

TMVA::MethodMLP::MethodMLP ( const TString jobName,
const TString methodTitle,
DataSetInfo theData,
const TString theOption,
TDirectory theTargetDir = 0 
)

TMVA::MethodMLP::MethodMLP ( DataSetInfo theData,
const TString theWeightFile,
TDirectory theTargetDir = 0 
)

Definition at line 85 of file MethodMLP.cxx.

TMVA::MethodMLP::~MethodMLP (  )  [virtual]

Definition at line 97 of file MethodMLP.cxx.

TMVA::MethodMLP::MethodMLP ( const TString jobName,
const TString methodTitle,
DataSetInfo theData,
const TString theOption,
TDirectory theTargetDir = 0 
)

TMVA::MethodMLP::MethodMLP ( DataSetInfo theData,
const TString theWeightFile,
TDirectory theTargetDir = 0 
)

virtual TMVA::MethodMLP::~MethodMLP (  )  [virtual]


Member Function Documentation

Bool_t TMVA::MethodMLP::HasAnalysisType ( Types::EAnalysisType  type,
UInt_t  numberClasses,
UInt_t  numberTargets 
) [virtual]

Implements TMVA::IMethod.

Definition at line 104 of file MethodMLP.cxx.

References TMVA::Types::kClassification, kFALSE, TMVA::Types::kMulticlass, TMVA::Types::kRegression, and kTRUE.

void TMVA::MethodMLP::Train ( void   )  [inline, virtual]

Implements TMVA::MethodANNBase.

Definition at line 105 of file MethodMLP.h.

References TMVA::MethodANNBase::NumCycles().

Referenced by Train().

Double_t TMVA::MethodMLP::ComputeEstimator ( std::vector< Double_t > &  parameters  ) 

Definition at line 1221 of file MethodMLP.cxx.

References TObjArray::At(), CalculateEstimator(), TMVA::MethodANNBase::fSynapses, fUseRegulator, TObjArray::GetEntriesFast(), i, TMVA::TSynapse::SetWeight(), and UpdatePriors().

Referenced by EstimatorFunction().

Double_t TMVA::MethodMLP::EstimatorFunction ( std::vector< Double_t > &  parameters  )  [virtual]

Implements TMVA::IFitterTarget.

Definition at line 1214 of file MethodMLP.cxx.

References ComputeEstimator().

bool TMVA::MethodMLP::HasInverseHessian (  )  [inline]

Definition at line 114 of file MethodMLP.h.

References fCalculateErrors.

Double_t TMVA::MethodMLP::GetMvaValueAsymError ( Double_t errUpper,
Double_t errLower 
)

Definition at line 1375 of file MethodMLP.cxx.

References TObjArray::At(), CalculateNeuronDeltas(), Endl, TMVA::TActivation::Eval(), TMVA::TActivation::EvalDerivative(), TMVA::MethodANNBase::fInvHessian, TMVA::MethodANNBase::fOutput, TMVA::MethodANNBase::fSynapses, TObjArray::GetEntriesFast(), TMVA::MethodANNBase::GetMvaValue(), TMatrixTBase< Element >::GetNcols(), TMVA::MethodANNBase::GetOutputNeuron(), TMVA::TNeuron::GetValue(), i, TMVA::kWARNING, TMVA::Configurable::Log(), TMVA::TNeuron::SetError(), and TMatrixT< Element >::Transpose().

void TMVA::MethodMLP::MakeClassSpecific ( std::ostream &  ,
const TString  
) const [protected, virtual]

Reimplemented from TMVA::MethodANNBase.

Definition at line 1527 of file MethodMLP.cxx.

References TMVA::MethodANNBase::MakeClassSpecific().

void TMVA::MethodMLP::GetHelpMessage (  )  const [protected, virtual]

Implements TMVA::IMethod.

Definition at line 1534 of file MethodMLP.cxx.

References TMVA::Tools::Color(), Endl, TMVA::gConfig(), TMVA::gTools(), TMVA::Configurable::Log(), and TMVA::Config::WriteOptionsReference().

void TMVA::MethodMLP::DeclareOptions (  )  [private, virtual]

Reimplemented from TMVA::MethodANNBase.

Definition at line 127 of file MethodMLP.cxx.

References TMVA::Configurable::AddPreDefVal(), TMVA::Configurable::DeclareOptionRef(), fBatchSize, fBpModeS, fCalculateErrors, fDecayRate, fEpochMon, TMVA::ConvergenceTest::fImprovement, fLearnRate, fResetStep, fSamplingEpoch, fSamplingFraction, fSamplingTesting, fSamplingTraining, fSamplingWeight, TMVA::ConvergenceTest::fSteps, fTau, fTestRate, fTrainMethodS, fUpdateLimit, fUseRegulator, kFALSE, and kTRUE.

void TMVA::MethodMLP::ProcessOptions (  )  [private, virtual]

Reimplemented from TMVA::MethodANNBase.

Definition at line 190 of file MethodMLP.cxx.

References TMVA::MethodBase::Data(), Endl, fBatchSize, fBPMode, fBpModeS, fTrainingMethod, fTrainMethodS, TMVA::MethodBase::GetMethodTypeName(), TMVA::DataSet::GetNEvents(), TMVA::MethodBase::IgnoreEventsWithNegWeightsInTraining(), kBatch, kBFGS, kBP, TMVA::kFATAL, kGA, kSequential, TMVA::Types::kTraining, TMVA::Configurable::Log(), TMVA::MethodANNBase::ProcessOptions(), and TMVA::DataSet::SetCurrentType().

void TMVA::MethodMLP::Train ( Int_t  nEpochs  )  [private]

Definition at line 337 of file MethodMLP.cxx.

References BackPropagationMinimize(), BFGSMinimize(), CalculateEstimator(), Endl, fCalculateErrors, TMVA::MethodANNBase::fInvHessian, TMVA::MethodANNBase::fNetwork, TMVA::MethodANNBase::fSynapses, fTrainingMethod, fUseRegulator, GeneticMinimize(), TMVA::MethodBase::GetAnalysisType(), GetApproxInvHessian(), TObjArray::GetEntriesFast(), TMVA::MethodBase::GetNEvents(), InitializeLearningRates(), kBFGS, TMVA::kDEBUG, TMVA::kFATAL, kGA, TMVA::kINFO, TMVA::Types::kTesting, TMVA::Types::kTraining, TMVA::Configurable::Log(), nEvents, TMVA::MethodANNBase::PrintMessage(), TMatrixT< Element >::ResizeTo(), TMVA::MethodBase::SetAnalysisType(), and UpdateRegulators().

void TMVA::MethodMLP::Init (  )  [private, virtual]

Implements TMVA::MethodBase.

Definition at line 115 of file MethodMLP.cxx.

References TMVA::MethodBase::SetSignalReferenceCut().

void TMVA::MethodMLP::InitializeLearningRates (  )  [private]

Definition at line 219 of file MethodMLP.cxx.

References TObjArray::At(), Endl, fLearnRate, TMVA::MethodANNBase::fSynapses, TObjArray::GetEntriesFast(), i, TMVA::kDEBUG, TMVA::Configurable::Log(), and TMVA::TSynapse::SetLearningRate().

Referenced by Train().

Double_t TMVA::MethodMLP::CalculateEstimator ( Types::ETreeType  treeType = Types::kTraining,
Int_t  iEpoch = -1 
) [private]

Definition at line 232 of file MethodMLP.cxx.

References TMVA::MethodANNBase::CreateWeightMonitoringHists(), d, TMVA::MethodBase::Data(), TMVA::MethodBase::DataInfo(), desired, TMVA::MethodBase::DoMulticlass(), TMVA::MethodBase::DoRegression(), Endl, exp(), fEpochMon, TMVA::MethodANNBase::fEpochMonHistB, TMVA::MethodANNBase::fEpochMonHistS, TMVA::MethodANNBase::fEpochMonHistW, TMVA::MethodANNBase::fEstimator, TH1::Fill(), TMVA::MethodANNBase::ForceNetworkCalculations(), TMVA::MethodANNBase::ForceNetworkInputs(), Form(), TMVA::TNeuron::GetActivationValue(), TMVA::DataSet::GetCurrentType(), TMVA::MethodBase::GetEvent(), TMVA::DataSetInfo::GetNClasses(), TMVA::MethodBase::GetNEvents(), TMVA::DataSetInfo::GetNTargets(), TMVA::MethodANNBase::GetOutputNeuron(), i, TMVA::DataSetInfo::IsSignal(), TMVA::MethodANNBase::kCE, TMVA::kFATAL, TMVA::MethodANNBase::kMSE, TMVA::Types::kTesting, TMVA::Types::kTraining, TMath::Log(), TMVA::Configurable::Log(), name, nEvents, norm(), TMVA::DataSet::SetCurrentType(), type, and w.

Referenced by BackPropagationMinimize(), BFGSMinimize(), ComputeEstimator(), GeneticMinimize(), Train(), and UpdateRegulators().

void TMVA::MethodMLP::BFGSMinimize ( Int_t  nEpochs  )  [private]

Definition at line 378 of file MethodMLP.cxx.

References TObjArray::At(), buffer, CalculateEstimator(), TMVA::DataSet::CreateSampling(), TMVA::MethodBase::Data(), DerivDir(), Dir, Endl, TMVA::DataSet::EventResult(), TMVA::MethodANNBase::fEstimatorHistTest, TMVA::MethodANNBase::fEstimatorHistTrain, fgPRINT_SEQ, TH1::Fill(), fLastAlpha, Form(), TMVA::MethodANNBase::fRandomSeed, fResetStep, fSamplingEpoch, fSamplingFraction, fSamplingTesting, fSamplingTraining, fSamplingWeight, TMVA::ConvergenceTest::fSteps, TMVA::MethodANNBase::fSynapses, fTestRate, fUpdateLimit, fUseRegulator, TMath::Gamma(), TMVA::ConvergenceTest::GetCurrentValue(), TObjArray::GetEntriesFast(), GetHessian(), TMVA::MethodBase::GetName(), TMVA::ConvergenceTest::HasConverged(), i, TMVA::DataSet::InitSampling(), TMVA::kDEBUG, kFALSE, TMVA::kFATAL, TMVA::kINFO, TMVA::Types::kTesting, TMVA::Types::kTraining, kTRUE, TMVA::kWARNING, LineSearch(), TMVA::Configurable::Log(), TMVA::MethodANNBase::PrintNetwork(), TMVA::ConvergenceTest::Progress(), TMVA::ConvergenceTest::ResetConvergenceCounter(), TMVA::DataSet::SetCurrentType(), TMVA::ConvergenceTest::SetCurrentValue(), SetDir(), SetGammaDelta(), SteepestDir(), timer, TMatrixTBase< Element >::UnitMatrix(), UpdatePriors(), UpdateRegulators(), and TMVA::MethodANNBase::WaitForKeyboard().

Referenced by Train().

void TMVA::MethodMLP::SetGammaDelta ( TMatrixD Gamma,
TMatrixD Delta,
std::vector< Double_t > &  Buffer 
) [private]

Definition at line 553 of file MethodMLP.cxx.

References TObjArray::At(), ComputeDEDw(), TMVA::MethodANNBase::fSynapses, TMath::Gamma(), TObjArray::GetEntriesFast(), and i.

Referenced by BFGSMinimize().

void TMVA::MethodMLP::SteepestDir ( TMatrixD Dir  )  [private]

Definition at line 646 of file MethodMLP.cxx.

References TObjArray::At(), Dir, TMVA::MethodANNBase::fSynapses, TObjArray::GetEntriesFast(), and i.

Referenced by BFGSMinimize().

Bool_t TMVA::MethodMLP::GetHessian ( TMatrixD Hessian,
TMatrixD Gamma,
TMatrixD Delta 
) [private]

Definition at line 658 of file MethodMLP.cxx.

References a, TMath::Gamma(), kFALSE, TMatrixT< Element >::kMult, TMatrixT< Element >::kTransposed, TMatrixT< Element >::kTransposeMult, and kTRUE.

Referenced by BFGSMinimize().

void TMVA::MethodMLP::SetDir ( TMatrixD Hessian,
TMatrixD Dir 
) [private]

Definition at line 678 of file MethodMLP.cxx.

References TObjArray::At(), dir(), TMVA::MethodANNBase::fSynapses, TObjArray::GetEntriesFast(), and i.

Referenced by BFGSMinimize().

Double_t TMVA::MethodMLP::DerivDir ( TMatrixD Dir  )  [private]

Definition at line 694 of file MethodMLP.cxx.

References TObjArray::At(), Dir, TMVA::MethodANNBase::fSynapses, TObjArray::GetEntriesFast(), and i.

Referenced by BFGSMinimize().

Bool_t TMVA::MethodMLP::LineSearch ( TMatrixD Dir,
std::vector< Double_t > &  Buffer,
Double_t dError = 0 
) [private]

Definition at line 708 of file MethodMLP.cxx.

References TObjArray::At(), Dir, Endl, fLastAlpha, TMVA::MethodANNBase::fSynapses, fTau, TObjArray::GetEntriesFast(), GetError(), i, kFALSE, kTRUE, TMVA::kWARNING, TMVA::Configurable::Log(), and SetDirWeights().

Referenced by BFGSMinimize().

void TMVA::MethodMLP::ComputeDEDw (  )  [private]

Definition at line 577 of file MethodMLP.cxx.

References TObjArray::At(), fPriorDev, TMVA::MethodANNBase::fSynapses, fUseRegulator, TObjArray::GetEntriesFast(), TMVA::MethodBase::GetEvent(), TMVA::MethodBase::GetNEvents(), i, j, nEvents, and SimulateEvent().

Referenced by SetGammaDelta().

void TMVA::MethodMLP::SimulateEvent ( const Event ev  )  [private]

Definition at line 607 of file MethodMLP.cxx.

References TObjArray::At(), CalculateNeuronDeltas(), TMVA::MethodBase::DataInfo(), desired, TMVA::MethodBase::DoMulticlass(), TMVA::MethodBase::DoRegression(), error, TMVA::MethodANNBase::fEstimator, TMVA::MethodANNBase::ForceNetworkCalculations(), TMVA::MethodANNBase::ForceNetworkInputs(), TMVA::MethodANNBase::fSynapses, TMVA::TNeuron::GetActivationValue(), TMVA::Event::GetClass(), GetDesiredOutput(), TObjArray::GetEntriesFast(), TMVA::DataSetInfo::GetNClasses(), TMVA::DataSetInfo::GetNTargets(), TMVA::MethodANNBase::GetOutputNeuron(), TMVA::Event::GetTarget(), TMVA::Event::GetWeight(), j, TMVA::MethodANNBase::kCE, TMVA::MethodANNBase::kMSE, and TMVA::TNeuron::SetError().

Referenced by ComputeDEDw(), and GetError().

void TMVA::MethodMLP::SetDirWeights ( std::vector< Double_t > &  Origin,
TMatrixD Dir,
Double_t  alpha 
) [private]

Definition at line 817 of file MethodMLP.cxx.

References TObjArray::At(), Dir, TMVA::MethodANNBase::fSynapses, fUseRegulator, TObjArray::GetEntriesFast(), i, and UpdatePriors().

Referenced by LineSearch().

Double_t TMVA::MethodMLP::GetError (  )  [private]

Definition at line 832 of file MethodMLP.cxx.

References TMVA::MethodBase::DataInfo(), TMVA::MethodBase::DoMulticlass(), TMVA::MethodBase::DoRegression(), Endl, error, TMVA::MethodANNBase::fEstimator, fPrior, fUseRegulator, GetCEErr(), TMVA::MethodBase::GetEvent(), GetMSEErr(), TMVA::MethodBase::GetNEvents(), TMVA::MethodBase::GetNTargets(), i, TMVA::MethodANNBase::kCE, TMVA::MethodANNBase::kMSE, TMVA::kWARNING, TMVA::Configurable::Log(), nEvents, and SimulateEvent().

Referenced by LineSearch().

Double_t TMVA::MethodMLP::GetMSEErr ( const Event ev,
UInt_t  index = 0 
) [private]

Definition at line 864 of file MethodMLP.cxx.

References TMVA::MethodBase::DoMulticlass(), TMVA::MethodBase::DoRegression(), error, TMVA::TNeuron::GetActivationValue(), TMVA::Event::GetClass(), GetDesiredOutput(), TMVA::MethodANNBase::GetOutputNeuron(), TMVA::Event::GetTarget(), and output().

Referenced by GetError().

Double_t TMVA::MethodMLP::GetCEErr ( const Event ev,
UInt_t  index = 0 
) [private]

Definition at line 880 of file MethodMLP.cxx.

References TMVA::MethodBase::DoMulticlass(), TMVA::MethodBase::DoRegression(), error, TMVA::TNeuron::GetActivationValue(), TMVA::Event::GetClass(), GetDesiredOutput(), TMVA::MethodANNBase::GetOutputNeuron(), TMVA::Event::GetTarget(), TMath::Log(), and output().

Referenced by GetError().

void TMVA::MethodMLP::BackPropagationMinimize ( Int_t  nEpochs  )  [private]

Definition at line 895 of file MethodMLP.cxx.

References CalculateEstimator(), TMVA::DataSet::CreateSampling(), TMVA::MethodBase::Data(), DecaySynapseWeights(), Endl, TMVA::DataSet::EventResult(), TMVA::MethodANNBase::fEstimatorHistTest, TMVA::MethodANNBase::fEstimatorHistTrain, TH1::Fill(), Form(), TMVA::MethodANNBase::fRandomSeed, fSamplingEpoch, fSamplingFraction, fSamplingTesting, fSamplingTraining, fSamplingWeight, TMVA::ConvergenceTest::fSteps, fTestRate, TMVA::ConvergenceTest::GetCurrentValue(), TMVA::MethodBase::GetName(), TMVA::ConvergenceTest::HasConverged(), i, TMVA::DataSet::InitSampling(), kFALSE, TMVA::kINFO, TMVA::Types::kTesting, TMVA::Types::kTraining, kTRUE, TMVA::Configurable::Log(), TMVA::ConvergenceTest::Progress(), TMVA::ConvergenceTest::ResetConvergenceCounter(), TMVA::DataSet::SetCurrentType(), TMVA::ConvergenceTest::SetCurrentValue(), timer, and TrainOneEpoch().

Referenced by Train().

void TMVA::MethodMLP::TrainOneEpoch (  )  [private]

Definition at line 993 of file MethodMLP.cxx.

References AdjustSynapseWeights(), TMVA::MethodBase::Data(), fBatchSize, fBPMode, fgPRINT_BATCH, fgPRINT_SEQ, TMVA::DataSet::GetNEvents(), i, kBatch, nEvents, TMVA::MethodANNBase::PrintNetwork(), Shuffle(), TrainOneEvent(), and TMVA::MethodANNBase::WaitForKeyboard().

Referenced by BackPropagationMinimize().

void TMVA::MethodMLP::Shuffle ( Int_t index,
Int_t  n 
) [private]

Definition at line 1029 of file MethodMLP.cxx.

References a, TMVA::MethodANNBase::frgen, i, j, k, and TRandom3::Rndm().

Referenced by TrainOneEpoch().

void TMVA::MethodMLP::DecaySynapseWeights ( Bool_t  lateEpoch  )  [private]

Definition at line 1049 of file MethodMLP.cxx.

References TObjArray::At(), TMVA::TSynapse::DecayLearningRate(), fDecayRate, TMVA::MethodANNBase::fSynapses, TObjArray::GetEntriesFast(), and i.

Referenced by BackPropagationMinimize().

void TMVA::MethodMLP::TrainOneEvent ( Int_t  ievt  )  [private]

Definition at line 1099 of file MethodMLP.cxx.

References TMVA::MethodBase::DataInfo(), TMVA::MethodBase::DoMulticlass(), TMVA::MethodBase::DoRegression(), TMVA::MethodANNBase::ForceNetworkCalculations(), TMVA::MethodANNBase::ForceNetworkInputs(), GetDesiredOutput(), TMVA::MethodBase::GetEvent(), TMVA::Event::GetTargets(), TMVA::Event::GetWeight(), and UpdateNetwork().

Referenced by TrainOneEpoch().

Double_t TMVA::MethodMLP::GetDesiredOutput ( const Event ev  )  [private]

Definition at line 1119 of file MethodMLP.cxx.

References TMVA::MethodBase::DataInfo(), TMVA::MethodANNBase::fOutput, TMVA::TActivation::GetMax(), TMVA::TActivation::GetMin(), and TMVA::DataSetInfo::IsSignal().

Referenced by GetCEErr(), GetMSEErr(), SimulateEvent(), and TrainOneEvent().

void TMVA::MethodMLP::UpdateNetwork ( Double_t  desired,
Double_t  eventWeight = 1.0 
) [private]

Definition at line 1127 of file MethodMLP.cxx.

References CalculateNeuronDeltas(), Endl, error, TMVA::MethodANNBase::fEstimator, TMVA::TNeuron::GetActivationValue(), TMVA::MethodANNBase::GetOutputNeuron(), TMVA::MethodANNBase::kCE, TMVA::kFATAL, TMVA::MethodANNBase::kMSE, TMVA::Configurable::Log(), TMVA::TNeuron::SetError(), and UpdateSynapses().

Referenced by TrainOneEvent(), and TrainOneEventFast().

void TMVA::MethodMLP::UpdateNetwork ( std::vector< Float_t > &  desired,
Double_t  eventWeight = 1.0 
) [private]

Definition at line 1142 of file MethodMLP.cxx.

References CalculateNeuronDeltas(), error, TMVA::TNeuron::GetActivationValue(), TMVA::MethodANNBase::GetOutputNeuron(), i, TMVA::TNeuron::SetError(), and UpdateSynapses().

void TMVA::MethodMLP::CalculateNeuronDeltas (  )  [private]

Definition at line 1157 of file MethodMLP.cxx.

References TObjArray::At(), TMVA::TNeuron::CalculateDelta(), TMVA::MethodANNBase::fNetwork, TObjArray::GetEntriesFast(), i, and j.

Referenced by GetApproxInvHessian(), GetMvaValueAsymError(), SimulateEvent(), and UpdateNetwork().

void TMVA::MethodMLP::UpdateSynapses (  )  [private]

Definition at line 1240 of file MethodMLP.cxx.

References TObjArray::At(), fBPMode, TMVA::MethodANNBase::fNetwork, TObjArray::GetEntriesFast(), i, j, kBatch, TMVA::TNeuron::UpdateSynapsesBatch(), and TMVA::TNeuron::UpdateSynapsesSequential().

Referenced by UpdateNetwork().

void TMVA::MethodMLP::AdjustSynapseWeights (  )  [private]

Definition at line 1262 of file MethodMLP.cxx.

References TMVA::TNeuron::AdjustSynapseWeights(), TObjArray::At(), TMVA::MethodANNBase::fNetwork, TObjArray::GetEntriesFast(), i, and j.

Referenced by TrainOneEpoch().

void TMVA::MethodMLP::TrainOneEventFast ( Int_t  ievt,
Float_t *&  branchVar,
Int_t type 
) [private]

Definition at line 1064 of file MethodMLP.cxx.

References desired, TMVA::MethodANNBase::ForceNetworkCalculations(), TMVA::TNeuron::ForceValue(), TMVA::MethodANNBase::fOutput, TMVA::MethodBase::GetEvent(), TMVA::MethodANNBase::GetInputNeuron(), TMVA::TActivation::GetMax(), TMVA::TActivation::GetMin(), TMVA::MethodBase::GetNvar(), TMVA::MethodBase::GetXmax(), TMVA::MethodBase::GetXmin(), TMVA::gTools(), TMVA::MethodBase::IsNormalised(), j, TMVA::Tools::NormVariable(), UpdateNetwork(), and x.

void TMVA::MethodMLP::GeneticMinimize (  )  [private]

Definition at line 1180 of file MethodMLP.cxx.

References CalculateEstimator(), Endl, fGA_nsteps, fGA_preCalc, fGA_SC_factor, fGA_SC_rate, fGA_SC_steps, TMVA::MethodANNBase::fSynapses, TObjArray::GetEntriesFast(), TMVA::Configurable::GetOptions(), TMVA::MethodBase::GetXmax(), TMVA::MethodBase::GetXmin(), TMVA::kINFO, TMVA::Configurable::Log(), TMVA::MethodANNBase::PrintMessage(), and TMVA::FitterBase::Run().

Referenced by Train().

void TMVA::MethodMLP::GetApproxInvHessian ( TMatrixD InvHessian,
bool  regulate = true 
) [private]

Definition at line 1335 of file MethodMLP.cxx.

References TObjArray::At(), CalculateNeuronDeltas(), TMVA::TActivation::EvalDerivative(), TMVA::MethodANNBase::fEstimator, TMVA::MethodANNBase::fOutput, TMVA::MethodANNBase::fRegulatorIdx, TMVA::MethodANNBase::fRegulators, TMVA::MethodANNBase::fSynapses, TObjArray::GetEntriesFast(), TMVA::MethodBase::GetEvent(), TMVA::MethodANNBase::GetMvaValue(), TMVA::MethodBase::GetNEvents(), TMVA::MethodANNBase::GetOutputNeuron(), i, TMatrixT< Element >::Invert(), j, TMVA::MethodANNBase::kCE, TMVA::MethodANNBase::kMSE, nEvents, TMatrixT< Element >::ResizeTo(), and TMVA::TNeuron::SetError().

Referenced by Train(), and UpdateRegulators().

void TMVA::MethodMLP::UpdateRegulators (  )  [private]

Definition at line 1296 of file MethodMLP.cxx.

References TObjArray::At(), CalculateEstimator(), Endl, TMVA::MethodANNBase::fEstimator, TMVA::MethodANNBase::fRegulatorIdx, TMVA::MethodANNBase::fRegulators, TMVA::MethodANNBase::fSynapses, ROOT::Math::Cephes::gamma(), GetApproxInvHessian(), TObjArray::GetEntriesFast(), TMVA::MethodBase::GetNEvents(), i, TMVA::kDEBUG, TMVA::MethodANNBase::kMSE, TMVA::Types::kTesting, TMVA::Types::kTraining, and TMVA::Configurable::Log().

Referenced by BFGSMinimize(), and Train().

void TMVA::MethodMLP::UpdatePriors (  )  [private]

Definition at line 1283 of file MethodMLP.cxx.

References TObjArray::At(), fPrior, fPriorDev, TMVA::MethodANNBase::fRegulatorIdx, TMVA::MethodANNBase::fRegulators, TMVA::MethodANNBase::fSynapses, TObjArray::GetEntriesFast(), and i.

Referenced by BFGSMinimize(), ComputeEstimator(), and SetDirWeights().

virtual Bool_t TMVA::MethodMLP::HasAnalysisType ( Types::EAnalysisType  type,
UInt_t  numberClasses,
UInt_t  numberTargets 
) [virtual]

Implements TMVA::IMethod.

void TMVA::MethodMLP::Train ( void   )  [inline, virtual]

Implements TMVA::MethodANNBase.

Definition at line 105 of file MethodMLP.h.

References TMVA::MethodANNBase::NumCycles(), and Train().

Double_t TMVA::MethodMLP::ComputeEstimator ( std::vector< Double_t > &  parameters  ) 

Double_t TMVA::MethodMLP::EstimatorFunction ( std::vector< Double_t > &  parameters  )  [virtual]

Implements TMVA::IFitterTarget.

bool TMVA::MethodMLP::HasInverseHessian (  )  [inline]

Definition at line 114 of file MethodMLP.h.

References fCalculateErrors.

Double_t TMVA::MethodMLP::GetMvaValueAsymError ( Double_t errUpper,
Double_t errLower 
)

void TMVA::MethodMLP::MakeClassSpecific ( std::ostream &  ,
const TString  
) const [protected, virtual]

Reimplemented from TMVA::MethodANNBase.

void TMVA::MethodMLP::GetHelpMessage (  )  const [protected, virtual]

Implements TMVA::IMethod.

void TMVA::MethodMLP::DeclareOptions (  )  [private, virtual]

Reimplemented from TMVA::MethodANNBase.

void TMVA::MethodMLP::ProcessOptions (  )  [private, virtual]

Reimplemented from TMVA::MethodANNBase.

void TMVA::MethodMLP::Train ( Int_t  nEpochs  )  [private]

void TMVA::MethodMLP::Init (  )  [private, virtual]

Implements TMVA::MethodBase.

void TMVA::MethodMLP::InitializeLearningRates (  )  [private]

Double_t TMVA::MethodMLP::CalculateEstimator ( Types::ETreeType  treeType = Types::kTraining,
Int_t  iEpoch = -1 
) [private]

void TMVA::MethodMLP::BFGSMinimize ( Int_t  nEpochs  )  [private]

void TMVA::MethodMLP::SetGammaDelta ( TMatrixD Gamma,
TMatrixD Delta,
std::vector< Double_t > &  Buffer 
) [private]

void TMVA::MethodMLP::SteepestDir ( TMatrixD Dir  )  [private]

Bool_t TMVA::MethodMLP::GetHessian ( TMatrixD Hessian,
TMatrixD Gamma,
TMatrixD Delta 
) [private]

void TMVA::MethodMLP::SetDir ( TMatrixD Hessian,
TMatrixD Dir 
) [private]

Double_t TMVA::MethodMLP::DerivDir ( TMatrixD Dir  )  [private]

Bool_t TMVA::MethodMLP::LineSearch ( TMatrixD Dir,
std::vector< Double_t > &  Buffer,
Double_t dError = 0 
) [private]

void TMVA::MethodMLP::ComputeDEDw (  )  [private]

void TMVA::MethodMLP::SimulateEvent ( const Event ev  )  [private]

void TMVA::MethodMLP::SetDirWeights ( std::vector< Double_t > &  Origin,
TMatrixD Dir,
Double_t  alpha 
) [private]

Double_t TMVA::MethodMLP::GetError (  )  [private]

Double_t TMVA::MethodMLP::GetMSEErr ( const Event ev,
UInt_t  index = 0 
) [private]

Double_t TMVA::MethodMLP::GetCEErr ( const Event ev,
UInt_t  index = 0 
) [private]

void TMVA::MethodMLP::BackPropagationMinimize ( Int_t  nEpochs  )  [private]

void TMVA::MethodMLP::TrainOneEpoch (  )  [private]

void TMVA::MethodMLP::Shuffle ( Int_t index,
Int_t  n 
) [private]

void TMVA::MethodMLP::DecaySynapseWeights ( Bool_t  lateEpoch  )  [private]

void TMVA::MethodMLP::TrainOneEvent ( Int_t  ievt  )  [private]

Double_t TMVA::MethodMLP::GetDesiredOutput ( const Event ev  )  [private]

void TMVA::MethodMLP::UpdateNetwork ( Double_t  desired,
Double_t  eventWeight = 1.0 
) [private]

void TMVA::MethodMLP::UpdateNetwork ( std::vector< Float_t > &  desired,
Double_t  eventWeight = 1.0 
) [private]

void TMVA::MethodMLP::CalculateNeuronDeltas (  )  [private]

void TMVA::MethodMLP::UpdateSynapses (  )  [private]

void TMVA::MethodMLP::AdjustSynapseWeights (  )  [private]

void TMVA::MethodMLP::TrainOneEventFast ( Int_t  ievt,
Float_t *&  branchVar,
Int_t type 
) [private]

void TMVA::MethodMLP::GeneticMinimize (  )  [private]

void TMVA::MethodMLP::GetApproxInvHessian ( TMatrixD InvHessian,
bool  regulate = true 
) [private]

void TMVA::MethodMLP::UpdateRegulators (  )  [private]

void TMVA::MethodMLP::UpdatePriors (  )  [private]


Member Data Documentation

bool TMVA::MethodMLP::fUseRegulator [private]

Reimplemented from TMVA::MethodANNBase.

Definition at line 184 of file MethodMLP.h.

Referenced by BFGSMinimize(), ComputeDEDw(), ComputeEstimator(), DeclareOptions(), GetError(), SetDirWeights(), and Train().

bool TMVA::MethodMLP::fCalculateErrors [private]

Definition at line 185 of file MethodMLP.h.

Referenced by DeclareOptions(), HasInverseHessian(), and Train().

Double_t TMVA::MethodMLP::fPrior [private]

Definition at line 186 of file MethodMLP.h.

Referenced by GetError(), and UpdatePriors().

std::vector<Double_t> TMVA::MethodMLP::fPriorDev [private]

Definition at line 187 of file MethodMLP.h.

Referenced by ComputeDEDw(), and UpdatePriors().

Int_t TMVA::MethodMLP::fUpdateLimit [private]

Definition at line 191 of file MethodMLP.h.

Referenced by BFGSMinimize(), and DeclareOptions().

ETrainingMethod TMVA::MethodMLP::fTrainingMethod [private]

Definition at line 193 of file MethodMLP.h.

Referenced by ProcessOptions(), and Train().

TString TMVA::MethodMLP::fTrainMethodS [private]

Definition at line 194 of file MethodMLP.h.

Referenced by DeclareOptions(), and ProcessOptions().

Float_t TMVA::MethodMLP::fSamplingFraction [private]

Definition at line 196 of file MethodMLP.h.

Referenced by BackPropagationMinimize(), BFGSMinimize(), and DeclareOptions().

Float_t TMVA::MethodMLP::fSamplingEpoch [private]

Definition at line 197 of file MethodMLP.h.

Referenced by BackPropagationMinimize(), BFGSMinimize(), and DeclareOptions().

Float_t TMVA::MethodMLP::fSamplingWeight [private]

Definition at line 198 of file MethodMLP.h.

Referenced by BackPropagationMinimize(), BFGSMinimize(), and DeclareOptions().

Bool_t TMVA::MethodMLP::fSamplingTraining [private]

Definition at line 199 of file MethodMLP.h.

Referenced by BackPropagationMinimize(), BFGSMinimize(), and DeclareOptions().

Bool_t TMVA::MethodMLP::fSamplingTesting [private]

Definition at line 200 of file MethodMLP.h.

Referenced by BackPropagationMinimize(), BFGSMinimize(), and DeclareOptions().

Double_t TMVA::MethodMLP::fLastAlpha [private]

Definition at line 203 of file MethodMLP.h.

Referenced by BFGSMinimize(), and LineSearch().

Double_t TMVA::MethodMLP::fTau [private]

Definition at line 204 of file MethodMLP.h.

Referenced by DeclareOptions(), and LineSearch().

Int_t TMVA::MethodMLP::fResetStep [private]

Definition at line 205 of file MethodMLP.h.

Referenced by BFGSMinimize(), and DeclareOptions().

Double_t TMVA::MethodMLP::fLearnRate [private]

Definition at line 208 of file MethodMLP.h.

Referenced by DeclareOptions(), and InitializeLearningRates().

Double_t TMVA::MethodMLP::fDecayRate [private]

Definition at line 209 of file MethodMLP.h.

Referenced by DecaySynapseWeights(), and DeclareOptions().

EBPTrainingMode TMVA::MethodMLP::fBPMode [private]

Definition at line 210 of file MethodMLP.h.

Referenced by ProcessOptions(), TrainOneEpoch(), and UpdateSynapses().

TString TMVA::MethodMLP::fBpModeS [private]

Definition at line 211 of file MethodMLP.h.

Referenced by DeclareOptions(), and ProcessOptions().

Int_t TMVA::MethodMLP::fBatchSize [private]

Definition at line 212 of file MethodMLP.h.

Referenced by DeclareOptions(), ProcessOptions(), and TrainOneEpoch().

Int_t TMVA::MethodMLP::fTestRate [private]

Definition at line 213 of file MethodMLP.h.

Referenced by BackPropagationMinimize(), BFGSMinimize(), and DeclareOptions().

Bool_t TMVA::MethodMLP::fEpochMon [private]

Definition at line 214 of file MethodMLP.h.

Referenced by CalculateEstimator(), and DeclareOptions().

Int_t TMVA::MethodMLP::fGA_nsteps [private]

Definition at line 217 of file MethodMLP.h.

Referenced by GeneticMinimize().

Int_t TMVA::MethodMLP::fGA_preCalc [private]

Definition at line 218 of file MethodMLP.h.

Referenced by GeneticMinimize().

Int_t TMVA::MethodMLP::fGA_SC_steps [private]

Definition at line 219 of file MethodMLP.h.

Referenced by GeneticMinimize().

Int_t TMVA::MethodMLP::fGA_SC_rate [private]

Definition at line 220 of file MethodMLP.h.

Referenced by GeneticMinimize().

Double_t TMVA::MethodMLP::fGA_SC_factor [private]

Definition at line 221 of file MethodMLP.h.

Referenced by GeneticMinimize().

static const Int_t TMVA::MethodMLP::fgPRINT_ESTIMATOR_INC = 10 [static, private]

Definition at line 230 of file MethodMLP.h.

static const Bool_t TMVA::MethodMLP::fgPRINT_SEQ = kFALSE [static, private]

Definition at line 231 of file MethodMLP.h.

Referenced by BFGSMinimize(), and TrainOneEpoch().

static const Bool_t TMVA::MethodMLP::fgPRINT_BATCH = kFALSE [static, private]

Definition at line 232 of file MethodMLP.h.

Referenced by TrainOneEpoch().

std::vector<Double_t> TMVA::MethodMLP::fPriorDev [private]

Definition at line 187 of file MethodMLP.h.


The documentation for this class was generated from the following files:
Generated on Tue Jul 5 17:01:28 2011 for ROOT_528-00b_version by  doxygen 1.5.1