![]() |
Belle II Software development
|
FastBDT as RelationsObject to make it storable and accessible on/via the DataStore. More...
#include <FBDTClassifier.h>
Public Member Functions | |
| FBDTClassifier (const FBDTForest &forest, const std::vector< FastBDT::FeatureBinning< double > > &fB, const Belle2::DecorrelationMatrix< 9 > &dM) | |
| constructor from three main parts. | |
| ~FBDTClassifier () | |
| TODO destructor. | |
| double | analyze (const std::array< double, Ndims > &hits) const |
| calculate the output of the FastBDT. | |
| void | train (const std::vector< Belle2::FBDTTrainSample< Ndims > > &samples, int nTree, int depth, double shrinkage=0.15, double ratio=0.5) |
| train the BDT NOTE overwrites a currently existing classifier internally TODO does not work at the moment, look in FastBDT/src/main.cxx how to solve this in all generality | |
| void | readFromStream (std::istream &is) |
| read all the necessary data from stream and fill the Forest and the FeatureBinnings NOTE: uses FastBDTs IO stuff. | |
| void | writeToStream (std::ostream &os) const |
| write out the data from the Forest and the FeatureBinnings to a stream NOTE: uses FastBDTs IO stuff. | |
| FBDTForest | getForest () const |
| get the forest | |
| const std::vector< FastBDT::FeatureBinning< double > > & | getFeatureBinnings () const |
| get the feature binnings | |
| Belle2::DecorrelationMatrix< 9 > | getDecorrelationMatrix () const |
| get the decorrelation matrix | |
Private Attributes | |
| FBDTForest | m_forest {} |
| the forest used for classification | |
| std::vector< FastBDT::FeatureBinning< double > > | m_featBins {} |
| the feature binnings corresponding to the BDT | |
| Belle2::DecorrelationMatrix< Ndims > | m_decorrMat {} |
| the decorrelation matrix used in this classifier | |
FastBDT as RelationsObject to make it storable and accessible on/via the DataStore.
Ndims: number of inputs (dimension of input vector)
TODO-List:
Definition at line 37 of file FBDTClassifier.h.
|
inline |
Definition at line 41 of file FBDTClassifier.h.
|
inline |
constructor from three main parts.
(for testing purposes mainly)
Definition at line 44 of file FBDTClassifier.h.
|
inline |
TODO destructor.
Definition at line 47 of file FBDTClassifier.h.
|
inline |
get the decorrelation matrix
Definition at line 76 of file FBDTClassifier.h.
|
inline |
|
inline |
| void readFromStream | ( | std::istream & | is | ) |
read all the necessary data from stream and fill the Forest and the FeatureBinnings NOTE: uses FastBDTs IO stuff.
Not compatible with the .xml files that TMVA produces
Definition at line 17 of file FBDTClassifier.cc.
| void train | ( | const std::vector< Belle2::FBDTTrainSample< Ndims > > & | samples, |
| int | nTree, | ||
| int | depth, | ||
| double | shrinkage = 0.15, | ||
| double | ratio = 0.5 ) |
train the BDT NOTE overwrites a currently existing classifier internally TODO does not work at the moment, look in FastBDT/src/main.cxx how to solve this in all generality
Definition at line 43 of file FBDTClassifier.cc.
| void writeToStream | ( | std::ostream & | os | ) | const |
write out the data from the Forest and the FeatureBinnings to a stream NOTE: uses FastBDTs IO stuff.
Not compatible with the .xml files that TMVA produces
Definition at line 32 of file FBDTClassifier.cc.
|
private |
the decorrelation matrix used in this classifier
Definition at line 84 of file FBDTClassifier.h.
|
private |
|
private |