ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
TMVA::Event Class Reference

Definition at line 57 of file Event.h.

Public Member Functions

 Event ()
 copy constructor More...
 
 Event (const Event &)
 copy constructor More...
 
 Event (const std::vector< Float_t > &values, const std::vector< Float_t > &targetValues, const std::vector< Float_t > &spectatorValues, UInt_t theClass=0, Double_t weight=1.0, Double_t boostweight=1.0)
 constructor More...
 
 Event (const std::vector< Float_t > &values, const std::vector< Float_t > &targetValues, UInt_t theClass=0, Double_t weight=1.0, Double_t boostweight=1.0)
 constructor More...
 
 Event (const std::vector< Float_t > &, UInt_t theClass, Double_t weight=1.0, Double_t boostweight=1.0)
 constructor More...
 
 Event (const std::vector< Float_t * > *&, UInt_t nvar)
 constructor for single events More...
 
 ~Event ()
 Event destructor. More...
 
Bool_t IsDynamic () const
 
Double_t GetWeight () const
 return the event weight - depending on whether the flag IgnoreNegWeightsInTraining is or not. More...
 
Double_t GetOriginalWeight () const
 
Double_t GetBoostWeight () const
 
UInt_t GetClass () const
 
UInt_t GetNVariables () const
 accessor to the number of variables More...
 
UInt_t GetNTargets () const
 accessor to the number of targets More...
 
UInt_t GetNSpectators () const
 accessor to the number of spectators More...
 
Float_t GetValue (UInt_t ivar) const
 return value of i'th variable More...
 
std::vector< Float_t > & GetValues ()
 
const std::vector< Float_t > & GetValues () const
 return value vector More...
 
Float_t GetTarget (UInt_t itgt) const
 
std::vector< Float_t > & GetTargets ()
 
const std::vector< Float_t > & GetTargets () const
 
Float_t GetSpectator (UInt_t ivar) const
 return spectator content More...
 
std::vector< Float_t > & GetSpectators ()
 
const std::vector< Float_t > & GetSpectators () const
 
void SetWeight (Double_t w)
 
void SetBoostWeight (Double_t w) const
 
void ScaleBoostWeight (Double_t s) const
 
void SetClass (UInt_t t)
 
void SetVal (UInt_t ivar, Float_t val)
 set variable ivar to val More...
 
void SetTarget (UInt_t itgt, Float_t value)
 set the target value (dimension itgt) to value More...
 
void SetSpectator (UInt_t ivar, Float_t value)
 set spectator value (dimension ivar) to value More...
 
void SetVariableArrangement (std::vector< UInt_t > *const m) const
 set the variable arrangement More...
 
void SetDoNotBoost () const
 
void CopyVarValues (const Event &other)
 copies only the variable values More...
 
void Print (std::ostream &o) const
 print method More...
 

Static Public Member Functions

static void ClearDynamicVariables ()
 
static void SetIsTraining (Bool_t)
 when this static function is called, it sets the flag whether events with negative event weight should be ignored in the training, or not. More...
 
static void SetIgnoreNegWeightsInTraining (Bool_t)
 when this static function is called, it sets the flag whether events with negative event weight should be ignored in the training, or not. More...
 

Private Attributes

std::vector< Float_tfValues
 
std::vector< Float_tfValuesRearranged
 
std::vector< Float_t * > * fValuesDynamic
 
std::vector< Float_tfTargets
 
std::vector< Float_tfSpectators
 
std::vector< UInt_t > * fVariableArrangement
 
UInt_t fClass
 
Double_t fWeight
 
Double_t fBoostWeight
 
Bool_t fDynamic
 
Bool_t fDoNotBoost
 

Static Private Attributes

static Bool_t fgIsTraining = kFALSE
 
static Bool_t fgIgnoreNegWeightsInTraining = kFALSE
 

Friends

std::ostream & operator<< (std::ostream &os, const Event &event)
 

#include <TMVA/Event.h>

Constructor & Destructor Documentation

Event::Event ( )

copy constructor

Definition at line 45 of file Event.cxx.

Event::Event ( const Event event)

copy constructor

Definition at line 143 of file Event.cxx.

Event::Event ( const std::vector< Float_t > &  values,
const std::vector< Float_t > &  targetValues,
const std::vector< Float_t > &  spectatorValues,
UInt_t  theClass = 0,
Double_t  weight = 1.0,
Double_t  boostweight = 1.0 
)
explicit

constructor

Definition at line 83 of file Event.cxx.

Event::Event ( const std::vector< Float_t > &  values,
const std::vector< Float_t > &  targetValues,
UInt_t  theClass = 0,
Double_t  weight = 1.0,
Double_t  boostweight = 1.0 
)
explicit

constructor

Definition at line 62 of file Event.cxx.

Event::Event ( const std::vector< Float_t > &  ev,
UInt_t  theClass,
Double_t  weight = 1.0,
Double_t  boostweight = 1.0 
)
explicit

constructor

Definition at line 105 of file Event.cxx.

Event::Event ( const std::vector< Float_t * > *&  evdyn,
UInt_t  nvar 
)
explicit

constructor for single events

Definition at line 125 of file Event.cxx.

Event::~Event ( )

Event destructor.

Definition at line 180 of file Event.cxx.

Member Function Documentation

static void TMVA::Event::ClearDynamicVariables ( )
inlinestatic

Definition at line 119 of file Event.h.

void Event::CopyVarValues ( const Event other)

copies only the variable values

Definition at line 198 of file Event.cxx.

Double_t TMVA::Event::GetBoostWeight ( ) const
inline

Definition at line 85 of file Event.h.

UInt_t TMVA::Event::GetClass ( ) const
inline
UInt_t Event::GetNSpectators ( ) const

accessor to the number of spectators

Definition at line 322 of file Event.cxx.

Referenced by TMVA::DataSet::GetTree().

UInt_t Event::GetNTargets ( ) const

accessor to the number of targets

Definition at line 314 of file Event.cxx.

Referenced by TMVA::DecisionTree::CheckEventWithPrunedTree(), TMVA::MethodPDERS::GetRegressionValues(), and TMVA::DataSet::GetTree().

UInt_t Event::GetNVariables ( ) const
Double_t TMVA::Event::GetOriginalWeight ( ) const
inline
Float_t Event::GetSpectator ( UInt_t  ivar) const
std::vector<Float_t>& TMVA::Event::GetSpectators ( )
inline

Definition at line 106 of file Event.h.

const std::vector<Float_t>& TMVA::Event::GetSpectators ( ) const
inline

Definition at line 107 of file Event.h.

Float_t TMVA::Event::GetTarget ( UInt_t  itgt) const
inline
std::vector<Float_t>& TMVA::Event::GetTargets ( )
inline
const std::vector<Float_t>& TMVA::Event::GetTargets ( ) const
inline

Definition at line 103 of file Event.h.

Float_t Event::GetValue ( UInt_t  ivar) const

return value of i'th variable

Definition at line 231 of file Event.cxx.

Referenced by TMVA::MethodBDT::ApplyPreselectionCuts(), TMVA::DecisionTree::BuildTree(), TMVA::Tools::CalcCovarianceMatrices(), TMVA::DataSetFactory::CalcCovarianceMatrix(), TMVA::DataSetFactory::CalcMinMax(), TMVA::VariableTransformBase::CalcNorm(), TMVA::TransformationHandler::CalcStats(), TMVA::MethodPDEFoam::CalcXminXmax(), TMVA::MethodHMatrix::ComputeCovariance(), TMVA::MethodCuts::CreateVariablePDFs(), TMVA::MethodPDERS::CRScalc(), TMVA::ResultsRegression::DeviationAsAFunctionOf(), TMVA::BinarySearchTreeNode::EqualsMe(), TMVA::MethodCuts::EstimatorFunction(), TMVA::RuleCut::EvalEvent(), TMVA::RuleEnsemble::EvalLinEventRaw(), TMVA::Factory::EvaluateAllMethods(), TMVA::Reader::EvaluateMulticlass(), TMVA::Reader::EvaluateMVA(), TMVA::Reader::EvaluateRegression(), TMVA::MethodANNBase::ForceNetworkInputs(), TMVA::MethodHMatrix::GetChi2(), TMVA::MethodFisher::GetCov_WithinClass(), TMVA::DecisionTree::GetFisherCoefficients(), TMVA::VariableTransformBase::GetInput(), TMVA::MethodFisher::GetMean(), TMVA::MethodANNBase::GetMulticlassValues(), TMVA::MethodPyGTB::GetMvaValue(), TMVA::MethodPyRandomForest::GetMvaValue(), TMVA::MethodPyAdaBoost::GetMvaValue(), TMVA::MethodKNN::GetMvaValue(), TMVA::MethodTMlpANN::GetMvaValue(), TMVA::MethodFisher::GetMvaValue(), TMVA::MethodLikelihood::GetMvaValue(), TMVA::MethodCuts::GetMvaValue(), TMVA::MethodCFMlpANN::GetMvaValue(), TMVA::MethodANNBase::GetMvaValue(), TMVA::MethodPDERS::GetNormalizedDistance(), TMVA::Reader::GetProba(), TMVA::Reader::GetRarity(), TMVA::MethodKNN::GetRegressionValues(), TMVA::MethodANNBase::GetRegressionValues(), TMVA::MethodPDERS::GetSample(), TMVA::MethodLD::GetSum(), TMVA::MethodLD::GetSumVal(), TMVA::DataSet::GetTree(), TMVA::BDTEventWrapper::GetVal(), TMVA::BinarySearchTreeNode::GoesLeft(), TMVA::BinarySearchTreeNode::GoesRight(), TMVA::DecisionTreeNode::GoesRight(), TMVA::MethodPyGTB::Init(), TMVA::MethodPyRandomForest::Init(), TMVA::MethodPyAdaBoost::Init(), TMVA::MethodFDA::InterpretFormula(), TMVA::RMethodBase::LoadData(), TMVA::MethodBoost::MonitorBoost(), TMVA::TransformationHandler::PlotVariables(), TMVA::MethodCFMlpANN::ProcessOptions(), TMVA::MethodPDERS::RRScalc(), TMVA::MethodBase::Statistics(), TMVA::MethodTMlpANN::Train(), TMVA::MethodKNN::Train(), TMVA::MethodLikelihood::Train(), TMVA::MethodCuts::Train(), and TMVA::RuleFitAPI::WriteTrain().

std::vector<Float_t>& TMVA::Event::GetValues ( )
inline
const std::vector< Float_t > & Event::GetValues ( ) const

return value vector

Definition at line 265 of file Event.cxx.

Double_t Event::GetWeight ( ) const

return the event weight - depending on whether the flag IgnoreNegWeightsInTraining is or not.

If it is set AND it is used for training, then negetive event weights are set to zero ! NOTE! For events used in Testing, the ORIGINAL possibly negative event weight is used no matter what

Definition at line 376 of file Event.cxx.

Referenced by TMVA::MethodBoost::AdaBoost(), TMVA::DataSet::AddEvent(), TMVA::DecisionTree::BuildTree(), TMVA::Tools::CalcCovarianceMatrices(), TMVA::DataSetFactory::CalcCovarianceMatrix(), TMVA::VariableTransformBase::CalcNorm(), TMVA::TransformationHandler::CalcStats(), TMVA::MethodMLP::CalculateEstimator(), TMVA::DecisionTree::CheckEventWithPrunedTree(), TMVA::MethodHMatrix::ComputeCovariance(), TMVA::MethodMLP::ComputeDEDw(), TMVA::ResultsMulticlass::CreateMulticlassHistos(), TMVA::MethodLikelihood::CreateRanking(), TMVA::ResultsMulticlass::EstimatorFunction(), TMVA::MethodFDA::EstimatorFunction(), TMVA::DecisionTree::FillEvent(), TMVA::MethodBoost::GetBoostROCIntegral(), TMVA::MethodFisher::GetCov_WithinClass(), TMVA::VariableGaussTransform::GetCumulativeDist(), TMVA::MethodMLP::GetError(), TMVA::DecisionTree::GetFisherCoefficients(), TMVA::MethodFisher::GetMean(), TMVA::MethodKNN::GetMvaValue(), TMVA::MethodKNN::GetRegressionValues(), TMVA::MethodLD::GetSum(), TMVA::MethodLD::GetSumVal(), TMVA::MethodBase::GetTrainingEfficiency(), TMVA::DataSet::GetTree(), TMVA::MethodPyGTB::Init(), TMVA::MethodPyRandomForest::Init(), TMVA::MethodPyAdaBoost::Init(), TMVA::RMethodBase::LoadData(), TMVA::RuleFitParams::LossFunction(), TMVA::MethodBoost::MonitorBoost(), TMVA::TransformationHandler::PlotVariables(), TMVA::ResultsRegression::QuadraticDeviation(), TMVA::MethodMLP::SimulateEvent(), TMVA::MethodBase::Statistics(), TMVA::MethodBoost::TestClassification(), TMVA::MethodBase::TestClassification(), TMVA::MethodBase::TestRegression(), TMVA::MethodDT::TestTreeQuality(), TMVA::CCTreeWrapper::TestTreeQuality(), TMVA::MethodTMlpANN::Train(), TMVA::MethodKNN::Train(), TMVA::MethodFDA::Train(), TMVA::MethodLikelihood::Train(), TMVA::MethodPDEFoam::TrainMonoTargetRegression(), TMVA::MethodPDEFoam::TrainMultiClassification(), TMVA::MethodPDEFoam::TrainMultiTargetRegression(), TMVA::MethodMLP::TrainOneEpoch(), TMVA::MethodMLP::TrainOneEvent(), TMVA::MethodPDEFoam::TrainSeparatedClassification(), TMVA::MethodPDEFoam::TrainUnifiedClassification(), and TMVA::RuleFitAPI::WriteTrain().

Bool_t TMVA::Event::IsDynamic ( ) const
inline

Definition at line 80 of file Event.h.

void Event::Print ( std::ostream &  o) const
void TMVA::Event::ScaleBoostWeight ( Double_t  s) const
inline

Definition at line 111 of file Event.h.

Referenced by TMVA::MethodBoost::AdaBoost().

void TMVA::Event::SetBoostWeight ( Double_t  w) const
inline

Definition at line 110 of file Event.h.

Referenced by TMVA::MethodBoost::Bagging(), and TMVA::MethodBoost::ResetBoostWeights().

void TMVA::Event::SetClass ( UInt_t  t)
inline

Definition at line 112 of file Event.h.

void TMVA::Event::SetDoNotBoost ( ) const
inline

Definition at line 118 of file Event.h.

void Event::SetIgnoreNegWeightsInTraining ( Bool_t  b)
static

when this static function is called, it sets the flag whether events with negative event weight should be ignored in the training, or not.

Definition at line 395 of file Event.cxx.

Referenced by TMVA::MethodBase::ProcessBaseOptions().

void Event::SetIsTraining ( Bool_t  b)
static
void Event::SetSpectator ( UInt_t  ivar,
Float_t  value 
)

set spectator value (dimension ivar) to value

Definition at line 363 of file Event.cxx.

void Event::SetTarget ( UInt_t  itgt,
Float_t  value 
)
void Event::SetVal ( UInt_t  ivar,
Float_t  val 
)

set variable ivar to val

Definition at line 335 of file Event.cxx.

Referenced by TMVA::MethodPDEFoam::TrainMultiTargetRegression().

void Event::SetVariableArrangement ( std::vector< UInt_t > *const  m) const

set the variable arrangement

Definition at line 187 of file Event.cxx.

Referenced by TMVA::MethodCategory::GetMvaValue().

void TMVA::Event::SetWeight ( Double_t  w)
inline

Definition at line 109 of file Event.h.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const Event event 
)
friend

Member Data Documentation

Double_t TMVA::Event::fBoostWeight
mutableprivate

Definition at line 142 of file Event.h.

Referenced by CopyVarValues(), GetBoostWeight(), ScaleBoostWeight(), and SetBoostWeight().

UInt_t TMVA::Event::fClass
private

Definition at line 140 of file Event.h.

Referenced by CopyVarValues(), GetClass(), and SetClass().

Bool_t TMVA::Event::fDoNotBoost
mutableprivate

Definition at line 144 of file Event.h.

Referenced by ScaleBoostWeight(), SetBoostWeight(), and SetDoNotBoost().

Bool_t TMVA::Event::fDynamic
private

Definition at line 143 of file Event.h.

Referenced by CopyVarValues(), Event(), and IsDynamic().

Bool_t Event::fgIgnoreNegWeightsInTraining = kFALSE
staticprivate

Definition at line 129 of file Event.h.

Bool_t Event::fgIsTraining = kFALSE
staticprivate

Definition at line 128 of file Event.h.

std::vector<Float_t> TMVA::Event::fSpectators
mutableprivate

Definition at line 137 of file Event.h.

Referenced by CopyVarValues(), Event(), and GetSpectators().

std::vector<Float_t> TMVA::Event::fTargets
private

Definition at line 136 of file Event.h.

Referenced by CopyVarValues(), GetTarget(), and GetTargets().

std::vector<Float_t> TMVA::Event::fValues
mutableprivate

Definition at line 132 of file Event.h.

Referenced by CopyVarValues(), and Event().

std::vector<Float_t*>* TMVA::Event::fValuesDynamic
mutableprivate

Definition at line 135 of file Event.h.

Referenced by CopyVarValues(), and Event().

std::vector<Float_t> TMVA::Event::fValuesRearranged
mutableprivate

Definition at line 134 of file Event.h.

std::vector<UInt_t>* TMVA::Event::fVariableArrangement
mutableprivate

Definition at line 138 of file Event.h.

Double_t TMVA::Event::fWeight
private

Definition at line 141 of file Event.h.

Referenced by CopyVarValues(), GetOriginalWeight(), and SetWeight().

Collaboration diagram for TMVA::Event:
[legend]

The documentation for this class was generated from the following files: