Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Maximum likelihood parameter estimation of self-defined function

Subject: Maximum likelihood parameter estimation of self-defined function

From: Marian

Date: 16 Sep, 2011 11:19:10

Message: 1 of 3

Hey,

I am trying to find the parameters of a likelihood function I need for Bayesian Integration.

The function is defined by:

L(var_1, var_2, th_1, th_2)=prod(i= 1:n) fun(var_1, var_2, th_1, th_2), with
fun(var_1, var_2, th_1, th_2)=N(1,var_1)*(th_1*x(i)+th_2)+N(0_var_2) .

N(..) are normal distributions with given mean and unknown variance.

I vainly tried to solve the problem using fminsearch.

It would be great if anybody with experience in this field could give me a good advice how to approach the problem.

Thanks in advance..

M.





  

Subject: Maximum likelihood parameter estimation of self-defined function

From: Tom Lane

Date: 16 Sep, 2011 19:56:42

Message: 2 of 3

> L(var_1, var_2, th_1, th_2)=prod(i= 1:n) fun(var_1, var_2, th_1, th_2),
> with
> fun(var_1, var_2, th_1, th_2)=N(1,var_1)*(th_1*x(i)+th_2)+N(0_var_2) .
>
> N(..) are normal distributions with given mean and unknown variance.
> I vainly tried to solve the problem using fminsearch.

It's not clear to me what went wrong. Some ideas:

1. To avoid underflow you might consider sum(log()) instead of prod()

2. You probably know that fminsearch minimizes, so you'll want to compute
the negative likelihood or log likelihood.

3. I don't understand your notation. I would expect the normal pdf to be
involved, but I wouldn't expect that to be multiplied by x if x is a
predictor value. Conversely, if N() represents the value of a normal
variable, I wouldn't expect you to be minimizing a product like that.

-- Tom

Subject: Maximum likelihood parameter estimation of self-defined function

From: Matt J

Date: 16 Sep, 2011 20:59:14

Message: 3 of 3

"Marian" wrote in message <j4vbbe$a7f$1@newscl01ah.mathworks.com>...
>
> The function is defined by:
>
> L(var_1, var_2, th_1, th_2)=prod(i= 1:n) fun(var_1, var_2, th_1, th_2), with
> fun(var_1, var_2, th_1, th_2)=N(1,var_1)*(th_1*x(i)+th_2)+N(0_var_2) .
>
> N(..) are normal distributions with given mean and unknown variance.
>
> I vainly tried to solve the problem using fminsearch.
=================

FMINSEARCH isn't the best solver to use here. It would be better if you used one of the functions in the Optimization Toolbox, if you have it.

Regardless, your minimization problem looks rather non-convex, so it's important that you have a good initial guess. Don't know what method you're using to initialize

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us