// @(#)root/tmva $Id$ // Author: Omar Zapata, Thomas James Stevenson. #ifndef ROOT_TMVA_HyperParameterOptimisation #define ROOT_TMVA_HyperParameterOptimisation #include "TString.h" #include #include #include "TMultiGraph.h" #include "TMVA/IMethod.h" #include "TMVA/Configurable.h" #include "TMVA/Types.h" #include "TMVA/DataSet.h" #include "TMVA/Event.h" #include #include #include #include namespace TMVA { class HyperParameterOptimisationResult { friend class HyperParameterOptimisation; private: Float_t fROCAVG; std::vector fROCs; std::vector fSigs; std::vector fSeps; std::vector fEff01s; std::vector fEff10s; std::vector fEff30s; std::vector fEffAreas; std::vector fTrainEff01s; std::vector fTrainEff10s; std::vector fTrainEff30s; std::shared_ptr fROCCurves; TString fMethodName; public: HyperParameterOptimisationResult(); ~HyperParameterOptimisationResult(); std::vector > fFoldParameters; std::vector GetROCValues(){return fROCs;} Float_t GetROCAverage(){return fROCAVG;} TMultiGraph *GetROCCurves(Bool_t fLegend=kTRUE); void Print() const ; // TCanvas* Draw(const TString name="HyperParameterOptimisation") const; std::vector GetSigValues(){return fSigs;} std::vector GetSepValues(){return fSeps;} std::vector GetEff01Values(){return fEff01s;} std::vector GetEff10Values(){return fEff10s;} std::vector GetEff30Values(){return fEff30s;} std::vector GetEffAreaValues(){return fEffAreas;} std::vector GetTrainEff01Values(){return fTrainEff01s;} std::vector GetTrainEff10Values(){return fTrainEff10s;} std::vector GetTrainEff30Values(){return fTrainEff30s;} }; class HyperParameterOptimisation : public Envelope { public: HyperParameterOptimisation(DataLoader *dataloader); ~HyperParameterOptimisation(); void SetFitter(TString fitType){fFitType=fitType;} TString GetFiiter(){return fFitType;} //Figure of Merit (FOM) default Separation void SetFOMType(TString ftype){fFomType=ftype;} TString GetFOMType(){return fFitType;} void SetNumFolds(UInt_t folds); UInt_t GetNumFolds(){return fNumFolds;} virtual void Evaluate(); const HyperParameterOptimisationResult& GetResults() const {return fResults;} private: TString fFomType; /// fClassifier; ///