ROOT logo
ROOT » TMVA » TMVA::RuleFitAPI

class TMVA::RuleFitAPI


 J Friedman's RuleFit method

Function Members (Methods)

public:
virtual~RuleFitAPI()
voidCheckRFWorkDir()
static TClass*Class()
const TStringGetRFWorkDir() const
voidHowtoSetupRF()
virtual TClass*IsA() const
Bool_tReadModelSum()
TMVA::RuleFitAPIRuleFitAPI(const TMVA::MethodRuleFit* rfbase, TMVA::RuleFit* rulefit, TMVA::EMsgType minType)
voidSetRFWorkDir(const char* wdir)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
voidTestRuleFit()
voidTrainRuleFit()
voidVarImp()
voidWelcomeMessage()

Data Members

private:
enum ERFMode { kRfRegress
kRfClass
};
enum EModel { kRfLinear
kRfRules
kRfBoth
};
enum ERFProgram { kRfTrain
kRfPredict
kRfVarimp
};
private:
TMVA::MsgLoggerfLoggermessage logger
const TMVA::MethodRuleFit*fMethodRuleFitparent method - set in constructor
TStringfModelTypemodel type string
TMVA::RuleFitAPI::IntParmsfRFIntParmsinteger parameters
vector<int>fRFLxvariable selector
TMVA::RuleFitAPI::ERFProgramfRFProgramwhat to run
TMVA::RuleFitAPI::RealParmsfRFRealParmsreal parameters
vector<Float_t>fRFVarImpvariable importances
vector<Int_t>fRFVarImpIndvariable index
TStringfRFWorkDirworking directory
vector<Float_t>fRFYhatscore results from test sample
TMVA::RuleFit*fRuleFitnon const ptr to RuleFit class in MethodRuleFit

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

RuleFitAPI(const TMVA::MethodRuleFit* rfbase, TMVA::RuleFit* rulefit, TMVA::EMsgType minType)
 standard constructor
~RuleFitAPI()
 destructor
void WelcomeMessage()
 welcome message
void HowtoSetupRF()
 howto message
void InitRuleFit()
 default initialisation
   SetRFWorkDir("./rulefit");
void ImportSetup()
 import setup from MethodRuleFit
void SetRFWorkDir(const char* wdir)
 set the directory containing rf_go.exe.
void CheckRFWorkDir()
 check if the rulefit work dir is properly setup.
 it aborts (kFATAL) if not.

 Check existance of directory
void SetTrainParms()
 set the training parameters
void SetTestParms()
 set the test params
void FillRealParmsDef()
 set default real params
void FillIntParmsDef()
 set default int params
Bool_t WriteAll()
 write all files read by rf_go.exe
Bool_t WriteIntParms()
 write int params file
Bool_t WriteRealParms()
 write int params file
Bool_t WriteLx()
 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()) {
Bool_t WriteProgram()
 write command to rf_go.exe
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 WriteTrain()
 write training data, columnwise
Bool_t WriteTest()
 Write test data
Bool_t WriteVarNames()
 write variable names, ascii
Bool_t WriteVarImp()
 written by rf_go.exe
Bool_t WriteYhat()
 written by rf_go.exe
Bool_t ReadYhat()
 read the score
Bool_t ReadVarImp()
 read variable importance
Bool_t ReadModelSum()
 read model from rulefit.sum
Int_t RunRuleFit()
 execute rf_go.exe
void TrainRuleFit()
void TestRuleFit()
void VarImp()
TString GetRFName(TString name)
Bool_t OpenRFile(TString name, std::ofstream & f)
Bool_t OpenRFile(TString name, std::ifstream & f)
Bool_t WriteInt(ofstream& f, const Int_t* v, Int_t n = 1)
Bool_t WriteFloat(ofstream& f, const Float_t* v, Int_t n = 1)
Int_t ReadInt(ifstream& f, Int_t* v, Int_t n = 1) const
Int_t ReadFloat(ifstream& f, Float_t* v, Int_t n = 1) const
RuleFitAPI(const TMVA::MethodRuleFit* rfbase, TMVA::RuleFit* rulefit, TMVA::EMsgType minType)
const TString GetRFWorkDir() const
 Get working directory
{ return fRFWorkDir; }
void SetRFTrain()
 set rf_go.exe running mode
void SetRFPredict()
void SetRFVarimp()
Bool_t ReadIntParms()
Bool_t ReadRealParms()
Bool_t ReadLx()
Bool_t ReadProgram()
Bool_t ReadRealVarImp()
Bool_t ReadRfOut()
Bool_t ReadRfStatus()
Bool_t ReadRuleFitMod()
Bool_t ReadRuleFitSum()
Bool_t ReadTrainX()
Bool_t ReadTrainY()
Bool_t ReadTrainW()
Bool_t ReadVarNames()