Example #1
0
tspan = numpy.array([0., 150., 300., 450., 600., 900., 1800., 2700., 3600., 7200.]) #10 unevenly spaced time points

obs_names = ['obsAKTPP', 'obsErbB1_ErbB_P_CE', 'obsERKPP']

opts = bayessb.MCMCOpts()
opts.model = hem
opts.tspan = tspan
opts.integrator = 'vode'
opts.nsteps = 50000

scenario = 1

# A few estimation scenarios:
if scenario == 1:
    # estimate rates only (not initial conditions)
    opts.estimate_params = hem.parameters_rules()
elif scenario == 2:
    # use hessian
    opts.estimate_params = hem.parameters_rules()
    # Warning: hessian-guidance is expensive when fitting many parameters -- the
    # time to calculate the hessian increases with the square of the number of
    # parameters to fit!
    opts.use_hessian = True
    opts.hessian_period = opts.nsteps / 6
else:
    raise RuntimeError("unknown scenario number")

# values for prior calculation
prior_mean = [numpy.log10(p.value) for p in opts.estimate_params]
# prior_var is set to 6.0 so that (since calc is in log space) parameters can vary within 6 orders of magnitude and not be penalized.
prior_var =  6.0
Example #2
0
tspan = numpy.array([0., 150., 300., 450., 600., 900., 1800., 2700., 3600., 7200.]) #10 unevenly spaced time points

obs_names = ['obsAKTPP', 'obsErbB1_ErbB_P_CE', 'obsERKPP']

opts = bayessb.MCMCOpts()
opts.model = model
opts.tspan = tspan
opts.integrator = 'vode'
opts.nsteps = 50000

scenario = 1

# A few estimation scenarios:
if scenario == 1:
    # estimate rates only (not initial conditions)
    opts.estimate_params = model.parameters_rules()
elif scenario == 2:
    # use hessian
    opts.estimate_params = model.parameters_rules()
    # Warning: hessian-guidance is expensive when fitting many parameters -- the
    # time to calculate the hessian increases with the square of the number of
    # parameters to fit!
    opts.use_hessian = True
    opts.hessian_period = opts.nsteps / 6
else:
    raise RuntimeError("unknown scenario number")

# values for prior calculation
prior_mean = [numpy.log10(p.value) for p in opts.estimate_params]
# prior_var is set to 6.0 so that (since calc is in log space) parameters can vary within 6 orders of magnitude and not be penalized.
prior_var =  6.0
Example #3
0
     7200.])  #10 unevenly spaced time points

obs_names = ['obsAKTPP', 'obsErbB1_ErbB_P_CE', 'obsERKPP']

opts = bayessb.MCMCOpts()
opts.model = model
opts.tspan = tspan
opts.integrator = 'vode'
opts.nsteps = 50000

scenario = 1

# A few estimation scenarios:
if scenario == 1:
    # estimate rates only (not initial conditions)
    opts.estimate_params = model.parameters_rules()
elif scenario == 2:
    # use hessian
    opts.estimate_params = model.parameters_rules()
    # Warning: hessian-guidance is expensive when fitting many parameters -- the
    # time to calculate the hessian increases with the square of the number of
    # parameters to fit!
    opts.use_hessian = True
    opts.hessian_period = opts.nsteps / 6
else:
    raise RuntimeError("unknown scenario number")

# values for prior calculation
prior_mean = [numpy.log10(p.value) for p in opts.estimate_params]
# prior_var is set to 6.0 so that (since calc is in log space) parameters can vary within 6 orders of magnitude and not be penalized.
prior_var = 6.0
Example #4
0
)  # 10 unevenly spaced time points

obs_names = ["obsAKTPP", "obsErbB1_ErbB_P_CE", "obsERKPP"]

opts = bayessb.MCMCOpts()
opts.model = hem
opts.tspan = tspan
opts.integrator = "vode"
opts.nsteps = 50000

scenario = 1

# A few estimation scenarios:
if scenario == 1:
    # estimate rates only (not initial conditions)
    opts.estimate_params = hem.parameters_rules()
elif scenario == 2:
    # use hessian
    opts.estimate_params = hem.parameters_rules()
    # Warning: hessian-guidance is expensive when fitting many parameters -- the
    # time to calculate the hessian increases with the square of the number of
    # parameters to fit!
    opts.use_hessian = True
    opts.hessian_period = opts.nsteps / 6
else:
    raise RuntimeError("unknown scenario number")

# values for prior calculation
prior_mean = [numpy.log10(p.value) for p in opts.estimate_params]
# prior_var is set to 6.0 so that (since calc is in log space) parameters can vary within 6 orders of magnitude and not be penalized.
prior_var = 6.0