Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
12 changes: 6 additions & 6 deletions test/stressTMVA.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2097,7 +2097,7 @@ void MethodUnitTestWithROCLimits::run()

// setup test tree access
TFile* testFile = new TFile("weights/TMVA.root");
TTree* testTree = (TTree*)(testFile->Get("TestTree"));
TTree* testTree = (TTree*)(testFile->GetDirectory("dataset")->Get("TestTree"));
for (UInt_t i=0;i<_VariableNames->size();i++)
testTree->SetBranchAddress(_TreeVariableNames->at(i),&testvar[i]);
testTree->SetBranchAddress(_methodTitle.Data(),&testTreeVal);
Expand All @@ -2106,15 +2106,15 @@ void MethodUnitTestWithROCLimits::run()
variableNames2.push_back("var0");
variableNames2.push_back("var1");
TFile* testFile2 = new TFile("weights/ByHand.root");
TTree* testTree2 = (TTree*)(testFile2->Get("TestTree"));
TTree* testTree2 = (TTree*)(testFile2->GetDirectory("dataset")->Get("TestTree"));
testTree2->SetBranchAddress("var0",&dummy[0]);
testTree2->SetBranchAddress("var1",&dummy[1]);

TString readerName = _methodTitle + TString(" method");
TString readerOption="!Color:Silent";
TString dir = "weights/TMVAUnitTesting_";
TString dir = "dataset/weights/TMVAUnitTesting_";
TString weightfile=dir+_methodTitle+".weights.xml";
TString weightfile2="weights/ByHand_BDT.weights.xml"; //TMVATest3VarF2VarI_BDT.weights.xml
TString weightfile2="dataset/weights/ByHand_BDT.weights.xml"; //TMVATest3VarF2VarI_BDT.weights.xml
TString readerName2 = "BDT method";
double diff, maxdiff = 0., sumdiff=0., previousVal=0.;
int stuckCount=0, nevt= TMath::Min((int) testTree->GetEntries(),100);
Expand Down Expand Up @@ -2505,7 +2505,7 @@ void RegressionUnitTestWithDeviation::run()

// setup test tree access
TFile* testFile = new TFile("weights/TMVARegUT.root"); // fix me hardcoded file name
TTree* testTree = (TTree*)(testFile->Get("TestTree"));
TTree* testTree = (TTree*)(testFile->GetDirectory("dataset")->Get("TestTree"));
const int nTest=3; // 3 reader usages
float testTarget,readerVal=0.;

Expand All @@ -2523,7 +2523,7 @@ void RegressionUnitTestWithDeviation::run()
testTree->SetBranchAddress(_methodTitle.Data(),&testTarget);

TString readerName = _methodTitle + TString(" method");
TString dir = "weights/TMVARegressionUnitTesting_";
TString dir = "dataset/weights/TMVARegressionUnitTesting_";
TString weightfile=dir+_methodTitle+".weights.xml";
double diff, maxdiff = 0., sumdiff=0., previousVal=0.;
int stuckCount=0, nevt= TMath::Min((int) testTree->GetEntries(),50);
Expand Down
5 changes: 3 additions & 2 deletions tmva/tmva/inc/TMVA/MethodCFMlpANN.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ namespace TMVA {
Int_t GetClass( Int_t ivar ) const { return (*fClass)[ivar]; }

// static pointer to this object (required for external functions
static MethodCFMlpANN* This( void );
//NOTE: removed static value for new design
MethodCFMlpANN* This( void );

// ranking of input variables
const Ranking* CreateRanking() { return 0; }
Expand All @@ -161,7 +162,7 @@ namespace TMVA {
void DeclareOptions();
void ProcessOptions();

static MethodCFMlpANN* fgThis; // this carrier
MethodCFMlpANN* fgThis; // this carrier

// LUTs
TMatrixF *fData; // the (data,var) string
Expand Down
4 changes: 2 additions & 2 deletions tmva/tmva/src/MethodCFMlpANN.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ namespace TMVA {
Int_t MethodCFMlpANN_nsel = 0;
}

TMVA::MethodCFMlpANN* TMVA::MethodCFMlpANN::fgThis = 0;

////////////////////////////////////////////////////////////////////////////////
/// standard constructor
Expand Down Expand Up @@ -140,7 +139,7 @@ TMVA::MethodCFMlpANN::MethodCFMlpANN( const TString& jobName,
fYNN(0)
{
MethodCFMlpANN_Utils::SetLogger(&Log());

fgThis = 0;
}

////////////////////////////////////////////////////////////////////////////////
Expand All @@ -157,6 +156,7 @@ TMVA::MethodCFMlpANN::MethodCFMlpANN( DataSetInfo& theData,
fNodes(0),
fYNN(0)
{
fgThis = 0;
}

////////////////////////////////////////////////////////////////////////////////
Expand Down
5 changes: 4 additions & 1 deletion tmva/tmva/src/MethodPDEFoam.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1497,8 +1497,11 @@ void TMVA::MethodPDEFoam::FillVariableNamesToFoam() const
/// write PDEFoam-specific classifier response
/// NOT IMPLEMENTED YET!

void TMVA::MethodPDEFoam::MakeClassSpecific( std::ostream& /*fout*/, const TString& /*className*/ ) const
void TMVA::MethodPDEFoam::MakeClassSpecific( std::ostream& fout, const TString& className ) const
{
// write specific classifier response
fout << " // not implemented for class: \"" << className << "\"" << std::endl;
fout << "};" << std::endl;
}

////////////////////////////////////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion tmva/tmva/src/ROCCurve.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ TMVA::ROCCurve::~ROCCurve() {
Double_t TMVA::ROCCurve::GetROCIntegral(){

Float_t integral=0;
int ndivisions = 20;
int ndivisions = 40;
std::vector<Float_t> vec_epsilon_s(1);
vec_epsilon_s.push_back(0);

Expand Down
10 changes: 5 additions & 5 deletions tutorials/tmva/TMVAClassification.C
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
#include "TMVA/Tools.h"
#include "TMVA/TMVAGui.h"

int TMVAClassification( TString myMethodList = "" )
void TMVAClassification( TString myMethodList = "" )
{
// The explicit loading of the shared libTMVA is done in TMVAlogon.C, defined in .rootrc
// if you use your private .rootrc, or run from a different directory, please copy the
Expand Down Expand Up @@ -154,7 +154,7 @@ int TMVAClassification( TString myMethodList = "" )
std::cout << "Method \"" << regMethod << "\" not known in TMVA under this name. Choose among the following:" << std::endl;
for (std::map<std::string,int>::iterator it = Use.begin(); it != Use.end(); it++) std::cout << it->first << " ";
std::cout << std::endl;
return 1;
return;
}
Use[regMethod] = 1;
}
Expand Down Expand Up @@ -496,8 +496,6 @@ int TMVAClassification( TString myMethodList = "" )
delete dataloader;
// Launch the GUI for the root macros
if (!gROOT->IsBatch()) TMVA::TMVAGui( outfileName );

return 0;
}

int main( int argc, char** argv )
Expand All @@ -510,5 +508,7 @@ int main( int argc, char** argv )
if (!methodList.IsNull()) methodList += TString(",");
methodList += regMethod;
}
return TMVAClassification(methodList);

TMVAClassification(methodList);
return 0;
}