Skip to content

plot_successive_halving


method plot_successive_halving(models=None, metric=0, title=None, figsize=(10, 6), filename=None, display=True) [source]

Plot of the models' scores per iteration of the successive halving. Only available if the models were fitted using successive halving.

Parameters:

models: str, sequence or None, optional (default=None)
Name of the models to plot. If None, all the models in the pipeline are selected.

metric: int or str, optional (default=0)
Index or name of the metric to plot. Only for multi-metric runs.

title: str or None, optional (default=None)
Plot's title. If None, the title is left empty.

figsize: tuple, optional (default=(10, 6))
Figure's size, format as (x, y).

filename: str or None, optional (default=None)
Name of the file. Use "auto" for automatic naming. If None, the figure is not saved.

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

Returns: fig: matplotlib.figure.Figure
Plot object. Only returned if display=None.


Example

from atom import ATOMClassifier

atom = ATOMClassifier(X, y)
atom.successive_halving(
    models=["bag", "adab", "et", "lgb"],
    metric="ap",
    n_bootstrap=5,
)
atom.plot_successive_halving(filename="successive_halving")
plot_successive_halving
Back to top