CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Attributes | Private Member Functions | Friends
GBRForest Class Reference

#include <GBRForest.h>

Public Member Functions

 GBRForest ()
 
double GetAdaBoostClassifier (const float *vector) const
 
double GetClassifier (const float *vector) const
 
double GetGradBoostClassifier (const float *vector) const
 
double GetResponse (const float *vector) const
 
void SetInitialResponse (double response)
 
std::vector< GBRTree > & Trees ()
 
const std::vector< GBRTree > & Trees () const
 

Protected Attributes

double fInitialResponse = 0.0
 
std::vector< GBRTreefTrees
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 

Detailed Description

Definition at line 24 of file GBRForest.h.

Constructor & Destructor Documentation

GBRForest::GBRForest ( )
inline

Definition at line 26 of file GBRForest.h.

26 {}

Member Function Documentation

double GBRForest::GetAdaBoostClassifier ( const float *  vector) const
inline

Definition at line 30 of file GBRForest.h.

References GetResponse().

30 { return GetResponse(vector); }
double GetResponse(const float *vector) const
Definition: GBRForest.h:48
double GBRForest::GetClassifier ( const float *  vector) const
inline

Definition at line 33 of file GBRForest.h.

References GetGradBoostClassifier().

Referenced by MultiTrackSelector::processMVA(), and HIMultiTrackSelector::processMVA().

33 { return GetGradBoostClassifier(vector); }
double GetGradBoostClassifier(const float *vector) const
Definition: GBRForest.h:57
double GBRForest::GetGradBoostClassifier ( const float *  vector) const
inline

Definition at line 57 of file GBRForest.h.

References funct::exp(), GetResponse(), and uploadConditions::response.

Referenced by GetClassifier().

57  {
58  double response = GetResponse(vector);
59  return 2.0 / (1.0 + std::exp(-2.0 * response)) - 1; //MVA output between -1 and 1
60 }
double GetResponse(const float *vector) const
Definition: GBRForest.h:48
Exp< T >::type exp(const T &t)
Definition: Exp.h:22
double GBRForest::GetResponse ( const float *  vector) const
inline

Definition at line 48 of file GBRForest.h.

References fInitialResponse, fTrees, uploadConditions::response, and MainPageGenerator::tree.

Referenced by RegressionHelper::applyCombinationRegression(), EGEnergyCorrector::CorrectedEnergyWithError(), EGEnergyCorrector::CorrectedEnergyWithErrorV3(), LowPtGsfElectronIDProducer::eval(), GetAdaBoostClassifier(), RegressionHelper::getEcalRegression(), GetGradBoostClassifier(), PFMETAlgorithmMVA::GetResponse(), EGRegressionModifierV1::modifyObject(), ElectronEnergyRegressionEvaluate::regressionUncertaintyNoTrkVar(), ElectronEnergyRegressionEvaluate::regressionUncertaintyNoTrkVarV1(), ElectronEnergyRegressionEvaluate::regressionUncertaintyWithSubClusters(), ElectronEnergyRegressionEvaluate::regressionUncertaintyWithTrkVar(), ElectronEnergyRegressionEvaluate::regressionUncertaintyWithTrkVarV1(), ElectronEnergyRegressionEvaluate::regressionUncertaintyWithTrkVarV2(), ElectronEnergyRegressionEvaluate::regressionValueNoTrkVar(), ElectronEnergyRegressionEvaluate::regressionValueNoTrkVarV1(), ElectronEnergyRegressionEvaluate::regressionValueWithSubClusters(), ElectronEnergyRegressionEvaluate::regressionValueWithTrkVar(), ElectronEnergyRegressionEvaluate::regressionValueWithTrkVarV1(), and ElectronEnergyRegressionEvaluate::regressionValueWithTrkVarV2().

48  {
49  double response = fInitialResponse;
50  for (auto const& tree : fTrees) {
51  response += tree.GetResponse(vector);
52  }
53  return response;
54 }
double fInitialResponse
Definition: GBRForest.h:41
std::vector< GBRTree > fTrees
Definition: GBRForest.h:42
template<class Archive >
void GBRForest::serialize ( Archive &  ar,
const unsigned int  version 
)
private
void GBRForest::SetInitialResponse ( double  response)
inline

Definition at line 35 of file GBRForest.h.

References fInitialResponse, and uploadConditions::response.

double fInitialResponse
Definition: GBRForest.h:41
std::vector<GBRTree>& GBRForest::Trees ( )
inline

Definition at line 37 of file GBRForest.h.

References fTrees.

37 { return fTrees; }
std::vector< GBRTree > fTrees
Definition: GBRForest.h:42
const std::vector<GBRTree>& GBRForest::Trees ( ) const
inline

Definition at line 38 of file GBRForest.h.

References fTrees.

38 { return fTrees; }
std::vector< GBRTree > fTrees
Definition: GBRForest.h:42

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 44 of file GBRForest.h.

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 44 of file GBRForest.h.

Member Data Documentation

double GBRForest::fInitialResponse = 0.0
protected

Definition at line 41 of file GBRForest.h.

Referenced by GetResponse(), and SetInitialResponse().

std::vector<GBRTree> GBRForest::fTrees
protected

Definition at line 42 of file GBRForest.h.

Referenced by GetResponse(), and Trees().