# TMVA kCuts Genetic Algorithm

**URL:** <https://root-forum.cern.ch/t/tmva-kcuts-genetic-algorithm/45694>\
**Category:** TMVA\
**Created:** [July 6, 2021, 6:04am UTC](https://root-forum.cern.ch/t/tmva-kcuts-genetic-algorithm/45694 "2021-07-06T06:04:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chipper](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/c/cdc98d/32.png) [@Chipper](https://root-forum.cern.ch/u/Chipper)\
**Post date:** [July 6, 2021, 6:04am UTC](https://root-forum.cern.ch/t/tmva-kcuts-genetic-algorithm/45694/1 "2021-07-06T06:04:13Z")

</div>

Hello, experts,

I wanna have some helps: how to change the fitness function for the genetic algorithm inside MVA-kCuts?

Thanks a lot!

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [July 6, 2021, 6:09am UTC](https://root-forum.cern.ch/t/tmva-kcuts-genetic-algorithm/45694/2 "2021-07-06T06:09:22Z")

</div>

I guess @moneta may help you.

---

<div class="post-metadata">

**Author:** ![moneta](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/moneta/32/19423_2.png) [@moneta](https://root-forum.cern.ch/u/moneta)\
**Post date:** [July 8, 2021, 12:28pm UTC](https://root-forum.cern.ch/t/tmva-kcuts-genetic-algorithm/45694/3 "2021-07-08T12:28:29Z")

</div>

Hi,

There is no an easy way of doing it. You would need to modify the implementation of `MethodCuts::EstimatorFunction` , see  
[https://root.cern/doc/master/classTMVA\_1\_1MethodCuts.html](https://root.cern/doc/master/classTMVA_1_1MethodCuts.html)

Lorenzo

---

<div class="post-metadata">

**Author:** ![Chipper](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/c/cdc98d/32.png) [@Chipper](https://root-forum.cern.ch/u/Chipper)\
**Post date:** [July 9, 2021, 6:32am UTC](https://root-forum.cern.ch/t/tmva-kcuts-genetic-algorithm/45694/4 "2021-07-09T06:32:33Z")

</div>

Okay, thanks a lot.
