This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NUM_ALGO_TRIALS = _ | |
NUM_TRAINING_TIMESTEPS = _ | |
NUM_TESTING_TIMESTEPS = _ | |
set_seed() | |
for algo_iteration in range(NUM_ALGO_TRIALS): | |
for training_timesteps in range(NUM_TRAINING_TIMESTEPS): #for epsiodic tasks, keep resetting the env | |
deploy_policy_with_exploration() | |
update_policy_with_new_data() | |
for testing_timesteps in range(NUM_TESTING_TIMESTEPS): #for epsiodic tasks, keep resetting the env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NUM_ALGO_TRIALS = _ | |
NUM_TRAINING_TIMESTEPS = _ | |
NUM_TESTING_TIMESTEPS = _ | |
set_seed() | |
for algo_iteration in range(NUM_ALGO_TRIALS): | |
for training_timesteps in range(NUM_TRAINING_TIMESTEPS): #for epsiodic tasks, keep resetting the env | |
deploy_policy_with_exploration() | |
update_policy_with_new_data() | |
for testing_timesteps in range(NUM_TESTING_TIMESTEPS): #for epsiodic tasks, keep resetting the env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def simulator(initial_state, parameter): | |
state = initial_state | |
for t in range(timesteps): | |
state = next_state(state,parameter) | |
print(state) | |
############################################# | |
# but I need to be able to do something like |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
####################################################################################################################### | |
# Simulation of Bayesian Dwell Time Model Assuming Error-free Covariates | |
# Conor Igoe - 2017 | |
# | |
# Loads relevant data from the test directory given by test_data_filepath | |
# Initialises the necessary data structures for PyMC3 and logging | |
# Steps through the loaded test data chronologically | |
# For the 1st data point, with no posteriors to use as priors for the model, uses uniform priors | |
# For all other data points, uses posteriors from the previous datapoint as priors for current point in simulation | |
# Calculates the likelihood |