GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Analysis » TMVA - weight(s)
TMVA - weight(s) [message #17976] Sat, 07 March 2015 12:09 Go to previous message
Elisabetta Prencipe (2) is currently offline  Elisabetta Prencipe (2)
Messages: 214
Registered: February 2013
first-grade participant
From: *hsi06.unitymediagroup.de
Dear multi-variate-analysis experts,

recently I did some studies to train a NN and Fischer discriminant, using a sample of signal and a sample of background, not properly normalized to the same equivalent luminosity.
Basically the standard standalone tool works fine. I downloaded it from here: http://tmva.sourceforge.net

In the test-macro they provide (here it is attached), there is the possibility to assign different weights to signal and background sample. I set up the signal weight to 1, and the bkg weight to 300 (in my particular case). However, it looks that the output plot never changes, depending on different weights applied to the background root-tree (I tried with w=50, 300, 300); this is not what I would expect. I attac here the KNN output plot.

The part of the code where one can set up the weights, for example, is here:


// --- Register the training and test trees

TTree *signal = (TTree*)input->Get("TreeS");
TTree *background = (TTree*)input->Get("TreeB");


// global event weights per tree (see below for setting event-wise weights)
Double_t signalWeight = 1.0;
Double_t backgroundWeight = 50.0;


// You can add an arbitrary number of signal or background trees
factory->AddSignalTree ( signal, signalWeight );
factory->AddBackgroundTree( background, backgroundWeight );

What am I doing wrong here, in your opinion?

Thank you in advance for any feedback,

Elisabetta
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: MVA in PandaRoot
Next Topic: Reconstructed photon energy for single photon event
Goto Forum:
  


Current Time: Tue Oct 15 21:07:50 CEST 2024

Total time taken to generate the page: 0.00871 seconds