# How gradient decent implemented in BDTG model?

**URL:** <https://root-forum.cern.ch/t/how-gradient-decent-implemented-in-bdtg-model/33374>\
**Category:** TMVA\
**Created:** [March 30, 2019, 3:37am UTC](https://root-forum.cern.ch/t/how-gradient-decent-implemented-in-bdtg-model/33374 "2019-03-30T03:37:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hai\_Jiang1](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/h/e99b99/32.png) [@Hai\_Jiang1](https://root-forum.cern.ch/u/Hai_Jiang1)\
**Post date:** [March 30, 2019, 3:37am UTC](https://root-forum.cern.ch/t/how-gradient-decent-implemented-in-bdtg-model/33374/1 "2019-03-30T03:37:11Z")

</div>

Dear all TMVA experts,

I am a little bit confused on how the gradient decent optimization implemented in the BDTG(Gradient Boosting Decision Tree), because cost function of the BDTG model is to minimize the mis-classification rate, in that case we can not do the derivative of this cost function(because mis-classification rate is discrete rather than differentiable) like in the gradient decent. Anyone know the implementation?

Many thanks!  
Hai

---

<div class="post-metadata">

**Author:** ![Axel](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/axel/32/11084_2.png) [@Axel](https://root-forum.cern.ch/u/Axel)\
**Post date:** [April 3, 2019, 9:47am UTC](https://root-forum.cern.ch/t/how-gradient-decent-implemented-in-bdtg-model/33374/2 "2019-04-03T09:47:45Z")

</div>

@moneta can you point Hai to e.g. doc or the sources?

---

<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 3, 2019, 11:03am UTC](https://root-forum.cern.ch/t/how-gradient-decent-implemented-in-bdtg-model/33374/3 "2019-04-03T11:03:56Z")

</div>

Hi,

The loss function used for classification (both binary and multi-class) for bdtg in tmva is [cross-entropy](https://en.wikipedia.org/wiki/Cross_entropy). The original description of the algorithm can be found [here](http://luthuli.cs.uiuc.edu/~daf/courses/optimization/papers/2699986.pdf), section 4.6.

This loss function is differentiable.

NOTE: The TMVA Users’ guide does not in detail describe the process and properties of GBDT, which is why these other sources are linked. The actual implementation follows the one in the linked paper closely.

Cheers,  
Kim
