#include <XGBooster.h>
Public Member Functions | |
void | addFeature (std::string name) |
float | predict (const int iterationEnd=0) |
float | predict (const std::vector< float > &features, const int iterationEnd=0) const |
void | reset () |
Reset feature values. More... | |
void | set (std::string name, float value) |
XGBooster (std::string model_file) | |
XGBooster (std::string model_file, std::string model_features) | |
Private Attributes | |
BoosterHandle | booster_ |
std::map< std::string, unsigned int > | feature_name_to_index_ |
std::vector< float > | features_ |
Definition at line 11 of file XGBooster.h.
XGBooster::XGBooster | ( | std::string | model_file | ) |
XGBooster::XGBooster | ( | std::string | model_file, |
std::string | model_features | ||
) |
Definition at line 57 of file XGBooster.cc.
References addFeature(), Skims_PA_cff::content, lowptgsfeleseed::features(), geometryDiff::file, read_features(), and AlCaHLTBitMon_QueryRunRegistry::string.
void XGBooster::addFeature | ( | std::string | name | ) |
Features need to be entered in the order they are used in the model
Definition at line 74 of file XGBooster.cc.
References feature_name_to_index_, features_, and Skims_PA_cff::name.
Referenced by XGBooster().
float XGBooster::predict | ( | const int | iterationEnd = 0 | ) |
Definition at line 81 of file XGBooster.cc.
References feature_name_to_index_, features_, mps_fire::i, CommonMethods::isnan(), reset(), runTheMatrix::ret, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by pat::computeSoftMvaRun3().
float XGBooster::predict | ( | const std::vector< float > & | features, |
const int | iterationEnd = 0 |
||
) | const |
Definition at line 102 of file XGBooster.cc.
References cms::cuda::assert(), booster_, feature_name_to_index_, lowptgsfeleseed::features(), mps_fire::result, runTheMatrix::ret, and offlineSlimmedPrimaryVertices_cfi::score.
void XGBooster::reset | ( | void | ) |
Reset feature values.
Definition at line 72 of file XGBooster.cc.
References features_, ntuplemaker::fill, and dqmiodatasetharvest::nan.
Referenced by predict().
void XGBooster::set | ( | std::string | name, |
float | value | ||
) |
Definition at line 79 of file XGBooster.cc.
References feature_name_to_index_, features_, Skims_PA_cff::name, and relativeConstraints::value.
Referenced by pat::computeSoftMvaRun3(), and fillMatchInfoForStation().
|
private |
Definition at line 31 of file XGBooster.h.
Referenced by predict(), and XGBooster().
|
private |
Definition at line 30 of file XGBooster.h.
Referenced by addFeature(), predict(), and set().
|
private |
Definition at line 29 of file XGBooster.h.
Referenced by addFeature(), predict(), reset(), and set().