CADETProcess.optimization.OptimizationResults.plot_convergence#
- OptimizationResults.plot_convergence(target: Literal['objectives', 'nonlinear_constraints', 'meta_scores'] = 'objectives', figs: Figure | None = None, axs: Axes | None = None, plot_individual: bool = False, plot_avg: bool = True, autoscale: bool = True, show: bool = True, plot_directory: bool = None) tuple[list[Figure] | Figure, list[Axes]][source]#
Plot the convergence of optimization metrics over evaluations.
- Parameters:
- targetLiteral[“objectives”, “nonlinear_constraints”, “meta_scores”],
The target metrics to plot. The default is “objectives”.
- figsplt.Figure or list of plt.Figure, optional
Figure(s) to plot the objectives on.
- axsplt.Axes or list of plt.Axes, optional
Axes to plot the objectives on. If None, new figures and axes will be created.
- plot_individualbool, optional
If True, create individual figure vor each metric. The default is False.
- plot_avgbool, optional
If True, plot add trajectory of average value per generation. The default is True.
- autoscalebool, optional
If True, autoscale the y-axis. The default is True.
- showbool, optional
If True, show the plot. The default is True.
- plot_directorystr, optional
A directory to save the plot, by default None.
- Returns:
- tuple
A tuple containing: - plt.Figure: The Matplotlib Figure object. - npt.NDArray[plt.Axes]: An array of Axes objects representing the subplots.