Arcades

Class BaseExperiment

Classical (monitored) experiment class.

Inherits from:

This class can be inherited to add more features

Info:
See also:
  • ClassificationTable

    List of classification metrics computed.

    See some explanations about metrics on this site: http://blog.revolutionanalytics.com/2016/03/com_class_eval_metrics_r.html

    Fields:
  • Dump

    Dump.

  • InitArgument

    Argument used for instanciation.

    Todo:
    • Extract some arguments to Dump.
    Fields:
    • {train=environment.BaseEnvironment,test=environment.BaseEnvironment} environment
      Table with train and test environments
    • agent.BaseAgent agent
      The agent to use
    • OutputArgument output
      Output options
    • number steps
      Total number of steps to do (excluding evaluation steps) (default math.huge)
    • number eval_freq
      Number of steps between two evaluations
    • number eval_steps
      Number of evaluation steps
    • number save_at
      Next interation at which to save the experiment (optional)
    • {train=table,test=table} loop
      Results of the last iteration (optional)
    • {train=table,test=table} metrics
      Table of saved metrics (optional)
    • number step
      Current step (optional)
  • InteractionsResult

    Result of a set of interactions.

    Fields:
  • InteractionsTable

    A list of interactions.

    Fields:
  • OutputArgument

    Arguments to describe the output.

  • The agent to use

  • {train=environment.BaseEnvironment,test=environment.BaseEnvironment}

    environment

    Table with train and test environments

  • number

    eval_freq

    Number of steps between two evaluations

  • number

    eval_steps

    Number of evaluation steps

  • {train=table,test=table}

    loop

    Results of the last iteration

  • {train=table,test=table}

    metrics

    Table of saved metrics

  • torch.DiskFile

    metrics_file

    File used as output.

  • Output options

  • number

    save_at

    Next interation at which to save the experiment

  • number

    step

    Current step

  • number

    steps

    Total number of steps to do (excluding evaluation steps)

  • torch.Timer

    timer

    A Timer used to time the experiment.

  • __init ( args )

    Default constructor.

    Parameters:

Public Methods

keyboard_arrow_up
  • report ()

    Report loop results.

    Returns:
    • self
  • run ()

    Start the experiment.

    This function will run steps learning interactions, separated by eval_steps evaluation interactions each eval_freq interactions.

  • save ()

    Save the current experiment and dependencies.

    Returns:
    • self
  • setSteps ( steps )

    Update the total number of steps to execute.

    Use this function if you want to continue a previous experiment.

    Parameters:
    • number steps
      New number of steps to do
    Returns:
    • self

Private Methods

keyboard_arrow_up
  • _graphical_report ()

    Save some informations graphically.

    This function will plot some graph, save images or something like this about the elements of the experiment.

    Returns:
    • self
  • _inputs_report ()

    Save some inputs.

    This can be used for checks and/or post-mortem debug.

    Returns:
    • self
  • _interact ( environment, steps )

    Actually do interactions.

    This function does the interactions without checking anything prior to it (agent mode, environment state, etc.). It resets the environment during the interactions if necessary.

    Parameters: Returns:
    • InteractionsResult Only a subset (num_it, interactions, confusion_matrix, inputs) of fields are defined
  • _metrics_report ()

    Build and save metrics string.

    Returns:
    • self
  • _plot_confusion_matrix ()

    Save a graphical version of confusion matrix.

    Returns:
    • self
  • _plot_f1_score ()

    Plot evolution of the F1-Score.

    Returns:
    • self
  • _plot_network_filters ()

    Save a graphical representation of agent network filters

    Returns:
    • self
  • _plot_reward_per_ep ()

    Plot evolution of reward per episode

    Returns:
    • self
  • _test ( steps )

    Do some testing/evaluation interactions.

    Parameters:
    • number steps
      Number of interactions to do
    Returns:
  • _text_report ()

    Build and print a quick textual report.

    Returns:
    • self
  • _torch_report ()

    Save Torch components.

    Todo:
    • save NN weights
    Returns:
    • self
  • _train ( steps )

    Do some training interactions.

    Parameters:
    • number steps
      Number of interactions to do
    Returns:
  • draw_filters ( output_path, network )

    Dump images of the filters of the convolutionnal network.

    Parameters:

Static Functions

keyboard_arrow_up