30#ifndef ROOT_TMVA_RuleFitAPI
31#define ROOT_TMVA_RuleFitAPI
234 return fRFWorkDir+
"/"+
name;
244 fLogger << kERROR <<
"Error opening RuleFit file for output: "
258 fLogger << kERROR <<
"Error opening RuleFit file for input: "
269 if (!
f.is_open())
return kFALSE;
270 return (
Bool_t)
f.write(
reinterpret_cast<char const *
>(
v),
n*
sizeof(
Int_t));
277 if (!
f.is_open())
return kFALSE;
278 return (
Bool_t)
f.write(
reinterpret_cast<char const *
>(
v),
n*
sizeof(
Float_t));
285 if (!
f.is_open())
return 0;
286 if (
f.read(
reinterpret_cast<char *
>(
v),
n*
sizeof(
Int_t)))
return 1;
294 if (!
f.is_open())
return 0;
295 if (
f.read(
reinterpret_cast<char *
>(
v),
n*
sizeof(
Float_t)))
return 1;
#define ClassDef(name, id)
J Friedman's RuleFit method.
ostringstream derivative to redirect and format output
J Friedman's RuleFit method.
void SetTestParms()
set the test params
Bool_t WriteRuleFitSum()
written by rf_go.exe (NOTE: format unknown!)
Bool_t WriteYhat()
written by rf_go.exe
Int_t ReadFloat(std::ifstream &f, Float_t *v, Int_t n=1) const
Bool_t WriteAll()
write all files read by rf_go.exe
void ImportSetup()
import setup from MethodRuleFit
Bool_t WriteRfStatus()
written by rf_go.exe; write rulefit status
Bool_t WriteIntParms()
write int params file
void CheckRFWorkDir()
check if the rulefit work dir is properly setup.
Bool_t WriteProgram()
write command to rf_go.exe
Bool_t ReadModelSum()
read model from rulefit.sum
void SetRFWorkDir(const char *wdir)
set the directory containing rf_go.exe.
Bool_t ReadVarImp()
read variable importance
Bool_t WriteRuleFitMod()
written by rf_go.exe (NOTE:Format unknown!)
Bool_t WriteRfOut()
written by rf_go.exe; write rulefit output (rfout)
TString GetRFName(TString name)
Bool_t OpenRFile(TString name, std::ofstream &f)
void InitRuleFit()
default initialisation SetRFWorkDir("./rulefit");
void FillRealParmsDef()
set default real params
std::vector< Float_t > fRFVarImp
Bool_t WriteVarNames()
write variable names, ascii
Bool_t WriteRealVarImp()
write the minimum importance to be considered
void FillIntParmsDef()
set default int params
void WelcomeMessage()
welcome message
Bool_t WriteTrain()
write training data, column wise
virtual ~RuleFitAPI()
destructor
Bool_t WriteRealParms()
write int params file
Bool_t WriteFloat(std::ofstream &f, const Float_t *v, Int_t n=1)
const MethodRuleFit * fMethodRuleFit
Int_t ReadInt(std::ifstream &f, Int_t *v, Int_t n=1) const
Bool_t WriteLx()
Save input variable mask.
Bool_t ReadYhat()
read the score
void HowtoSetupRF()
howto message
std::vector< Float_t > fRFYhat
std::vector< Int_t > fRFVarImpInd
Bool_t WriteTest()
Write test data.
void SetTrainParms()
set the training parameters
Bool_t WriteInt(std::ofstream &f, const Int_t *v, Int_t n=1)
const TString GetRFWorkDir() const
Int_t RunRuleFit()
execute rf_go.exe
A class implementing various fits of rule ensembles.
create variable transformations
MsgLogger & Endl(MsgLogger &ml)