#ifndef ROOT_TMVA_RuleFit
#define ROOT_TMVA_RuleFit
#ifndef ROOT_TMVA_DecisionTree
#include "TMVA/DecisionTree.h"
#endif
#ifndef ROOT_TMVA_RuleEnsemble
#include "TMVA/RuleEnsemble.h"
#endif
#ifndef ROOT_TMVA_RuleFitParams
#include "TMVA/RuleFitParams.h"
#endif
#ifndef ROOT_TMVA_Event
#include "TMVA/Event.h"
#endif
#ifndef ROOT_TMVA_MsgLogger
#include "TMVA/MsgLogger.h"
#endif
namespace TMVA {
class MethodRuleFit;
class RuleFit {
public:
RuleFit( const TMVA::MethodRuleFit *rfbase,
const std::vector<TMVA::DecisionTree *> & forest,
const std::vector<Event *> & trainingEvents,
Double_t samplefrac );
RuleFit( void );
virtual ~RuleFit( void );
void Initialise( const TMVA::MethodRuleFit *rfbase,
const std::vector<TMVA::DecisionTree *> & forest,
const std::vector<Event *> & trainingEvents,
Double_t samplefrac );
void SetTrainingEvents( const std::vector<Event *> & el, Double_t sampfrac );
void ForestStatistics();
Double_t EvalEvent( const Event& e );
void FitCoefficients();
void CalcImportance();
void SetModelLinear() { fRuleEnsemble.SetModelLinear(); }
void SetModelRules() { fRuleEnsemble.SetModelRules(); }
void SetModelFull() { fRuleEnsemble.SetModelFull(); }
void SetImportanceCut( Double_t minimp=0 ) { fRuleEnsemble.SetImportanceCut(minimp); }
void SetMaxRuleDist( Double_t maxd ) { fRuleEnsemble.SetMaxRuleDist(maxd); }
void SetGDTau( Double_t t=0.0 ) { fRuleFitParams.SetGDTau(t); }
void SetGDPathStep( Double_t s=0.01 ) { fRuleFitParams.SetGDPathStep(s); }
void SetGDNPathSteps( Int_t n=100 ) { fRuleFitParams.SetGDNPathSteps(n); }
const UInt_t GetNSubsamples() const { return (fSubsampleEvents.size()>1 ? fSubsampleEvents.size()-1:0); }
const Event* GetTrainingEvent(UInt_t i) const { return fTrainingEvents[i]; }
const Event* GetTrainingEvent(UInt_t i, UInt_t isub) const { return &(fTrainingEvents[fSubsampleEvents[isub]])[i]; }
const std::vector< const TMVA::Event * > & GetTrainingEvents() const { return fTrainingEvents; }
const std::vector< Int_t > & GetSubsampleEvents() const { return fSubsampleEvents; }
void GetSubsampleEvents(Int_t sub, UInt_t & ibeg, UInt_t & iend) const;
const std::vector< const TMVA::DecisionTree *> & GetForest() const { return fForest; }
const RuleEnsemble & GetRuleEnsemble() const { return fRuleEnsemble; }
RuleEnsemble * GetRuleEnsemblePtr() { return &fRuleEnsemble; }
const RuleFitParams & GetRuleFitParams() const { return fRuleFitParams; }
RuleFitParams * GetRuleFitParamsPtr() { return &fRuleFitParams; }
const MethodRuleFit * GetMethodRuleFit() const { return fMethodRuleFit; }
private:
RuleFit( const RuleFit & other );
void Copy( const RuleFit & other );
std::vector<const TMVA::Event *> fTrainingEvents;
std::vector< Int_t > fSubsampleEvents;
std::vector< const TMVA::DecisionTree *> fForest;
RuleEnsemble fRuleEnsemble;
RuleFitParams fRuleFitParams;
const MethodRuleFit *fMethodRuleFit;
mutable MsgLogger fLogger;
ClassDef(RuleFit,0)
;
};
}
#endif
ROOT page - Class index - Class Hierarchy - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.