Using TMVA to tune a model hyper parameters

I’m wondering if it’s possible to use TMVA to tune model hyper parameters. In another word, for any custom-made model (i.e. not those in TMVA package) with a list of hyper parameters, can TMVA run the model and automatically tune the parameters to find the sets with maximum efficiency?

For example, one primitive way is to manually run the model with many sets of the parameter values and record the parameter value and its corresponding efficiency, then save it into a ROOT tree, e.g.

        par1_1, par2_1, ....parN_1, efficiency_1
        par1_2, par2_2, ....parN_2, efficiency_2
        ....................................................
        ......................................................
        par1_1000, par2_1000, ....parN_1000, efficiency_1000
        ..............................................................

After that input this ROOT file into TMVA to predict the best parameter set. Is it possible to do it this way, or one can embed their own model in TMVA and tune the parameter

Thanks

Hi @wx2017 ,
sorry for the high latency, we need @moneta 's help, let’s ping him.

Cheers,
Enrico

Hi,

I am not sure what you mean exactly with custom-made model. It is possible in TMVA to do some hyper parameter optimisation scanning parameter values. This optimisation works only for BDT with some pre-defined variations of the parameters.
An example is this attached code macro.
TMVA_HyperparameterOptim.C (1.5 KB)

Cheers

Lorenzo