def s3m(params, ns, pts):
nu1,nu2,nu3,T,m121,m131,m232= params
xx = Numerics.default_grid(pts)
phi = PhiManip.phi_1D(xx)
phi = PhiManip.phi_1D_to_2D(xx,phi)
phi = PhiManip.phi_2D_to_3D_split_1(xx,phi)
phi = Integration.three_pops(phi, xx, T, nu1,nu2, nu3, m12=m121, m21=m121, m13=131, m31=m131, m23=m232, m32=m232)
fs = Spectrum.from_phi(phi, ns, (xx,xx,xx))
return fs
# optimizer:
S3MM=Numerics.make_extrap_log_func(s3m)
pts=[40,50,60]
ns=[24,24,24] # =data.sample_sizes
params=array([ 1,1,1,1,20,20,20])
upper_bound = [5, 5, 5,5,100,100,100]
lower_bound = [0.1,0.1, 0.1, 0.1,1,1,1]
poptg = dadi.Inference.optimize_log(params, data, S3MM, pts,
lower_bound=lower_bound,
upper_bound=upper_bound,
verbose=len(params),
maxiter=3)
WARNING:Numerics:Extrapolation may have failed. Check resulting frequency spectrum for unexpected results.
--
You received this message because you are subscribed to the Google Groups "dadi-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dadi-user+...@googlegroups.com.
To post to this group, send email to dadi...@googlegroups.com.
Visit this group at https://groups.google.com/group/dadi-user.
For more options, visit https://groups.google.com/d/optout.
On Mar 30, 2017, at 6:38 PM, Mitra Menon <men...@mymail.vcu.edu> wrote:
Hi Ryan,
Thanks for the reply. So I tried a couple of things to get rid of this error based on your comment here and previous posts by others. My model is that of pure divergence so does not include a migration parameter. My sample size is [40, 78 ,14] and my grid size is [200,220,240]. With these setting I have tried using verbose=1 to print out which parameters might be out of bounds.
My parameter bounds are:upper_bound = [5, 5, 5, 5, 5, 1]lower_bound = [1e-2,1e-2,1e-2,1e-2,1e-4,1e-7]p0 = array([1,1,1,1,0.001,0.0001])
Using verbose=1 it seems like the warning is always generated. But from what I see the values don't seem to be touching any of the bounds. For instance this is the value for one instance of optimization:array([ 0.672875 , 0.670105 , 1.82947 , 1.33827 , 0.00201976 , 0.000104001]). It seems well within the limits so I am not sure what the warning msg is.
I anyways finished the run and looked at the estimate of theta using ::: dadi.Inference.optimal_sfs_scaling(model1, data). theta is 1923. This value is really unrealistic. I have attached the spectrum file at the end too. Core and periphery belong to the same species and LP should be more divergent from both of them, but probably slightly closer to periphery because they hybridize.
Here are my questions:Can you help me understand why i am still getting the warning msg and how I could fix it?
I am still not sure my parameter bounds and the initial guess is correct. Since we are exploring the parameter space through the optimization does input bounds really matter much. If it is really off then my estimate based on the model should be near the bounds. Could you give me some detail about how to decide on the parameter space to explore (how set population size and time)?
Finally is the value of theta is so off because my model is bad or the parameters were not good to begin with?
<split_only.png>
--
You received this message because you are subscribed to the Google Groups "dadi-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dadi-user+...@googlegroups.com.
To post to this group, send email to dadi...@googlegroups.com.
Visit this group at https://groups.google.com/group/dadi-user.
For more options, visit https://groups.google.com/d/optout.
On Apr 2, 2017, at 12:09 PM, Mitra Menon <men...@mymail.vcu.edu> wrote:
--
You received this message because you are subscribed to the Google Groups "dadi-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dadi-user+...@googlegroups.com.
To post to this group, send email to dadi...@googlegroups.com.
Visit this group at https://groups.google.com/group/dadi-user.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "dadi-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dadi-user+...@googlegroups.com.
To post to this group, send email to dadi...@googlegroups.com.
Visit this group at https://groups.google.com/group/dadi-user.
For more options, visit https://groups.google.com/d/optout.