12#ifndef ROOT_TMVA_CvSplit
13#define ROOT_TMVA_CvSplit
77 std::vector<std::pair<Int_t, Int_t>>
101 std::vector<std::vector<Event *>>
SplitSets(std::vector<TMVA::Event *> &oldSet,
UInt_t numFolds,
UInt_t numClasses);
#define ClassDef(name, id)
Int_t fIdxFormulaParNumFolds
Maps parameter indicies in splitExpr to their spectator index in the datasetinfo.
UInt_t Eval(UInt_t numFolds, const Event *ev)
std::vector< std::pair< Int_t, Int_t > > fFormulaParIdxToDsiSpecIdx
UInt_t GetSpectatorIndexForName(DataSetInfo &dsi, TString name)
static Bool_t Validate(TString expr)
std::vector< Double_t > fParValues
TFormula for splitExpr.
CvSplitKFoldsExpr(DataSetInfo &dsi, TString expr)
TFormula fSplitFormula
Expression used to split data into folds. Should output values between 0 and numFolds.
TString fSplitExpr
Keeps track of the index of reserved par "NumFolds" in splitExpr.
std::vector< UInt_t > GetEventIndexToFoldMapping(UInt_t nEntries, UInt_t numFolds, UInt_t seed=100)
Generates a vector of fold assignments.
std::unique_ptr< CvSplitKFoldsExpr > fSplitExpr
Expression used to split data into folds. Should output values between 0 and numFolds.
std::map< const TMVA::Event *, UInt_t > fEventToFoldMapping
void MakeKFoldDataSet(DataSetInfo &dsi) override
Prepares a DataSet for cross validation.
std::vector< std::vector< Event * > > SplitSets(std::vector< TMVA::Event * > &oldSet, UInt_t numFolds, UInt_t numClasses)
Split sets for into k-folds.
~CvSplitKFolds() override
ClassDefOverride(CvSplitKFolds, 0)
CvSplitKFolds(UInt_t numFolds, TString splitExpr="", Bool_t stratified=kTRUE, UInt_t seed=100)
Splits a dataset into k folds, ready for use in cross validation.
virtual void RecombineKFoldDataSet(DataSetInfo &dsi, Types::ETreeType tt=Types::kTraining)
std::vector< std::vector< TMVA::Event * > > fTestEvents
virtual void MakeKFoldDataSet(DataSetInfo &dsi)=0
std::vector< std::vector< TMVA::Event * > > fTrainEvents
virtual void PrepareFoldDataSet(DataSetInfo &dsi, UInt_t foldNumber, Types::ETreeType tt)
Set training and test set vectors of dataset described by dsi.
Class that contains all the data information.
Abstract ClassifierFactory template that handles arbitrary types.