refine_plan.learning.option_learning ==================================== .. py:module:: refine_plan.learning.option_learning .. autoapi-nested-parse:: Functions for processing datsets and learning DBNs. Author: Charlie Street Owner: Charlie Street Functions --------- .. autoapisummary:: refine_plan.learning.option_learning.mongodb_to_yaml refine_plan.learning.option_learning.learn_dbns Module Contents --------------- .. py:function:: mongodb_to_yaml(connection_str, db_name, collection_name, sf_list, out_file) Processes a mongodb collection into a yaml dataset for DBN learning. :param connection_str: The mongodb connection string :param db_name: The Mongo database name :param collection_name: The collection within the database :param sf_list: The list of state factors to expect in the MongoDB :param out_file: The path for the yaml file .. py:function:: learn_dbns(dataset_path, output_dir, sf_list) Learn a set of DBNs representing options. The dataset should be a dictionary from options to a dictionary with two keys: 'transition' and 'reward'. In 'transition' there should be a dictionary with keys sf0 and sft for each state factor sf. At each of these keys is a list of data. In 'reward' there should be a dictionary with keys sf for each state factor sf, and 'r' to represent the reward. At each of these keys is a list of data :param dataset_path: A yaml file containing the dataset. :param output_dir: The output directory for the DBNs. :param sf_list: The list of state factors we expect to see in the dataset