TMVA regression target limits

Hi,
I am new to TMVA and I am performing a multi-regression with DNN-GPU following the TMVARegression.C and the TMVARegressionApplication.C from the tutorial.

I have to constrain one of the targets to be greater than zero, in a way that the created model for this target is always positive for any values of the variables used later on the TMVARegressionApplication.C. So, I need to constrain the predicted value for the target obtained with TMVARegressionApplication.C, to be positive for any value of the input variables.

I have tried setting a minimum with:

void TMVA::DataLoader::AddTarget 	( 	const TString &  	expression,
		const TString &  	title = "",
		const TString &  	unit = "",
		Double_t  	min = 0,
		Double_t  	max = 0 
	) 	

But, I still get negative values of the target when getting a prediction after running the TMVARegresionApplication.C

Also when running the TMVARegression.C with more than one target, the canvas that shows the average deviation between the regression value and the true value on the launched TMVA GUI does not open.

Many thanks for your suggestions!

Hi @lilina; I am sure @moneta can help you with this.

Cheers,
J.

Hi,

There is no support for this natively in TMVA. One thing you could do is trying to regress on the log(Y) and then do an exponentiation afterwards to get the target values.
Or you can maybe use a modified loss function which penalises the negative values.
The min and max value above will refer to the input target values not the output ones.

Cheers

Lorenzo