57 predict("predict", "xgboost"),
59 xgbdmatrix("xgb.DMatrix"),
62 asfactor("
as.factor"),
63 asmatrix("
as.matrix"),
69 SetWeightFileDir(
gConfig().GetIONames().fWeightFileDir);
78 predict(
"predict",
"xgboost"),
80 xgbdmatrix(
"xgb.DMatrix"),
83 asfactor(
"as.factor"),
84 asmatrix(
"as.matrix"),
112 Error(
"Init",
"R's package xgboost can not be loaded.");
113 Log() <<
kFATAL <<
" R's package xgboost can not be loaded." 122 for (
UInt_t i = 0; i < size; i++) {
133 if (
Data()->GetNTrainingEvents() == 0)
Log() <<
kFATAL <<
"<Train> Data() has zero events" <<
Endl;
136 params[
"eta"] =
fEta;
157 DeclareOptionRef(
fEta,
"Eta",
"Step size shrinkage used in update to prevents overfitting. After each boosting step, we can directly get the weights of new features. and eta actually shrinks the feature weights to make the boosting process more conservative.");
169 Log() <<
kINFO <<
"Testing Classification RXGB METHOD " <<
Endl;
182 for (
UInt_t i = 0; i < nvar; i++) {
203 Log() <<
"Decision Trees and Rule-Based Models " <<
Endl;
ROOT::R::TRFunctionImport xgbdmatrix
UInt_t GetNVariables() const
MsgLogger & Endl(MsgLogger &ml)
Namespace for new ROOT classes and functions.
Bool_t HasAnalysisType(Types::EAnalysisType type, UInt_t numberClasses, UInt_t numberTargets)
std::vector< TString > GetListOfVariables() const
returns list of variables
OptionBase * DeclareOptionRef(T &ref, const TString &name, const TString &desc="")
ROOT::R::TRObject * fModel
const TString & GetWeightFileDir() const
const Event * GetEvent() const
DataSetInfo & DataInfo() const
MethodRXGB(const TString &jobName, const TString &methodTitle, DataSetInfo &theData, const TString &theOption="", TDirectory *theTargetDir=NULL)
Bool_t Require(TString pkg)
Method to load an R's package.
This is a class to get ROOT's objects from R's objects
std::vector< std::string > fFactorTrain
ROOT::R::TRFunctionImport xgbsave
ROOT::R::TRFunctionImport xgbload
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
ROOT::R::TRFunctionImport asmatrix
Describe directory structure in memory.
virtual void TestClassification()
initialization
static TRInterface & Instance()
static method to get an TRInterface instance reference
#define REGISTER_METHOD(CLASS)
for example
Abstract ClassifierFactory template that handles arbitrary types.
std::vector< Float_t > & GetValues()
ROOT::R::TRDataFrame fDfTrain
void SetWeightFileDir(TString fileDir)
set directory of weight file
ROOT::R::TRFunctionImport predict
Rcpp::internal::NamedPlaceHolder Label
virtual void MakeClass(const TString &classFileName=TString("")) const
create reader class for method (classification only at present)
Double_t GetMvaValue(Double_t *errLower=0, Double_t *errUpper=0)
static Bool_t IsModuleLoaded
void GetHelpMessage() const
virtual void TestClassification()
initialization
ROOT::R::TRFunctionImport xgbtrain
void NoErrorCalc(Double_t *const err, Double_t *const errUpper)
This is a class to create DataFrames from ROOT to R
std::vector< UInt_t > fFactorNumeric