Hi all,
I used a simple model, but I get this error. I am not sure if this means I need to get more parameters or not. I tried but still failed.
Best,
Xia
ERROR log
Traceback (most recent call last): File "a.py", line 23, in <module> results.append(no_pulse_model_copy.optimize(method="L-BFGS-B",options={"maxiter":5000, "ftol":1e-8})) File "/ds3200_1/proc/anaconda3/lib/python3.8/site-packages/momi/demo_model.py", line 910, in optimize res = self._get_surface().find_mle( File "/ds3200_1/proc/anaconda3/lib/python3.8/site-packages/momi/likelihood.py", line 267, in find_mle return _find_minimum(fun, x0, scipy.optimize.minimize, File "/ds3200_1/proc/anaconda3/lib/python3.8/site-packages/momi/optimizers.py", line 88, in _find_minimum ret = _find_minimum_helper( File "/ds3200_1/proc/anaconda3/lib/python3.8/site-packages/momi/optimizers.py", line 103, in _find_minimum_helper return optimizer(f, start_params, **opt_kwargs) File "/ds3200_1/proc/anaconda3/lib/python3.8/site-packages/scipy/optimize/_minimize.py", line 619, in minimize return _minimize_lbfgsb(fun, x0, args, jac, bounds, File "/ds3200_1/proc/anaconda3/lib/python3.8/site-packages/scipy/optimize/lbfgsb.py", line 290, in _minimize_lbfgsb new_bounds = old_bound_to_new(bounds) File "/ds3200_1/proc/anaconda3/lib/python3.8/site-packages/scipy/optimize/_constraints.py", line 323, in old_bound_to_new lb, ub = zip(*bounds) ValueError: not enough values to unpack (expected 2, got 0)
Hi all, I used a simple model, but I get this error. I am not sure if this means I need to get more parameters or not. I tried but still failed. Best, Xia
MODEL set
no_pulse_model = momi.DemographicModel(N_e=200, gen_time=5, muts_per_gen=2.6e-7) no_pulse_model.set_data(sfs, length=70000000) no_pulse_model.add_leaf("B",N=2000) no_pulse_model.add_leaf("A",N=2000) no_pulse_model.add_leaf("C",N=2000) no_pulse_model.move_lineages("B", "A", t=1.6651e+6) no_pulse_model.move_lineages("A", "C", t=2.9761e+6) no_pulse_model.move_lineages("D", "C", t=1.9533e+6) no_pulse_model.set_size("B", N=200, t=1e4)
ERROR log
Traceback (most recent call last): File "a.py", line 23, in <module> results.append(no_pulse_model_copy.optimize(method="L-BFGS-B",options={"maxiter":5000, "ftol":1e-8})) File "/ds3200_1/proc/anaconda3/lib/python3.8/site-packages/momi/demo_model.py", line 910, in optimize res = self._get_surface().find_mle( File "/ds3200_1/proc/anaconda3/lib/python3.8/site-packages/momi/likelihood.py", line 267, in find_mle return _find_minimum(fun, x0, scipy.optimize.minimize, File "/ds3200_1/proc/anaconda3/lib/python3.8/site-packages/momi/optimizers.py", line 88, in _find_minimum ret = _find_minimum_helper( File "/ds3200_1/proc/anaconda3/lib/python3.8/site-packages/momi/optimizers.py", line 103, in _find_minimum_helper return optimizer(f, start_params, **opt_kwargs) File "/ds3200_1/proc/anaconda3/lib/python3.8/site-packages/scipy/optimize/_minimize.py", line 619, in minimize return _minimize_lbfgsb(fun, x0, args, jac, bounds, File "/ds3200_1/proc/anaconda3/lib/python3.8/site-packages/scipy/optimize/lbfgsb.py", line 290, in _minimize_lbfgsb new_bounds = old_bound_to_new(bounds) File "/ds3200_1/proc/anaconda3/lib/python3.8/site-packages/scipy/optimize/_constraints.py", line 323, in old_bound_to_new lb, ub = zip(*bounds) ValueError: not enough values to unpack (expected 2, got 0)