plot

Attributes

model_rename_dict

predictions_csv

Functions

plot_score_over_round(result_df, filename, score_col)

Visualize each forecaster's average return performance over rounds.

Module Contents

plot.model_rename_dict
plot.plot_score_over_round(result_df: pandas.DataFrame, filename: str, score_col: str, forecasters: list[str] = None, merge_every: int = 1, max_round: int = None)

Visualize each forecaster’s average return performance over rounds.

For each round and each forecaster, we take the average of all rows (events) that have this round and record the score. The final plot shows N curves going from 1 to the max round number (N = number of forecasters).

Args:
result_df: DataFrame with columns [‘forecaster’, ‘event_ticker’, ‘round’, ‘weight’, score_col]

Output from compute_average_return_neutral function

filename: filename to save the plot score_col: column to plot forecasters: list of forecasters to plot. If None, plot all forecasters. merge_every: merge every N rounds. max_round: max round to plot. If None, plot all rounds.

plot.predictions_csv = 'slurm/predictions_10_01_to_09_01.csv'