comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: maximum likelihood fitting with prior
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: maximum likelihood fitting with prior [message #83955] Tue, 16 April 2013 18:53
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Tuesday, April 16, 2013 10:22:08 AM UTC-4, rrya...@gmail.com wrote:
> On Monday, April 15, 2013 4:19:41 PM UTC-4, Craig Markwardt wrote:
>
>> What is the nature of the prior information? If it's simply that you have an a priori parameter value with a priori (gaussian) uncertainty, then that's easy. If you have a covariance matrix, or non-gaussian prior distribution, well then it gets harder.
>
> Grr... That's what I was afraid of. No, the prior not a simple multi-variate Gaussian --- nor can I even approximate it as such. In some cases it's an exponential distribution, and other complex things. I've done a few quick tests to see if using tnmin would work, and I'm going to go larger scale. Maybe you can correct me if I'm way off base.

To be honest, I'm not sure of the best approach. I really don't have experience in this domain. From the sound of it, you are expecting your likelihood function to have multiple minima, which sounds kind of ugly. But sure, give it a try!

Craig
Re: maximum likelihood fitting with prior [message #83967 is a reply to message #83955] Tue, 16 April 2013 07:22 Go to previous message
Russell[1] is currently offline  Russell[1]
Messages: 101
Registered: August 2011
Senior Member
On Monday, April 15, 2013 4:19:41 PM UTC-4, Craig Markwardt wrote:
> On Monday, April 15, 2013 9:48:10 AM UTC-4, rrya...@gmail.com wrote:
>
>> Err, I guess I want maximum posterior fitting. I have some data to which I want to fit a very complex and highly non-linear model, but I have some priors on the parameters of the model. I used to have no priors (err, I guess flat priors) and in which case the problem was a simple "chi-2", and I was successfully using C. Markwardt's mpfit. It worked mostly great, but I had to do some experimentation to ensure I was avoiding local extrema. However, with the prior I cannot write a function that returns an array of the form:
>
>
>
> What is the nature of the prior information? If it's simply that you have an a priori parameter value with a priori (gaussian) uncertainty, then that's easy. If you have a covariance matrix, or non-gaussian prior distribution, well then it gets harder.
>
>
>
> Craig



Grr... That's what I was afraid of. No, the prior not a simple multi-variate Gaussian --- nor can I even approximate it as such. In some cases it's an exponential distribution, and other complex things. I've done a few quick tests to see if using tnmin would work, and I'm going to go larger scale. Maybe you can correct me if I'm way off base.

(0) initialize with some random point
(1) pass the parameters of the prior into the function (that tnmin will call) via a common block.
(2) evaluate the likelihood. In this case that's a simple chi2. But, then I'll add the prior (again, I'm working with log-probabilities).
(3) return that as the cost function.
(4) let tnmin iterate.
(5) goto (0) with a different input.
(6) collate all the results from the (0)-(5) iterative process and keep the best fit (ie. best over the many iterations between 0-5).

Whaddya think?

-Russell
Re: maximum likelihood fitting with prior [message #83975 is a reply to message #83967] Mon, 15 April 2013 13:19 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Monday, April 15, 2013 9:48:10 AM UTC-4, rrya...@gmail.com wrote:
> Err, I guess I want maximum posterior fitting. I have some data to which I want to fit a very complex and highly non-linear model, but I have some priors on the parameters of the model. I used to have no priors (err, I guess flat priors) and in which case the problem was a simple "chi-2", and I was successfully using C. Markwardt's mpfit. It worked mostly great, but I had to do some experimentation to ensure I was avoiding local extrema. However, with the prior I cannot write a function that returns an array of the form:

What is the nature of the prior information? If it's simply that you have an a priori parameter value with a priori (gaussian) uncertainty, then that's easy. If you have a covariance matrix, or non-gaussian prior distribution, well then it gets harder.

Craig
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: All logical unit currently in use
Next Topic: how to initialize a projection from its specification?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:09:17 PDT 2025

Total time taken to generate the page: 0.00553 seconds