Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #15438

constrained FindFit is extremely slow?

From dantimatter <google@dantimatter.com>
Newsgroups comp.soft-sys.math.mathematica
Subject constrained FindFit is extremely slow?
Date 2013-09-15 10:56 +0000
Message-ID <l143o7$pqn$1@smc.vnet.net> (permalink)
Organization Time-Warner Telecom

Show all headers | View raw


hi all
i'm trying to use FindFit to find parameters in a differential equation model, and give it a bit of help by adding constraints.  But i'm finding that as soon as i add a single constraint, Mathematica grinds to a halt.  is this something specifically to do with the differential equation model?

code is:

model[a_?NumberQ,b_?NumberQ,c_?NumberQ,d_?NumberQ,f_?NumberQ,Km1_?NumberQ,Km2_?NumberQ,Km3_?NumberQ,NTP0_?NumberQ]:=(model[a,b,c,d, f, Km1,Km2,Km3,NTP0]=First[MG/.NDSolve[{
MG'[t]==a*DNA*NTP[t]/(Sqrt[Km1^2]+NTP[t])-b MG[t],
NTP'[t]==-f*a*DNA*NTP[t]/(Sqrt[Km1^2]+NTP[t])-d MG[t] NTP[t]/(Sqrt[Km2^2]+NTP[t])-c NTP[t]/(Sqrt[Km3^2]+NTP[t]),
NTP[0]==NTP0,MG[0]==0},{MG,NTP},{t,0,800},Method->StiffnessSwitching]]);

fit = FindFit[data,
  model[a, b, c, d, f, Km1, Km2, Km3, NTP0][
   t], {{a, 10}, {b, 0.0737}, {c, 7}, {d, .99}, {f, 18}, {Km1,
    12893.842}, {Km2, 8663.477}, {Km3, 1946}, {NTP0, 1500000}}, t]

thanks!

Back to comp.soft-sys.math.mathematica | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

constrained FindFit is extremely slow? dantimatter <google@dantimatter.com> - 2013-09-15 10:56 +0000
  Re: constrained FindFit is extremely slow? Joe Gwinn <joegwinn@comcast.net> - 2013-09-29 01:27 +0000

csiph-web