-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RuntimeError: probability vector not in [0, 1] #81
Comments
Try running it with the default time points instead of overriding them. |
The new error ("RuntimeError: erroneous average coalescence time 2300 smcpp.analysis.base INFO theta: 0.000100 -0.52 2.13 30.27 1.99 3.01 1.49 1.64 2.64 452380 smcpp.optimize.plugins.progress_printer INFO EM iteration 2 of 20... Debug file: |
The basic issue is that the model appears to diverge during fitting. I would try first estimating a simple piecewise model:
Then feed the results of that into a second estimation command where you use splines:
|
I will try it. Thank you for your reply @terhorst ! |
Hi, @terhorst stack trace: Here is the debug file: the input file: |
I run SMC++ with the default time points and piecewise mode, but the error "probability vector not in [0, 1]" was still reported in some samples. the command: |
It's again running off to some huge or small value of Ne. You can try decreasing the -rp option. Alternatively in v1.13.1 I added options to bound the effective population size. |
Thanks a lot for your kind help. I am running the model with v1.13.1. The running is ok so far, and I will post the results here when finished. |
Dear Terhorst,
While using SMC++ v1.13.0, I encountered the runtime errors:
1144 smcpp.analysis.base INFO theta: 0.000100
1145 smcpp.analysis.base INFO rho: 0.000100
1146 smcpp.data_filter INFO Loading data...
2194 smcpp.data_filter INFO 0.38 Gb of data
2203 smcpp.data_filter INFO 1 population
16977 smcpp.optimize.plugins.progress_printer INFO Starting EM algorithm...
16977 smcpp.optimize.plugins.progress_printer INFO EM iteration 1 of 20...
16977 smcpp.analysis.base INFO Running E-step
18590 smcpp.analysis.base INFO E-step completed
18605 smcpp.optimize.plugins.loglikelihood_monitor INFO Loglik: -678978.832221
21244 smcpp.optimize.plugins.parameter_optimizer INFO Updating rho, bounds (0.000001, 0.010000)
21784 smcpp.optimize.plugins.parameter_optimizer INFO New rho: 0.00208413
Traceback (most recent call last):
File "/build/Cellar/python/3.6.5/bin/smc++", line 11, in
load_entry_point('smcpp==1.13.0', 'console_scripts', 'smc++')()
File "/build/Cellar/python/3.6.5/lib/python3.6/site-packages/smcpp/frontend/console.py", line 26, in main
cmds[args.command].main(args)
File "/build/Cellar/python/3.6.5/lib/python3.6/site-packages/smcpp/commands/estimate.py", line 73, in main
analysis.run()
File "/build/Cellar/python/3.6.5/lib/python3.6/site-packages/smcpp/analysis/base.py", line 109, in run
self._optimizer.run(niter or self._niter)
File "/build/Cellar/python/3.6.5/lib/python3.6/site-packages/smcpp/optimize/optimizers.py", line 157, in run
res = self._minimize(x0, coords)
File "/build/Cellar/python/3.6.5/lib/python3.6/site-packages/smcpp/optimize/optimizers.py", line 113, in _minimize
method=alg)
File "/build/Cellar/python/3.6.5/lib/python3.6/site-packages/scipy/optimize/_minimize.py", line 477, in minimize
return _minimize_powell(fun, x0, args, callback, **options)
File "/build/Cellar/python/3.6.5/lib/python3.6/site-packages/scipy/optimize/optimize.py", line 2594, in _minimize_powell
fx2 = squeeze(func(x2))
File "/build/Cellar/python/3.6.5/lib/python3.6/site-packages/scipy/optimize/optimize.py", line 292, in function_wrapper
return function(*(wrapper_args + args))
File "/build/Cellar/python/3.6.5/lib/python3.6/site-packages/scipy/optimize/optimize.py", line 63, in call
fg = self.fun(x, *args)
File "/build/Cellar/python/3.6.5/lib/python3.6/site-packages/smcpp/optimize/optimizers.py", line 66, in _f
q = analysis.Q()
File "/build/Cellar/python/3.6.5/lib/python3.6/site-packages/smcpp/analysis/base.py", line 113, in Q
qq = [self._ims[pop].Q(separate=True) for pop in self._ims]
File "/build/Cellar/python/3.6.5/lib/python3.6/site-packages/smcpp/analysis/base.py", line 113, in
qq = [self._ims[pop].Q(separate=True) for pop in self._ims]
File "smcpp/_smcpp.pyx", line 296, in smcpp._smcpp._PyInferenceManager.Q
File "smcpp/_smcpp.pyx", line 291, in smcpp._smcpp._PyInferenceManager.Q
RuntimeError: probability vector not in [0, 1]
My command line was:
smc++ estimate --cores 8 --timepoints 10,300000 -o aro/ 6.5e-9 ../smcpp_02/input/aro.chr*.smc.gz
The debug file:
.debug.txt
My input:
aro.zip
Is there any problem with my command line? or my input?
Thank you!
The text was updated successfully, but these errors were encountered: