noggin.plotter.LivePlot.to_xarray

LivePlot.to_xarray(train_or_test: str) → Tuple[xarray.core.dataset.Dataset, xarray.core.dataset.Dataset]

Returns xarray datasets for the batch-level and epoch-level metrics, respectively, for either the train-metrics or test-metrics.

Parameters:
train_or_test : str

Either ‘train’ or ‘test’ - specifies which measurements to be returned

Returns:
Tuple[xarray.Dataset, xarray.Dataset]

The batch-level and epoch-level datasets. The metrics are reported as data variables in the dataset, and the coordinates corresponds to the batch-iteration count.

Notes

The layout of the resulting data sets are:

Dimensions:     (iterations: num_iterations)
Coordinates:
  * iterations  (iterations) int64 1 2 3 ...
Data variables:
    metric0      (iterations) float64 val_0 val_1 ...
    metric1      (iterations) float64 val_0 val_1 ...
    ...

Each metric can be accessed as an attribute of the resulting data-set, e.g. dataset.metric0, or via the ‘get-item’ syntax, e.g. dataset['metric0']. This returns a data-array for that metric.

Data sets collected from multiple trials of an experiment can be combined using concat_experiments().