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


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

constrained FindFit is extremely slow?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!news-out.readnews.com!transit3.readnews.com!nx02.iad01.newshosting.com!newshosting.com!newspump.sol.net!posts.news.twtelecom.net!nnrp3.twtelecom.net!not-for-mail
From dantimatter <google@dantimatter.com>
Newsgroups comp.soft-sys.math.mathematica
Subject constrained FindFit is extremely slow?
Date Sun, 15 Sep 2013 10:56:07 +0000 (UTC)
Sender steve@smc.vnet.net
Approved Steven M. Christensen <steve@smc.vnet.net>, Moderator
Message-ID <l143o7$pqn$1@smc.vnet.net> (permalink)
Lines 18
Organization Time-Warner Telecom
NNTP-Posting-Date 15 Sep 2013 10:59:46 GMT
NNTP-Posting-Host b726f7ab.news.twtelecom.net
X-Trace DXC=R?^Pg`MdM<]`NIIejLkL`^C_A=>8kQj6]MOj3YM9`=aXe590VJ3[d:REFiONJ7[GoVBPClB`oc:LY
X-Complaints-To abuse@twtelecom.net
Xref csiph.com comp.soft-sys.math.mathematica:15438

Show key headers only | 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