[Date Index]
[Thread Index]
[Author Index]
Re: Re: rather complicated NonlinearFit
*To*: mathgroup at smc.vnet.net
*Subject*: [mg73117] [mg73117] Re: [mg73063] Re: [mg73061] rather complicated NonlinearFit
*From*: Darren Glosemeyer <darreng at wolfram.com>
*Date*: Sat, 3 Feb 2007 05:16:26 -0500 (EST)
*References*: <200701310556.AAA18035@smc.vnet.net> <200702010742.CAA07488@smc.vnet.net>
Rather than manually constructing the optimization, I would suggest just
specifying starting values for the parameters in the NonlinearFit call.
This can be done as {{A1, A10},{A2,A20},...}, where A10 and A20 are
initial numeric starting values for A1 and A2.
If specific starting values are not given for parameters, an initial
value of 1 is taken for each parameter. Choice of starting value can be
very important. The model is fitted by minimizing the sum of squared
residuals. I suspect that in the example given starting values of 1 are
not particularly good, and this results in huge residuals which lead to
overflows either for the initial parameter values or for other parameter
values the method reaches as it searches for optimal values.
Darren Glosemeyer
Wolfram Research
Chris Chiasson wrote:
> You might be able to construct a better fit by manually setting up the
> optimization and then choosing initial values that are your guesses
> for the parameters of the model. Finally, *if* your model is correct,
> I think the residuals will be normally distributed about the
> prediction of the function.
>
> In other words:
> (correctFunction/@xdata)-functionData
>
> should give a list of normally distributed numbers
>
> On 1/30/07, fonfastik at interia.pl <fonfastik at interia.pl> wrote:
>
>> Hello,
>> I would like to model a chemical decomposition reaction with
>> adsorption of one of the reagents.
>> I determined an equation I would like to fit to my data (conversion of
>> the reagent vs temperature),
>>
>> here is the formula of the equation:
>> 1-Exp[-0.5 (A1 Exp[-E1/(8.31 x)] (1-(Sqrt[((A1 Exp[-E1/(8.31 x)])/(A2
>> Exp[-E2/(8.31 x)]+A3 Exp[-E3/(8.31 x)])) 0.05])/(1+Sqrt[((A1 Exp[-E1/
>> (8.31 x)])/(A2 Exp[-E2/(8.31 x)]+A3 Exp[-E3/(8.31 x)])) 0.05]))+A3
>> Exp[-E3/(8.31 x)] ((Sqrt[((A1 Exp[-E1/(8.31 x)])/(A2 Exp[-E2/(8.31 x)]
>> +A3 Exp[-E3/(8.31 x)])) 0.05])/(1+Sqrt[((A1 Exp[-E1/(8.31 x)])/(A2
>> Exp[-E2/(8.31 x)]+A3 Exp[-E3/(8.31 x)])) 0.05])))],
>> {x},{A1, A2, A3,E1, E2, E3}
>>
>> here it is shown more clearly:
>> http://www.chemia.uj.edu.pl/%7Estelmach/equationfull.GIF
>>
>> I am quite confident that the expression is OK, however Mathematica
>> returns errors about overflow
>>
>> may it be that the equation is too complicated? or rather it can't
>> return good results due to wrong construction?
>>
>> should anyone want to give it a try, here you can find a csv file with
>> data:
>> http://www.chemia.uj.edu.pl/~stelmach/fitfile.csv
>>
>> Regards to all
>>
>>
>>
>
>
>
Prev by Date:
**Re: How to use BlockMatrix**
Next by Date:
**Re: reverse polish notation**
Previous by thread:
**Re: rather complicated NonlinearFit**
Next by thread:
**Re: rather complicated NonlinearFit**
| |