Home | News | Documentation | Download

Disbale printing of covariance matrix in RooFit::fitTo


#1

Hi,

Is there a way to disable the printing of the covariance/correlation matrix in RooFi::fitTo, but keep all other print outs?

I am debugging a fit with 500 parameters and the 500x500 matrix printout make the logs unreadable - however I am having issues with status 4 popping up, so I am keen on keeping all other outputs to try and understand what is happening.

Cheers,
Mikkel


#2

@Hageboeck, perhaps you can help here please?

Thank you so much,
Oksana.


#3

Yes, there is. The fitTo() function has switches to control its output:
https://root.cern.ch/doc/master/classRooAbsPdf.html#a8f802a3a93467d5b7b089e3ccaec0fa8

What you are looking for is the PrintLevel(), which you can set to 0, to make Minuit less verbose. There is also -1 for complete silence.

If that is not enough, you can always save the fit result using the Save() switch (see above documentation), and retrieve it using:
https://root.cern.ch/doc/master/classRooFitResult.html#ade303d8549700880224906837fb1e2c5

You can also use RooFitResult->Print("v"), leading to output such as

  RooFitResult: minimized FCN value: 133.901, estimated distance to minimum: 8.13802e-06
                covariance matrix quality: Full, accurate covariance matrix
                Status : MINIMIZE=0 HESSE=0 

    Floating Parameter  InitialValue    FinalValue +/-  Error     GblCorr.
  --------------------  ------------  --------------------------  --------
                     f    5.0000e-01    7.3809e-01 +/-  7.53e-02  <none>
                     m    0.0000e+00    6.6328e-01 +/-  5.04e-01  <none>
                     s    2.0000e+00    2.3882e+00 +/-  4.94e-01  <none>

#4

Thanks! For reference: PrintLevel(0) is the one that gets rid of the matrices, while still printing some useful things. Are the contents of each of these print levels documented anywhere?


#5

These are the print levels:
https://root.cern.ch/doc/master/classTMinuit.html#ab8817ce7c6172369f849fa4c933125ee

The documentation will update next week to reference this automatically.


#6

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.