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.

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 Δdex errors over time for different evaluation modes.

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

Plot average predictive uncertainty and errors over time in log-space (dex).

plot_catastrophic_detection_curves(...[, ...])

Plot catastrophic error recall (Δdex) vs fraction flagged by uncertainty, across multiple catastrophic percentiles, plus performance improvement curves.

plot_comparative_error_correlation_heatmaps(...)

Comparative heatmaps of log-space uncertainty vs Δdex.

plot_comparative_gradient_heatmaps(...[, ...])

Plot comparative heatmaps of correlation between gradient 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_error_distribution_comparative(errors, conf)

Plot comparative error distributions for each surrogate model.

plot_error_distribution_per_quantity(...[, ...])

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

plot_error_percentiles_over_time(surr_name, ...)

Plot mean, median, and percentile error envelopes over time.

plot_errors_over_time(mean_errors, ...[, ...])

Plot errors over time for different surrogate models (relative, Δdex, or iterative Δdex).

plot_example_iterative_predictions(...[, ...])

Plot one sample's full iterative trajectory: ground truth vs.

plot_example_mode_predictions(surr_name, ...)

Plot example predictions in log-space (Δdex) alongside ground truth targets for either interpolation or extrapolation mode.

plot_example_predictions_with_uncertainty(...)

Plot example predictions with uncertainty in log10 space (dex).

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_gradients_heatmap(surr_name, conf, ...)

Plot correlation between gradients (normalized) and Δdex errors using a heatmap.

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_mean_deltadex_over_time_main_vs_ensemble(...)

Plot mean Δdex over time for each surrogate: main vs ensemble.

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

Plot the relative errors over time for different surrogate models.

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_heatmap(surr_name, conf, ...)

Plot correlation between predictive log-space uncertainty and log-space errors (delta dex).

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

Plot log-space uncertainty and Δdex over time for multiple surrogates.

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.