J Friedman's RuleFit method.
Definition at line 51 of file RuleFitAPI.h.
Classes | |
| struct | IntParms |
| struct | RealParms |
Public Member Functions | |
| RuleFitAPI (const TMVA::MethodRuleFit *rfbase, TMVA::RuleFit *rulefit, EMsgType minType) | |
| virtual | ~RuleFitAPI () |
| destructor | |
| void | CheckRFWorkDir () |
| check if the rulefit work dir is properly setup. | |
| const TString | GetRFWorkDir () const |
| void | HowtoSetupRF () |
| howto message | |
| virtual TClass * | IsA () const |
| Bool_t | ReadModelSum () |
| read model from rulefit.sum | |
| void | SetRFWorkDir (const char *wdir) |
| set the directory containing rf_go.exe. | |
| virtual void | Streamer (TBuffer &) |
| void | StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b) |
| void | TestRuleFit () |
| void | TrainRuleFit () |
| void | VarImp () |
| void | WelcomeMessage () |
| welcome message | |
Static Public Member Functions | |
| static TClass * | Class () |
| static const char * | Class_Name () |
| static constexpr Version_t | Class_Version () |
| static const char * | DeclFileName () |
Protected Types | |
| enum | EModel { kRfLinear =0 , kRfRules =1 , kRfBoth =2 } |
| enum | ERFMode { kRfRegress =1 , kRfClass =2 } |
| enum | ERFProgram { kRfTrain =0 , kRfPredict , kRfVarimp } |
Protected Member Functions | |
| void | FillIntParmsDef () |
| set default int params | |
| void | FillRealParmsDef () |
| set default real params | |
| TString | GetRFName (TString name) |
| void | ImportSetup () |
| import setup from MethodRuleFit | |
| void | InitRuleFit () |
| default initialisation SetRFWorkDir("./rulefit"); | |
| Bool_t | OpenRFile (TString name, std::ifstream &f) |
| Bool_t | OpenRFile (TString name, std::ofstream &f) |
| Int_t | ReadFloat (std::ifstream &f, Float_t *v, Int_t n=1) const |
| Int_t | ReadInt (std::ifstream &f, Int_t *v, Int_t n=1) const |
| Bool_t | ReadIntParms () |
| Bool_t | ReadLx () |
| Bool_t | ReadProgram () |
| Bool_t | ReadRealParms () |
| Bool_t | ReadRealVarImp () |
| Bool_t | ReadRfOut () |
| Bool_t | ReadRfStatus () |
| Bool_t | ReadRuleFitMod () |
| Bool_t | ReadRuleFitSum () |
| Bool_t | ReadTrainW () |
| Bool_t | ReadTrainX () |
| Bool_t | ReadTrainY () |
| Bool_t | ReadVarImp () |
| read variable importance | |
| Bool_t | ReadVarNames () |
| Bool_t | ReadYhat () |
| read the score | |
| Int_t | RunRuleFit () |
| execute rf_go.exe | |
| void | SetRFPredict () |
| void | SetRFTrain () |
| void | SetRFVarimp () |
| void | SetTestParms () |
| set the test params | |
| void | SetTrainParms () |
| set the training parameters | |
| Bool_t | WriteAll () |
| write all files read by rf_go.exe | |
| Bool_t | WriteFloat (std::ofstream &f, const Float_t *v, Int_t n=1) |
| Bool_t | WriteInt (std::ofstream &f, const Int_t *v, Int_t n=1) |
| Bool_t | WriteIntParms () |
| write int params file | |
| Bool_t | WriteLx () |
| Save input variable mask. | |
| Bool_t | WriteProgram () |
| write command to rf_go.exe | |
| Bool_t | WriteRealParms () |
| write int params file | |
| Bool_t | WriteRealVarImp () |
| write the minimum importance to be considered | |
| Bool_t | WriteRfOut () |
| written by rf_go.exe; write rulefit output (rfout) | |
| Bool_t | WriteRfStatus () |
| written by rf_go.exe; write rulefit status | |
| Bool_t | WriteRuleFitMod () |
| written by rf_go.exe (NOTE:Format unknown!) | |
| Bool_t | WriteRuleFitSum () |
| written by rf_go.exe (NOTE: format unknown!) | |
| Bool_t | WriteTest () |
| Write test data. | |
| Bool_t | WriteTrain () |
| write training data, column wise | |
| Bool_t | WriteVarImp () |
| Bool_t | WriteVarNames () |
| write variable names, ascii | |
| Bool_t | WriteYhat () |
| written by rf_go.exe | |
Private Member Functions | |
| RuleFitAPI () | |
Private Attributes | |
| MsgLogger | fLogger |
| ! message logger | |
| const MethodRuleFit * | fMethodRuleFit |
| parent method - set in constructor | |
| TString | fModelType |
| model type string | |
| IntParms | fRFIntParms |
| integer parameters | |
| std::vector< int > | fRFLx |
| variable selector | |
| ERFProgram | fRFProgram |
| what to run | |
| RealParms | fRFRealParms |
| real parameters | |
| std::vector< Float_t > | fRFVarImp |
| variable importances | |
| std::vector< Int_t > | fRFVarImpInd |
| variable index | |
| TString | fRFWorkDir |
| working directory | |
| std::vector< Float_t > | fRFYhat |
| score results from test sample | |
| RuleFit * | fRuleFit |
| non const ptr to RuleFit class in MethodRuleFit | |
|
protected |
| Enumerator | |
|---|---|
| kRfLinear | |
| kRfRules | |
| kRfBoth | |
Definition at line 85 of file RuleFitAPI.h.
|
protected |
| Enumerator | |
|---|---|
| kRfRegress | |
| kRfClass | |
Definition at line 84 of file RuleFitAPI.h.
|
protected |
| Enumerator | |
|---|---|
| kRfTrain | |
| kRfPredict | |
| kRfVarimp | |
Definition at line 86 of file RuleFitAPI.h.
| TMVA::RuleFitAPI::RuleFitAPI | ( | const TMVA::MethodRuleFit * | rfbase, |
| TMVA::RuleFit * | rulefit, | ||
| EMsgType | minType = kINFO ) |
Definition at line 47 of file RuleFitAPI.cxx.
|
virtual |
destructor
Definition at line 68 of file RuleFitAPI.cxx.
|
private |
| void TMVA::RuleFitAPI::CheckRFWorkDir | ( | ) |
check if the rulefit work dir is properly setup.
it aborts (kFATAL) if not.
Check existence of directory
Definition at line 165 of file RuleFitAPI.cxx.
|
static |
|
static |
|
inlinestaticconstexpr |
Definition at line 195 of file RuleFitAPI.h.
|
inlinestatic |
Definition at line 195 of file RuleFitAPI.h.
|
protected |
set default int params
Definition at line 227 of file RuleFitAPI.cxx.
|
protected |
set default real params
Definition at line 212 of file RuleFitAPI.cxx.
Definition at line 231 of file RuleFitAPI.h.
|
inline |
Definition at line 80 of file RuleFitAPI.h.
| void TMVA::RuleFitAPI::HowtoSetupRF | ( | ) |
howto message
Definition at line 91 of file RuleFitAPI.cxx.
|
protected |
import setup from MethodRuleFit
Definition at line 131 of file RuleFitAPI.cxx.
|
protected |
default initialisation SetRFWorkDir("./rulefit");
Definition at line 121 of file RuleFitAPI.cxx.
|
inlinevirtual |
Definition at line 195 of file RuleFitAPI.h.
Definition at line 252 of file RuleFitAPI.h.
Definition at line 238 of file RuleFitAPI.h.
|
inlineprotected |
Definition at line 291 of file RuleFitAPI.h.
Definition at line 282 of file RuleFitAPI.h.
|
protected |
|
protected |
| Bool_t TMVA::RuleFitAPI::ReadModelSum | ( | ) |
read model from rulefit.sum
Definition at line 543 of file RuleFitAPI.cxx.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
read variable importance
Definition at line 506 of file RuleFitAPI.cxx.
|
protected |
|
protected |
read the score
Definition at line 481 of file RuleFitAPI.cxx.
|
protected |
execute rf_go.exe
Definition at line 770 of file RuleFitAPI.cxx.
|
inlineprotected |
Definition at line 129 of file RuleFitAPI.h.
|
inlineprotected |
Definition at line 128 of file RuleFitAPI.h.
|
inlineprotected |
Definition at line 130 of file RuleFitAPI.h.
| void TMVA::RuleFitAPI::SetRFWorkDir | ( | const char * | wdir | ) |
set the directory containing rf_go.exe.
Definition at line 154 of file RuleFitAPI.cxx.
|
protected |
set the test params
Definition at line 200 of file RuleFitAPI.cxx.
|
protected |
set the training parameters
Definition at line 187 of file RuleFitAPI.cxx.
|
virtual |
|
inline |
Definition at line 195 of file RuleFitAPI.h.
|
inline |
Definition at line 211 of file RuleFitAPI.h.
|
inline |
Definition at line 202 of file RuleFitAPI.h.
|
inline |
Definition at line 221 of file RuleFitAPI.h.
| void TMVA::RuleFitAPI::WelcomeMessage | ( | ) |
welcome message
Definition at line 75 of file RuleFitAPI.cxx.
|
protected |
write all files read by rf_go.exe
Definition at line 247 of file RuleFitAPI.cxx.
|
inlineprotected |
Definition at line 274 of file RuleFitAPI.h.
|
inlineprotected |
Definition at line 266 of file RuleFitAPI.h.
|
protected |
write int params file
Definition at line 263 of file RuleFitAPI.cxx.
|
protected |
Save input variable mask.
If the lx vector size is not the same as inputVars, resize it and fill it with 1 NOTE: Always set all to 1 if (fRFLx.size() != m_inputVars->size()) {
Definition at line 290 of file RuleFitAPI.cxx.
|
protected |
write command to rf_go.exe
Definition at line 304 of file RuleFitAPI.cxx.
|
protected |
write int params file
Definition at line 274 of file RuleFitAPI.cxx.
|
protected |
write the minimum importance to be considered
Definition at line 332 of file RuleFitAPI.cxx.
|
protected |
written by rf_go.exe; write rulefit output (rfout)
Definition at line 346 of file RuleFitAPI.cxx.
|
protected |
written by rf_go.exe; write rulefit status
Definition at line 355 of file RuleFitAPI.cxx.
|
protected |
written by rf_go.exe (NOTE:Format unknown!)
Definition at line 364 of file RuleFitAPI.cxx.
|
protected |
written by rf_go.exe (NOTE: format unknown!)
Definition at line 373 of file RuleFitAPI.cxx.
|
protected |
Write test data.
Definition at line 417 of file RuleFitAPI.cxx.
|
protected |
write training data, column wise
Definition at line 382 of file RuleFitAPI.cxx.
|
protected |
Definition at line 461 of file RuleFitAPI.cxx.
|
protected |
write variable names, ascii
Definition at line 449 of file RuleFitAPI.cxx.
|
protected |
written by rf_go.exe
Definition at line 472 of file RuleFitAPI.cxx.
|
mutableprivate |
! message logger
Definition at line 193 of file RuleFitAPI.h.
|
private |
parent method - set in constructor
Definition at line 180 of file RuleFitAPI.h.
|
private |
model type string
Definition at line 191 of file RuleFitAPI.h.
|
private |
integer parameters
Definition at line 187 of file RuleFitAPI.h.
|
private |
variable selector
Definition at line 189 of file RuleFitAPI.h.
|
private |
what to run
Definition at line 190 of file RuleFitAPI.h.
|
private |
real parameters
Definition at line 188 of file RuleFitAPI.h.
|
private |
variable importances
Definition at line 184 of file RuleFitAPI.h.
|
private |
variable index
Definition at line 185 of file RuleFitAPI.h.
|
private |
working directory
Definition at line 186 of file RuleFitAPI.h.
|
private |
score results from test sample
Definition at line 183 of file RuleFitAPI.h.
|
private |
non const ptr to RuleFit class in MethodRuleFit
Definition at line 181 of file RuleFitAPI.h.