Skip to content
Closed
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
it is a homework
  • Loading branch information
pouryavakilipour committed Jun 28, 2016
commit e82d488885df1111ea9ceddbb92e60d5bd25469a
11 changes: 11 additions & 0 deletions tmva/tmva/src/Factory.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@

#include <TCanvas.h>

Double_t auc[NumFolds];
Int_t y[NumFolds];
for(Int_t i = 0; i < NumFolds; i++){
y[i] = i+1;
}

const Int_t MinNoTrainingEvents = 10;
//const Int_t MinNoTestEvents = 1;
TFile* TMVA::Factory::fgTargetFile = 0;
Expand Down Expand Up @@ -2111,10 +2117,15 @@ float TMVA::Factory::CrossValidate(DataLoader * loader, Types::EMVA theMethod, T
for(UInt_t l=0; l<ROCs.size(); ++l){
if (rocIntegrals) rocIntegrals[l] = ROCs.at(l);
std::cout << "Fold " << l+1 << " ROCIntegral: " << ROCs.at(l) << std::endl;
auc[l] = ROCs.at(l);
}
std::cout << "Average ROCIntegral: " << sumFOM/(double)NumFolds << std::endl;
}

TCanvas c1 = new TCanvas("c1","AUC Histo");
gr = new TGraph(NumFolds, auc, y);
gr->Draw("AC*");

return sumFOM/(double)NumFolds;

}