# Strange cut values from TMVA Rectangular Cuts classificator

**URL:** <https://root-forum.cern.ch/t/strange-cut-values-from-tmva-rectangular-cuts-classificator/26959>\
**Category:** TMVA\
**Created:** [November 20, 2017, 7:59am UTC](https://root-forum.cern.ch/t/strange-cut-values-from-tmva-rectangular-cuts-classificator/26959 "2017-11-20T07:59:36Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![p73](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/p73/32/14141_2.png) [@p73](https://root-forum.cern.ch/u/p73)\
**Post date:** [November 20, 2017, 7:59am UTC](https://root-forum.cern.ch/t/strange-cut-values-from-tmva-rectangular-cuts-classificator/26959/1 "2017-11-20T07:59:36Z")

</div>

I am using TMVA Rectangular Cuts classificator.  
After training I get this cut values:

```auto
Cuts : Cut values for requested signal efficiency: 0.9
                         : Corresponding background efficiency : 0.044991
                         : Transformation applied to input variables : None
                         : ------------------------------------------
                         : Cut[0]: 1281.78 < eTotal <= 3368.63
                         : Cut[1]: 4.28152 < pTotal <= 428.097
                         : ------------------------------------------

```

Look at my training trees (red “rectangle” illustrates cut values):  
 ![1](https://root-forum.cern.ch/uploads/default/original/2X/0/0652d54a4f666ed654ff9247429d8f094459ea9d.png) ![2](https://root-forum.cern.ch/uploads/default/original/2X/8/85a82ba0923d11b9dc839e93ae943cbf1fb340cf.png) ![3](https://root-forum.cern.ch/uploads/default/original/2X/8/83033e747d42f731344ff1f3654c1da2ac086156.png) ![4](https://root-forum.cern.ch/uploads/default/original/2X/2/280162afa14ea5ad8223b7053f905deba0f70027.png)  
The quesion is:

> Where so high (3368 MeV) upper limit on `eTotal` comes from taking into account there is no, even nearly, such values of `eTotal` in the training trees.

---

<div class="post-metadata">

**Author:** ![kialbert](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/kialbert/32/16537_2.png) [@kialbert](https://root-forum.cern.ch/u/kialbert)\
**Post date:** [November 22, 2017, 11:36am UTC](https://root-forum.cern.ch/t/strange-cut-values-from-tmva-rectangular-cuts-classificator/26959/2 "2017-11-22T11:36:18Z")

</div>

Hi,

Sorry for the late reply. I think I saw from a different question that you are using the genetic fitter. If that’s the case then basically any upper limit that is larger than your training data would be valid.

The genetic algorithm would just pick one value that is large enough and there would not be any incitement for improving it.

Cheers,  
Kim

---

<div class="post-metadata">

**Author:** ![p73](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/p73/32/14141_2.png) [@p73](https://root-forum.cern.ch/u/p73)\
**Post date:** [November 22, 2017, 11:41am UTC](https://root-forum.cern.ch/t/strange-cut-values-from-tmva-rectangular-cuts-classificator/26959/3 "2017-11-22T11:41:54Z")

</div>

See [this](https://root-forum.cern.ch/t/some-problems-arise-when-work-with-tmva-rectangular-cuts-method/26975) post, please. There I show that even if I use `CutRange` options the limits too high.

---

<div class="post-metadata">

**Author:** ![kialbert](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/kialbert/32/16537_2.png) [@kialbert](https://root-forum.cern.ch/u/kialbert)\
**Post date:** [November 22, 2017, 11:53am UTC](https://root-forum.cern.ch/t/strange-cut-values-from-tmva-rectangular-cuts-classificator/26959/4 "2017-11-22T11:53:48Z")

</div>

Could you provide a minimal example with some random input data that reproduce the problem? That would be very helpful.

This could be useful if you could:

```auto
TTree * createData(Double_t mu, Double_t sigma)
{
   Double_t x;
   Double_t y;

   Int_t N_POINTS = 1000;

   TRandom3 rng;

   static int i = 0;
   TTree * data = new TTree();
   data->Branch("x" , &x, "x/D");
   data->Branch("y" , &y, "x/D");

   for (Int_t n = 0; n < N_POINTS; ++n) {
      x = rng.Gaus(mu, sigma);
      y = rng.Gaus(mu, sigma)
      data->Fill();
   }
   
   return tree;
}

```

Cheers,  
Kim

---

<div class="post-metadata">

**Author:** ![p73](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/p73/32/14141_2.png) [@p73](https://root-forum.cern.ch/u/p73)\
**Post date:** [November 22, 2017, 1:47pm UTC](https://root-forum.cern.ch/t/strange-cut-values-from-tmva-rectangular-cuts-classificator/26959/5 "2017-11-22T13:47:45Z")

</div>

It might be I did not understand you. But here are all necessary files to produce errors. Program and Training trees. Just run it

```auto
root TMVAClassification.C

```

From [here](https://expirebox.com/download/dcf486c26f14b8ab956b0553c9efa305.html) you can download it (too big for this place)

---

<div class="post-metadata">

**Author:** ![kialbert](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/kialbert/32/16537_2.png) [@kialbert](https://root-forum.cern.ch/u/kialbert)\
**Post date:** [November 22, 2017, 1:55pm UTC](https://root-forum.cern.ch/t/strange-cut-values-from-tmva-rectangular-cuts-classificator/26959/6 "2017-11-22T13:55:14Z")

</div>

Thank you, this is what we need.

Cheers,  
Kim

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [December 6, 2017, 1:55pm UTC](https://root-forum.cern.ch/t/strange-cut-values-from-tmva-rectangular-cuts-classificator/26959/7 "2017-12-06T13:55:15Z")

</div>

Closed on December 6, 2017, 1:55pm UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
