plot_fitness_function: Draw fitness function(s) contour plots

View source: R/plot_fitness_helpers.R

plot_fitness_functionR Documentation

Draw fitness function(s) contour plots

Description

Draw fitness function(s) contour plots

Usage

plot_fitness_function(
  .engine_ = "plotly",
  .l_params_ = self$calibration_parameters,
  .l_gof_values_ = self$GOF_measure_plot,
  .l_calibration_results_ = self$calibration_results,
  .l_PSA_samples_ = self$PSA_samples,
  .t_prior_samples_ = self$prior_samples$LHS,
  .prior_samples_ = 1000,
  .gof_ = "LLK",
  .blank_ = TRUE,
  .percent_sampled_ = 10,
  .true_points_ = FALSE,
  .greys_ = FALSE,
  .scale_ = NULL,
  .coloring_ = "fill",
  .legend_ = FALSE,
  .zoom_ = FALSE,
  .x_axis_lb_ = NULL,
  .x_axis_ub_ = NULL,
  .y_axis_lb_ = NULL,
  .y_axis_ub_ = NULL
)

Arguments

.engine_

String specifying the plotting engine, currently supports "plotly".

.l_params_

List containing information about calibration parameters, including parameters' names, distributions, and boundaries.

.l_gof_values_

List containing the goodness-of-fit (GOF) values corresponding to specific parameter(s) configurations.

.l_calibration_results_

List containing calibration results for each of the tested or employed calibration method.

.l_PSA_samples_

List containing Probabilistic Sensitivity Analysis (PSA) values corresponding to each calibration method.

.t_prior_samples_

Dataset or tibble containing prior samples.

.prior_samples_

Numeric (integer) setting the number of prior samples to be added to the plot.

.gof_

String identifying the name of the GOF measure used. The function currently supports "LLK" or "SSE" for log-likelihood and Sum-of-Squared-Errors fitness functions, respectively.

.blank_

Logical for whether to only plot blank or empty GOF contour plots.

.percent_sampled_

Numeric (double) specifying the proportion of of sets to identify as good-fitting sets by the "random" (undirected or unguided) non-Bayesian calibration methods.

.true_points_

Logical for whether to show "True values" on the plot.

.greys_

Logical for whether to use the "Greys" colour-scale. The .scale_ parameter overrides .greys_ if it was not NULL.

.scale_

String specifying colour-scale applied to the "ploty" contour. The options are "Blackbody", "Bluered", "Blues", "Cividis", "Earth", "Electric", "Greens", "Greys", "Hot", "Jet", "Picnic", "Portland", "Rainbow", "RdBu", "Reds", "Viridis" (default), "YlGnBu", and "YlOrRd".

.coloring_

String specifying where the colour-scale set by the .scale_ parameter is applied on the "plotly" contour. The options are "fill", "heatmap", "none", and "lines". The "fill" option (default) paints the colour scales over the layers of the contour; the "heatmap" option employs a heatmap gradient colouring between each contour level; the "none" option paints no colours on the contour layers and uses a single colour with the contour lines; and the "lines" option applies the colour-scale on the contour lines.

.legend_

Logical for whether to show the "plotly" contour colour-bar legend.

.zoom_

Logical (default TRUE) for whether to zoom in to the identified sets (best fitting sets, extrema, and posterior distributions centres).

.x_axis_lb_

Numeric (double) value specifying the lower bound of x-axis.

.x_axis_ub_

Numeric (double) value specifying the upper bound of x-axis.

.y_axis_lb_

Numeric (double) value specifying the lower bound of y-axis.

.y_axis_ub_

Numeric (double) value specifying the upper bound of y-axis.

Examples

## Not run: 
fitness_function_plots <- plot_fitness_function(
  .l_params_ = CR_CRS_2P2T$calibration_parameters,
  .l_gof_values_ = CR_CRS_2P2T$GOF_measure_plot,
  .l_calibration_results_ = CR_CRS_2P2T$calibration_results,
  .l_PSA_samples_ = CR_CRS_2P2T$PSA_samples,
  .t_prior_samples_ = CR_CRS_2P2T$prior_samples$LHS,
  .true_points_ = TRUE,
  .greys_ = FALSE,
  .scale_ = NULL,
  .coloring_ = "none",
  .blank_ = FALSE)

## End(Not run)

W-Mohammed/calibrater documentation built on Oct. 14, 2023, 1:57 a.m.