## Tuesday, June 24, 2014

### Maximum Entropy PDF Reconstruction Code

Many of you have asked me to share my Maximum Entropy Method code for the reconstruction of density distributions. Unfortunately, I am unable to do that at the moment. In an effort to stop the email campaign that is asking me for the code, I decided to create a cgi interface for it and put it online. So here it goes...

Here is a summary of the maximum entropy method. You can access my code through the interface below. At the bottom of this page, you will find a example moments from known distributions. Use those to experiment with the code.
Usage:
• Known Moments: The set of all known moments for the unknown distribution. Enter one moment per line in the textarea below. Moments are assumed to be integer moments and are given as m0, m1, m2, etc...
• Number of Moments: Specify how many moments you wish to use (from the set of known moments) to reconstruct the distribution
• Lower Bound: Specify the lower bound on the reconstructed distribution
• Upper Bound: Specify the upper bound on the reconstructed distribution
• Number of Integration Points: Has to do with the numerical quadrature algorithm. Defaults to 80,000
• Maximum number of Iterations: specifies the number of internal iterations of the nonlinear solver
• Tolerance: Specifies the nonlinear solver tolerance
• Finite Difference Jacobian: Use finite difference to compute the Jacobian matrix
• Discrete Distribution: Use to reconstruct Discrete distribution. NOTE: Make sure you use a realistic number of integration points!
 Known Moments Number of Moments 0.9998836854604251 0.3750020886041817 0.160050949117657 0.07410076879576808 0.03608317866501874 0.01814662349371375 0.009328794519215932 0.004873918250461322 0.002579361412073578 0.001379983287926058 0.0007454798810168075 0.0004063088335238112 0.0002233058703649383 0.0001237078257975948 0.00006905842203738 0.00003883766693391672 0.00002199975642576323 0.0000125497061679911 7.208269696836164e-6 4.168186705863649e-6 2.42618273531166e-6 Lower Bound Upper Bound # of Integration Points Maximum # of Iterations Tolerance Finite Difference Jacobian Discrete Distribution

Cite as:
Saad, T. "Maximum Entropy PDF Reconstruction Code". Weblog entry from Please Make A Note. https://pleasemakeanote.blogspot.com/2014/06/maximum-entropy-pdf-reconstruction-code.html