MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Minimisation Problem

  • To: mathgroup at smc.vnet.net
  • Subject: [mg40810] Re: Minimisation Problem
  • From: Raibatak Das <rd54 at cornell.edu>
  • Date: Sat, 19 Apr 2003 22:59:38 -0400 (EDT)
  • References: <b7nr2a$81s$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

mc -

you can define your alternate chi square function first as follows

f[x_, p_] := p*(0.4 + 3.8*Exp[-|Cos[x]|^0.75])

AltChiSq[x_, y_, p_] := Sum[2*(f[x[[i]], p] - y[[i]]) + (2*y[[i]] + 
1)*Log[(2*y[[i]] + 1)/(2*f[x[[i]], p] + 1), {i, Length[x]}]

and then use FindMinimum as before.

FindMiminum[AltChiSq[xdata, ydata, p], {p, p0, p1}]

where xdata and ydata are arrays of the same length containing the 
stimulated dataset and the observed values of the function for the 
stimulated dataset and p0 and p1 are the two starting values of the 
parameter.

hope this helps.
- rd.

Mike Costa wrote:

>Dear All,
>
>I have a little minimization problem. I'm essentially
>trying to fit data points to a curve, which, in
>particular, means minimising the chi-square function
>in order to obtain the desired parameters. However,
>the curve-fitting aspect is not important for now. The
>main problem boils down to this: given f(x, p), the
>theoretical function, with x being the simulated data
>points and p being the parameter(s) of interest, and 
>y(x) being the actual obtained function value given
>the simulated data set x, the usual chi-square method
>of determining p consists of minimising the chi-square
>function
>
>      ChiSq = Sigma[(f(x,p) - y(x))^2/y(x)]
>
>where Sigma represents the sum over all the data
>points(I realise that there are other definitions for
>chi-square, but let's use this for now). The little
>twist is this: I want instead to minimise the
>ALTERNATIVE CHI-SQUARE
>
> AltChiSq = Sigma[2(f-y)+(2y+1)Log[2y+1/2f+1]]
>
>where again Sigma represents the sum over all the data
>points. I want to minimise AltChiSq to get the
>parameter p. 
>
>In my situation, the theoretical function f only has
>one parameter that needs to be estimated
>
>     f(x,p) = p(0.4 + 3.8Exp[-|Cos[x]|^0.75]),
>
>p being a kind of normalising factor. I would like to
>know if there are any intrinsic functions in
>Mathematica that can directly minimise a function like
>AltChiSQ above. I recognise that the usual methods for
>minimising functions like FindMinimum and such will
>not work here due to the number of terms that Sigma
>sums over (among other reasons). Is there any other
>way to use FindMinimum in order to handle the function
>AltChiSq? Or maybe, is there some way to somehow
>change the default chi-square function that
>Linear/NonLinearFit uses in order to instead minimise
>AltChiSq? If these strategies lead to nowhere, can
>anyone give a general strategy of how to tackle this
>minimisation problem in Mathematica?
>
>Any suggestions would be greatly appreciated. Thanks.
>  
>
------------------------------------------------------------------------
* /Raibatak Das / *
Department of Chemistry and Chemical Biology, Cornell University.
Ithaca, NY 14853.
Ph : 1-607-255-6141
email : rd54 at cornell.edu <mailto:rd54 at cornell.edu>



  • Prev by Date: Re: Solving for a function in an Integral
  • Next by Date: Re: curve fitting
  • Previous by thread: Re: Minimisation Problem
  • Next by thread: Re: Re: Minimisation Problem