Skip to content

plot_terminator_improvement


method plot_terminator_improvement(models=None, title=None, legend="upper right", figsize=(900, 600), filename=None, display=True)[source]
Plot the potentials for future objective improvement.

This function visualizes the objective improvement potentials. It helps to determine whether you should continue the optimization or not. The evaluated error is also plotted. Note that this function may take some time to compute the improvement potentials. This plot is only available for models that ran hyperparameter tuning.

Warning

  • The plot_terminator_improvement method is only available for models that ran hyperparameter tuning using cross-validation, e.g., using ht_params={'cv': 5}.
  • This method does not support [multi-objective optimizations][multi-metric runs].
  • The calculation of the improvement can be slow. Set the memory parameter to cache the results and speed up repeated calls.

Parametersmodels: int, str, Model, segment, sequence or None, default=None
Models to plot. If None, all models that used hyperparameter tuning are selected.

title: str, dict or None, default=None
Title for the plot.

legend: str, dict or None, default="upper right"
Legend for the plot. See the user guide for an extended description of the choices.

  • If None: No legend is shown.
  • If str: Position to display the legend.
  • If dict: Legend configuration.

figsize: tuple, default=(900, 600)
Figure's size in pixels, format as (x, y)

filename: str, Path or None, default=None
Save the plot using this name. Use "auto" for automatic naming. The type of the file depends on the provided name (.html, .png, .pdf, etc...). If filename has no file type, the plot is saved as html. If None, the plot is not saved.

display: bool or None, default=True
Whether to render the plot. If None, it returns the figure.

Returnsgo.Figure or None
Plot object. Only returned if display=None.


See Also

plot_pareto_front

Plot the Pareto front of a study.

plot_timeline

Plot the timeline of a study.

plot_trials

Plot the hyperparameter tuning trials.


Example

>>> from atom import ATOMClassifier
>>> from sklearn.datasets import make_classification

>>> X, y = make_classification(n_samples=100, flip_y=0.2, random_state=1)

>>> atom = ATOMClassifier(X, y, random_state=1)
>>> atom.run("RF", n_trials=10, ht_params={"cv": 5})
>>> atom.plot_terminator_improvement()