exarl.utils.analyze_reward
Module Contents
Functions
|
The function reads csv-based learning data from the given log file into a pandas frame for use in plotting and result analysis. |
Creates and saves a Rolling Total Reward (y-axis) by Relative Time (x-axis) plot based on .log files written by EXARL for each rank. |
Attributes
- exarl.utils.analyze_reward.logger
- exarl.utils.analyze_reward.read_data(filename, rank)
The function reads csv-based learning data from the given log file into a pandas frame for use in plotting and result analysis.
- Parameters
filename (string) – csv file of log data from EXARL
rank (integer) – MPI rank number
- Returns
pandas.DataFrame – contains data extracted from the csv-based EXARL learning log file, except for current_state and next_state fields, and with the addition of a rank field.
- exarl.utils.analyze_reward.save_reward_plot()
Creates and saves a Rolling Total Reward (y-axis) by Relative Time (x-axis) plot based on .log files written by EXARL for each rank. It saves the plot in the results directory named by the output_dir run parameter in a subdirectory /Plots/reward_plot.png. It then tries to print the plot to the terminal.