You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/stochss/stochss/handlers/util/scripts/start_job.py", line 120, in <module>
job.run(verbose=args.verbose)
File "/stochss/stochss/handlers/util/model_inference.py", line 958, in run
results = smc_abc_inference.infer(*infer_args, **infer_kwargs)
File "/opt/conda/lib/python3.8/site-packages/sciope/inference/smc_abc.py", line 220, in infer
kweights = self.perturbation_kernel.pdf(population, new_samples)
File "/opt/conda/lib/python3.8/site-packages/sciope/utilities/perturbationkernels/multivariate_normal.py", line 45, in pdf
pdfs.append(multivariate_normal.pdf(x, x0[i], self.cov))
File "/opt/conda/lib/python3.8/site-packages/scipy/stats/_multivariate.py", line 580, in pdf
params = self._process_parameters(mean, cov, allow_singular)
File "/opt/conda/lib/python3.8/site-packages/scipy/stats/_multivariate.py", line 417, in _process_parameters
psd = _PSD(cov, allow_singular=allow_singular)
File "/opt/conda/lib/python3.8/site-packages/scipy/stats/_multivariate.py", line 172, in __init__
raise np.linalg.LinAlgError(msg)
numpy.linalg.LinAlgError: When `allow_singular is False`, the input matrix must be symmetric positive definite.
Model
def create_genetic_toggle_switch(parameter_values=None):
model = gillespy2.Model(name='Genetic_Toggle_Switch')
model.volume = 1
# Variables
U = gillespy2.Species(name='U', initial_value=10, mode='discrete')
V = gillespy2.Species(name='V', initial_value=10, mode='discrete')
model.add_species([
U, V
])
# Parameters
alpha1 = gillespy2.Parameter(name='alpha1', expression='1')
alpha2 = gillespy2.Parameter(name='alpha2', expression='1')
beta = gillespy2.Parameter(name='beta', expression='2')
gamma = gillespy2.Parameter(name='gamma', expression='2')
mu = gillespy2.Parameter(name='mu', expression='1')
model.add_parameter([
alpha1, alpha2, beta, gamma, mu
])
# Reactions
cu = gillespy2.Reaction(
name='cu',
reactants={}, products={'U': 1},
propensity_function='alpha1/(1+pow(V,beta))',
ode_propensity_function='alpha1/(1+pow(V,beta))'
)
cv = gillespy2.Reaction(
name='cv',
reactants={}, products={'V': 1},
propensity_function='alpha2/(1+pow(U,gamma))',
ode_propensity_function='alpha2/(1+pow(U,gamma))'
)
du = gillespy2.Reaction(
name='du', rate='mu',
reactants={'U': 1}, products={}
)
dv = gillespy2.Reaction(
name='dv', rate='mu',
reactants={'V': 1}, products={}
)
model.add_reaction([
cu, cv, du, dv
])
# Timespan
tspan = gillespy2.TimeSpan.arange(1, t=100)
model.timespan(tspan)
return model
Error
Model
Inference
The text was updated successfully, but these errors were encountered: