4

Sorry for the dumb question but I am unable to find any way to disable messages for pymc3.find_MAP(). As someone new to PyMC3 I think I've just learned to use the syntax properly (shakily) to do a single MAP estimate, given prior and likelihood functions. I'm about to try and scale this up to process a large number of variables but to so I'd like to eliminate messages of the type that I'm getting, e.g.:

Optimization terminated successfully.

 Current function value: 1.889038

 Iterations:2

 Function evaluations: 4

 Gradient evaluations: 4

but can't find anything in the documentation indicating how to do so. I figure I can turn them back on when I need to debug. Any suggestions ? Thanks in advance.

Karl Young
  • 103
  • 5

1 Answers1

3

Extra arguments are passed into the optimization function, which by default is from scipy.optimize.*, so passing disp=False to pm.find_MAP will suppress messages.

As an aside, find_MAP is no longer recommended to initialize sampling.

colcarroll
  • 3,632
  • 17
  • 25
  • Thanks, I thought I tried that, but went back and tried as per your suggestion and it worked. Much appreciated. – Karl Young Aug 29 '17 at 21:13