simopt.plots.terminal_feasibility
Terminal feasibility plot.
Module Contents
- simopt.plots.terminal_feasibility.plot_terminal_feasibility(experiments: list[list[simopt.experiment.ProblemSolver]], plot_type: Literal['scatter', 'violin'] = 'scatter', score_type: Literal['inf_norm', 'norm'] = 'inf_norm', two_sided: bool = True, plot_zero: bool = True, plot_optimal: bool = True, norm_degree: int = 1, all_in_one: bool = True, n_bootstraps: int = 100, conf_level: float = 0.95, plot_conf_ints: bool = True, bias_correction: bool = True, solver_set_name: str = 'SOLVER_SET', plot_title: str | None = None, legend_loc: str | None = None, ext: str = '.png', save_as_pickle: bool = False) list[str]
Plot the feasibility of one solver problem pair. (for now).
- Parameters:
experiments (list [list [
experiment_base.ProblemSolver]]) – Problem-solver pairs used to produce plots.plot_type (str, default = 'scatter') –
- String indicating which type of plot to produce:
”scatter” : scatter plot with terminal objective on x-axis and terminal feasiblity score on y-axis for all macroreps “violin” : violin plot showing density of terminal feasiblity scores for all macroreps
score_type (str, default = "inf_norm") – “inf_norm” : use infinite norm of lhs of violated constraints to calculate feasiblity score “norm” : use “norm_degree” to specify degree of norm of lhs of violated constriants
two_sided (bool, default = "True") – Two-sided or one-sided feasiblity score
plot_zero (bool, default = True) – Plot a dashed red line a feasiblity score = 0
plot_optimal (default = True) – Plot a dashed red line at beast feasible objective across all postreplications
norm_degree (int, default = 1) – if not using inf_norm, specifies degree of norm taken of lhs of violated constraints for feasibility score
all_in_one (bool, default = True) – plot all solvers on same plot
n_bootstraps (int, default = 100) – number of bootsrap replications for CI construction
conf_level (float, default = 0.95) – confidence level of created CI
plot_conf_ints (bool, default = True) – plot CI’s for each maroreplication
bias_correction (bool, default = True) – use bias correction for CI construction
solver_set_name (str, default = "SOLVER_SET") – Override solver names in plot, only applies if all_in_one = True
plot_title (str, optional) – Optional title to override the one that is autmatically generated
legend_loc (str, default="best") – specificies location of legend
ext (str, default = '.png') – Extension to add to image file path to change file type
save_as_pickle (bool, default = False) – True if plot should be saved to pickle file, False otherwise.
Returns
-------
file_list (list [str]) – List compiling path names for plots produced.
Raises
------
TypeError
ValueError