RE: TMVA and efficiency scan with rectangular optimisation

From: Andrea Massironi <Andrea.Massironi_at_cern.ch>
Date: Fri, 26 Jun 2009 10:55:26 +0200


Hi Peter,
  thank you very much.
It worked.

Thanks, Andrea

-----Original Message-----
From: Peter Speckmayer
Sent: Fri 6/26/2009 10:40 AM
To: Andrea Massironi; roottalk (Mailing list discussing all aspects of the ROOT system.) Cc: Jan Therhaag; Joerg Stelzer; Helge Voss; Eckhard von Toerne Subject: Re: [ROOT] TMVA and efficiency scan with rectangular optimisation

Hi Andrea,

You can change the number of signal efficiency bins by changing the value of fNbinsXOfROCCurve in the file Config.cxx (don't forget to compile src/ afterwards)

   fVariablePlotting.fNbinsXOfROCCurve = 100;

--> change this value to 1000 for instance.

(Unfortunately you cannot change the binning in a certain region only.)

For getting the cuts printed out for the finer binning add the following lines after factory->EvaluateAllMethods() in TMVAClassification.cxx

   TMVA::MethodCuts* cuts = dynamic_cast<TMVA::MethodCuts*>(factory->GetMethod("Cuts"));    Double_t epsilon = 0.0001;
   for (Double_t eff=0.05; eff<0.95; eff += 0.005) {

      cuts->PrintCuts( eff+epsilon );
   }

Where you change the string "Cuts" in GetMethod for the name of the booked cut-method  (e.g. CutsGA). Unfortunately this does not work with the macro TMVAClassification.C but only with the compiled TMVAClassification.cxx.

let me know if this works for you,
Peter

> Betreff:
> [ROOT] TMVA and efficiency scan with rectangular optimisation
> Von:
> Andrea Massironi <andrea.massironi_at_cern.ch>
> Datum:
> Thu, 25 Jun 2009 21:41:05 +0200
> An:
> <roottalk_at_cern.ch>

>

> An:
> <roottalk_at_cern.ch>
>
>

> Dear Rooters,
> I'm using the TMVA package for a rectangular optimization.
> Following the example
>

> TMVAnalysis.C
>

> I create TMVA::Factory *factory
> and then I train it with
>

> factory->BookMethod( TMVA::Types::kCuts, "Cuts",
>

> "!H:!V:FitMethod=MC:EffSel:SampleSize=200000:VarProp=FSmart" );
>

> then
> factory->TrainAllMethods();
>

> In this way I get a file
> weights/TMVAnalysis_Cuts.weights.txt
> with the optimised selections.
>

> However the optimisation has been performed with steps in signal
> efficiency of 0.01.
> Is it possible to have an efficiency scan with a different step (i.e.
> 0.005) and in a fixed efficiency range (for example with signal
> efficiency between 0. and 0.1)?

>
> Thanks, Andrea
Received on Fri Jun 26 2009 - 10:55:47 CEST

This archive was generated by hypermail 2.2.0 : Fri Jun 26 2009 - 17:50:02 CEST