noggin.utils.plot_logger

noggin.utils.plot_logger(logger: noggin.logger.LiveLogger, plot_batches: bool = True, last_n_batches: Optional[int] = None, colors: Optional[Dict[str, Union[str, numbers.Real, Sequence[numbers.Real], None, Dict[str, Union[str, numbers.Real, Sequence[numbers.Real], None]]]]] = None, nrows: Optional[int] = None, ncols: int = 1, figsize: Optional[Tuple[int, int]] = None) → Tuple[noggin.plotter.LivePlot, matplotlib.figure.Figure, Union[matplotlib.axes._axes.Axes, numpy.ndarray]][source]

Plots the data recorded by a LiveLogger instance.

Converts the logger to an instance of LivePlot.

Parameters:
logger : LiveLogger

The logger whose train/test-split batch/epoch-level data will be plotted.

plot_batches : bool, optional (default=True)

If True include batch-level data in plot.

last_n_batches : Optional[int]

The maximum number of batches to be plotted at any given time. If None, all of the data will be plotted.

colors : Optional[Dict[str, Union[ValidColor, Dict[str, ValidColor]]]]

colors can be a dictionary, specifying the colors used to plot the metrics. Two mappings are valid:

  • ‘<metric-name>’ -> color-value (specifies train-metric color only)
  • ‘<metric-name>’ -> {‘train’/’test’ : color-value}

If None, default colors are used in the plot.

nrows : Optional[int]

Number of rows of the subplot grid. Metrics are added in row-major order to fill the grid.

ncols : int, optional, default: 1

Number of columns of the subplot grid. Metrics are added in row-major order to fill the grid.

figsize : Optional[Sequence[float, float]]

Specifies the width and height, respectively, of the figure.

Returns:
Tuple[LivePlot, Figure, Union[Axes, np.ndarray]]

The resulting plotter, matplotlib-figure, and axis (or array of axes)