codes.benchmark.bench_plots

codes.benchmark.bench_plots#

Functions

get_custom_palette(num_colors)

Returns a list of colors sampled from a custom color palette.

inference_time_bar_plot(surrogates, means, ...)

Plot the mean inference time with standard deviation for different surrogate models.

int_ext_sparse(all_metrics, config[, show_title])

Function to make one comparative plot of the interpolation, extrapolation, and sparse training errors.

plot_MAE_comparison(MAEs, labels, config[, ...])

Plot the MAE for different surrogate models.

plot_all_generalization_errors(all_metrics, ...)

Function to make one comparative plot of the interpolation, extrapolation, sparse, and batch size errors.

plot_average_errors_over_time(surr_name, ...)

Plot the errors over time for different modes (interpolation, extrapolation, sparse, batchsize).

plot_average_uncertainty_over_time(...[, ...])

Plot the average uncertainty over time.

plot_comparative_dynamic_correlation_heatmaps(...)

Plot comparative heatmaps of correlation between gradient and prediction errors for multiple surrogate models.

plot_comparative_error_correlation_heatmaps(...)

Plot comparative heatmaps of correlation between predictive uncertainty and prediction errors for multiple surrogate models.

plot_dynamic_correlation(surr_name, conf, ...)

Plot the correlation between the gradients of the data and the prediction errors.

plot_dynamic_correlation_heatmap(surr_name, ...)

Plot the correlation between predictive uncertainty and prediction errors using a heatmap.

plot_dynamic_correlation_heatmap_old(...[, ...])

Plot the correlation between predictive uncertainty and prediction errors using a heatmap.

plot_error_correlation_heatmap(surr_name, ...)

Plot the correlation between predictive uncertainty and prediction errors using a heatmap.

plot_error_correlation_heatmap_old(...[, ...])

Plot the correlation between predictive uncertainty and prediction errors using a heatmap.

plot_error_distribution_comparative(errors, conf)

Plot the comparative distribution of errors for each surrogate model as a smoothed histogram plot.

plot_error_distribution_per_chemical(...[, ...])

Plot the distribution of errors for each chemical as a smoothed histogram plot.

plot_example_mode_predictions(surr_name, ...)

Plot example predictions from a single model alongside targets, and highlight either the training timesteps (interpolation mode) or the cutoff point (extrapolation mode).

plot_example_predictions_with_uncertainty(...)

Plot example predictions with uncertainty.

plot_generalization_error_comparison(...[, ...])

Plot the generalization errors of different surrogate models.

plot_generalization_errors(surr_name, conf, ...)

Plot the generalization errors of a model for various metrics.

plot_loss_comparison(train_losses, ...[, ...])

Plot the training and test losses for different surrogate models.

plot_loss_comparison_equal(train_losses, ...)

Plot the test loss trajectories for different surrogate models on a single plot, after log-transforming and normalizing each trajectory.

plot_loss_comparison_train_duration(...[, ...])

Plot the test loss trajectories for different surrogate models over training duration.

plot_losses(loss_histories, epochs, labels)

Plot the loss trajectories for the training of multiple models.

plot_losses_dual_axis(train_loss, test_loss)

Plot the training and test loss trajectories with dual y-axes.

plot_relative_errors(mean_errors, ...[, ...])

Plot the relative errors over time for different surrogate models.

plot_relative_errors_over_time(surr_name, ...)

Plot the mean and median relative errors over time with shaded regions for the 50th, 90th, and 99th percentiles.

plot_surr_losses(model, surr_name, conf, ...)

Plot the training and test losses for the surrogate model.

plot_uncertainty_confidence(weighted_diffs, conf)

Plot a comparative grouped bar chart of catastrophic confidence measures and return a metric quantifying the net skew of over- versus underconfidence.

plot_uncertainty_over_time_comparison(...[, ...])

Plot the uncertainty and true MAE over time for different surrogate models.

plot_uncertainty_vs_errors(surr_name, conf, ...)

Plot the correlation between predictive uncertainty and prediction errors.

rel_errors_and_uq(metrics, config[, save, ...])

Create a figure with two subplots: relative errors over time and uncertainty over time for different surrogate models.

save_plot(plt, filename, conf[, surr_name, ...])

Save the plot to a file, creating necessary directories if they don't exist.

save_plot_counter(filename, directory[, ...])

Save a plot with an incremented filename if a file with the same name already exists.