Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/changes/353.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Bug fix: explicit NegWeightTreatment for TMVA Gradient BDT angular reconstruction

Added `NegWeightTreatment=Pray` to the default TMVA options in
`trainTMVAforAngularReconstruction` to match actual TMVA behaviour:
`BoostType=Grad` does not support `InverseBoostNegWeights` (TMVA's global
default) and silently replaces it with `Pray`; the options string now
declares this explicitly so the training configuration matches what is used.
4 changes: 3 additions & 1 deletion src/trainTMVAforAngularReconstruction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -878,8 +878,10 @@ int main( int argc, char* argv[] )
iQualityCut = argv[7];
}
// TMVA options (default options derived from hyperparameter optimisation on CTAO prod3 simulations)
// NegWeightTreatment=Pray is explicit here: BoostType=Grad does not support
// InverseBoostNegWeights (TMVA's global default) and silently replaces it with Pray.
string iTMVAOptions = "NTrees=100:BoostType=Grad:Shrinkage=0.1:UseBaggedBoost:GradBaggingFraction=0.5:nCuts=20:MaxDepth=10:";
iTMVAOptions += "PruneMethod=ExpectedError:RegressionLossFunctionBDTG=Huber:MinNodeSize=0.02:VarTransform=N";
iTMVAOptions += "PruneMethod=ExpectedError:RegressionLossFunctionBDTG=Huber:MinNodeSize=0.02:NegWeightTreatment=Pray:VarTransform=N";
if( argc >= 9 )
{
iTMVAOptions = argv[8];
Expand Down
Loading