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)

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

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

Plot the MAE for different surrogate models.

plot_MAE_comparison_train_duration(MAEs, ...)

Plot the MAE for different surrogate models.

plot_average_errors_over_time(surr_name, ...)

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

plot_average_uncertainty_over_time(...[, save])

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

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_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, ...[, save])

Plot the training and test losses for different surrogate models.

plot_losses(loss_histories, labels[, title, ...])

Plot the loss trajectories for the training of multiple models.

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

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_over_time_comparison(...[, ...])

Plot the uncertainty 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.