I have tried with example dataset (YRI_CEU).
And Here is part of the result.
...
9492 , -1066.24 , array([ 1.87542 , 0.0711839 ,
1.78992 , 0.929397 , 0.359968 , 0.110574 ])
9498 , -1066.24 , array([ 1.87542 , 0.0712551 ,
1.78992 , 0.928468 , 0.359968 , 0.110574 ])
9504 , -1066.24 , array([ 1.87542 , 0.0711839 ,
1.78992 , 0.928468 , 0.359968 , 0.110574 ])
9510 , -1066.24 , array([ 1.87542 , 0.0711839 ,
1.78992 , 0.928468 , 0.359968 , 0.110685 ])
9516 , -1066.24 , array([ 1.87542 , 0.0711839 ,
1.78992 , 0.929397 , 0.359968 , 0.110574 ])
9522 , -1066.24 , array([ 1.87542 , 0.0712551 ,
1.78992 , 0.928468 , 0.359968 , 0.110574 ])
9528 , -1066.24 , array([ 1.87542 , 0.0711839 ,
1.78992 , 0.928468 , 0.359968 , 0.110574 ])
...
It seems like the parameters are convergent,
but it ceaselessly returns slightly different parameters..
and never ends...
Is there any way or option to stop optimization process more
shortly...
so that I can running the process several times with different
starting point..
This is critical because I'm planning to estimate parameters of each
gene throughout the genome..
Q2.
After long iterations (about 1 or 2 days) of the optimization
process,
it ends and sometimes some parameters have negative score...
But the parameter's score printed on the screen is positive score...
something like:
on the screen: array([ 0.0813915, ... ])
in the object popt: array([ -2.11.,.. ])
I think this could be a bug, so I'm taking the parameter in the last
one printed on the screen..
Is this a bug, or mistake in modeling demographic structure..?
The optimization routine was dadi.Inference.optimize() ..and setting
lower_bound to 1e-3...
and it is a simply bottleneck model with population size change
exponentially..
On Dec 13, 8:18 am, "Gutenkunst, Ryan N - (rgutenk)"
<rgut...@email.arizona.edu> wrote:
> Hello janthina,
>
> Thank you for your questions!
>
On 12월14일, 오전7시10분, "Gutenkunst, Ryan N - (rgutenk)"
<rgut...@email.arizona.edu> wrote:
> Thanks Janthina,
>
> We're hoping to replace the existing optimization routines with a more
> robust solution sometime, but that will take some time. In the meantime, I
> hope these issues aren't interfering with your work.
>
> Best,
> Ryan
>
I'm seeing the same thing (Q1) that Janthina reports when running the YRI_CEU.py example script with the optimization lines uncommented. The optimization never finishes. Any ideas what's going on?
Currently my optimization parameters are here (after ~ 1 hour):
8226 , -1066.27 , array([ 1.87892 , 0.0715303 , 1.79128 , 0.925717 , 0.3628 , 0.11107 ])8232 , -1066.27 , array([ 1.87892 , 0.0715303 , 1.79307 , 0.925717 , 0.362437 , 0.11107 ])8238 , -1066.27 , array([ 1.8808 , 0.0715303 , 1.79128 , 0.925717 , 0.362437 , 0.11107 ])
dadi 1.6.2numpy 1.6.1
- Nick
> >For more options, visit this group at
> >http://groups.google.com/group/dadi-user?hl=en.
>
> --
> Ryan Gutenkunst
> Assistant Professor
> Molecular and Cellular Biology
> University of Arizona
> phone:(520) 626-0569http://gutengroup.mcb.arizona.edu
--
You received this message because you are subscribed to the Google Groups "dadi-user" group.
To view this discussion on the web visit https://groups.google.com/d/msg/dadi-user/-/oDI77NV6QbwJ.
To post to this group, send email to dadi...@googlegroups.com.
To unsubscribe from this group, send email to dadi-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/dadi-user?hl=en.
Hi Ryan,
I am new to dadi and Python. I have also run into this problem of not reaching convergence and tried to add the maxiter argument, but it seems that it does not respond. If I do other changes such as verbose=1 instead of len(params) I do have the optimized parameters at each iteration and not every six, but the program does not seem to recognize changes in the maxiter argument. (I have tried to set maxiter to 5000, 5000.0, 20 and 1, without the expected results)
This is the command in the script YRI_CEU.py:
popt = dadi.Inference.optimize_log(p0, data, func_ex, pts_l,lower_bound=lower_bound,upper_bound=upper_bound,verbose=1, maxiter=1)
And this is the command in the ipython:In [89]: popt = dadi.Inference.optimize_log(p0, data, func_ex, pts_l,....: lower_bound=lower_bound,....: upper_bound=upper_bound,....: verbose=1, maxiter=1)27 , -1475.44 , array([ 1.2007 , 0.136576 , 1.70538 , 0.62976 , 0.639977 , 0.106308 ])28 , -1474.75 , array([ 1.2019 , 0.136576 , 1.70538 , 0.62976 , 0.639977 , 0.106308 ])29 , -1476.19 , array([ 1.2007 , 0.136713 , 1.70538 , 0.62976 , 0.639977 , 0.106308 ])30 , -1475.84 , array([ 1.2007 , 0.136576 , 1.70709 , 0.62976 , 0.639977 , 0.106308 ])31 , -1475.57 , array([ 1.2007 , 0.136576 , 1.70538 , 0.63039 , 0.639977 , 0.106308 ])
Asking around, we added the command "" print "xxx" maxiter "" (shown below) in Inference.py and saved it and import dadi again and rerun CEu_YRI.py, but the print never showed.
def optimize_log(p0, data, model_func, pts, lower_bound=None, upper_bound=None,verbose=0, flush_delay=0.5, epsilon=1e-3,gtol=1e-5, multinom=True, maxiter=None, full_output=False,func_args=[], func_kwargs={}, fixed_params=None, ll_scale=1):"""(...)"""args = (data, model_func, pts, lower_bound, upper_bound, verbose,multinom, flush_delay, func_args, func_kwargs, fixed_params,ll_scale)
p0 = _project_params_down(p0, fixed_params)print "xxx" maxiteroutputs = scipy.optimize.fmin_bfgs(_object_func_log,numpy.log(p0), epsilon=epsilon,args = args, gtol=gtol,full_output=True,disp=False,maxiter=maxiter)
Do you have any thoughts on that?
Thank you very much,
Laura
--
You received this message because you are subscribed to the Google Groups "dadi-user" group.
To view this discussion on the web visit https://groups.google.com/d/msg/dadi-user/-/l_t_OxKpYFoJ.
To post to this group, send email to dadi...@googlegroups.com.
To unsubscribe from this group, send email to dadi-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/dadi-user?hl=en.