12#ifndef ROOT_TMVA_CvSplit
13#define ROOT_TMVA_CvSplit
79 std::vector<std::pair<Int_t, Int_t>>
103 std::vector<std::vector<Event *>>
SplitSets(std::vector<TMVA::Event *> &oldSet,
UInt_t numFolds,
UInt_t numClasses);
#define ClassDef(name, id)
#define ClassDefOverride(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.
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.
Bool_t fStratified
If true, use stratified split. (Balance class presence in each fold).
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
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
TString fSplitExprString
! Expression used to split data into folds. Should output values between 0 and numFolds.
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.
create variable transformations