# TMVA Booking Error

**URL:** <https://root-forum.cern.ch/t/tmva-booking-error/24397>\
**Category:** TMVA\
**Created:** [April 11, 2017, 6:01pm UTC](https://root-forum.cern.ch/t/tmva-booking-error/24397 "2017-04-11T18:01:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![laramman2](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/laramman2/32/19487_2.png) [@laramman2](https://root-forum.cern.ch/u/laramman2)\
**Post date:** [April 11, 2017, 6:01pm UTC](https://root-forum.cern.ch/t/tmva-booking-error/24397/1 "2017-04-11T18:01:51Z")

</div>

Hi all,

When I try to run my code in TMVA, it says “— Factory : No analysis type for 1 classes and 0 regression targets.” I checked the Factory.cxx source code and the error points me to line 706~718. I’ve checked my code (factory.BookMethod(TMVA::Types::kBDT, “BDTG”, opts)😉 and I believe I did the required input. Please help. Thanks!

Chris

---

<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:** [April 24, 2017, 3:53pm UTC](https://root-forum.cern.ch/t/tmva-booking-error/24397/2 "2017-04-24T15:53:33Z")

</div>

Hi,

Could you append a runnable example?

It seems you have provided only a Signal class or a Background class, not both. Please check tutorials/tmva/TMVAClassification.C, lines 232 and 233 in particular.

```auto
dataloader->AddSignalTree ( signalTree, signalWeight );
dataloader->AddBackgroundTree( background, backgroundWeight );

```

You need to provide both to give the classifier something to train on. If this does not solve your problem, don’t hesitate to let me know.

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:** [May 8, 2017, 3:53pm UTC](https://root-forum.cern.ch/t/tmva-booking-error/24397/3 "2017-05-08T15:53:47Z")

</div>

Closed on May 8, 2017, 3:53pm UTC

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