コード例 #1
0
print("\n\n\n Base\n Median eps, 2000 particles, 20 generations\n\n\n")

# %% Set path

db_path = "sqlite:///dbfiles/ib_wide.db"

# %% Generate synthetic data


# Using default time points

solver = ODESolver()
solver.time_point = solver.time_point_default

obs_data_raw = solver.ode_model1(para_true1)

print("Target data")
print(obs_data_raw)

# Set factors
# print("Factors applied: 75/25 factor")

# factors = {}

# time_length: int = len(solver.time_point) * 4

# # for i in range(0, time_length, 4):
# #     factors[i] = 1/26.520

# # for i in range(1, time_length, 4):
コード例 #2
0
from pyABC_study.dataPlot import result_data_old, result_plot, result_data

# %% Settings

lim = PriorLimits(1e-6, 50)

prior_distribution = "uniform"

print(prior_distribution)

para_prior1 = para_prior(lim, prior_distribution, 1)

solver = ODESolver()
solver.time_point = solver.time_point_default

obs_data_raw_s = solver.ode_model1(para_true1, flatten=False, add_noise=False)

solver.time_point = solver.time_point_exp
obs_data_raw_s_less = solver.ode_model(para_true1, flatten=False, add_noise=False)

# print("Target data")
# print(obs_data_noisy_s)

# %% Load database

db_path = "sqlite:///db/abcsmc_test.db"

history = pyabc.History(db_path)

print("ID: %d, generations: %d" % (history.id, history.max_t))