def print_longterm_activity(): path = os.path.join( SG_SIM_PATH, "isgt-env-replace-3-of-7", "output_esn_run_0_bc-data_no_clean.txt") genome = best_genes_esn(path) options = load_prediction.get_options() options.num_predictions = 1 * 24 options.bc_data = True mc = load_prediction_esn.ESNModelCreator() model = mc.get_model(options) model.dataset = mc.get_dataset(options) model.cleaning_disabled = True model.train_and_predict_func = _esn_feedback_with_hook model.day = options.num_predictions (target, predictions) = test_genome_store_states(genome, model) plt.figure() plot_target_predictions(target, predictions) plt.figure() for act in activities: plt.plot(act) plt.axvline(x=1342) plt.show()
def plot_pickled_prediction(path): plot_target_predictions(*load_pickled_prediction(path))