Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
added GetCorrelation matrix to TMVA::DataLoader
  • Loading branch information
qati committed Sep 19, 2016
commit 50159b3149c21a818e5b3e81962287de30af7d10
3 changes: 3 additions & 0 deletions tmva/tmva/inc/TMVA/DataLoader.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
class TFile;
class TTree;
class TDirectory;
class TH2;

namespace TMVA {

Expand Down Expand Up @@ -168,6 +169,8 @@ namespace TMVA {
std::vector<std::vector<TMVA::Event*>> SplitSets(std::vector<TMVA::Event*>& oldSet, int seedNum, int numFolds);

const DataSetInfo& GetDefaultDataSetInfo(){ return DefaultDataSetInfo(); }

TH2* GetCorrelationMatrix(const TString& className);

//Copy method use in VI and CV DEPRECATED: you can just call Clone DataLoader *dl2=(DataLoader *)dl1->Clone("dl2")
DataLoader* MakeCopy(TString name);
Expand Down
8 changes: 8 additions & 0 deletions tmva/tmva/src/DataLoader.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -749,5 +749,13 @@ void TMVA::DataLoaderCopy(TMVA::DataLoader* des, TMVA::DataLoader* src)
}
}

//_______________________________________________________________________
TH2* TMVA::DataLoader::GetCorrelationMatrix(const TString& className)
{
//returns the correlation matrix of datasets
const TMatrixD * m = DefaultDataSetInfo().CorrelationMatrix(className);
return DefaultDataSetInfo().CreateCorrelationMatrixHist(m,
"CorrelationMatrix"+className, "Correlation Matrix ("+className+")");
}