noggin.logger.LiveMetric¶
-
class
noggin.logger.
LiveMetric
(name: str)[source]¶ Holds the relevant data for a train/test metric for live plotting.
Attributes: batch_data
Batch-level measurements of the metric.
batch_domain
Array of iteration-counts at which the metric was recorded.
epoch_data
Epoch-level measurements of the metrics.
epoch_domain
Array of iteration-counts at which an epoch was set for this metric.
name
Name of the metric.
Methods
add_datapoint
(value, weighting)Record a batch-level measurement of the metric. from_dict
(metrics_dict, numpy.ndarray])The inverse of LiveMetric.to_dict
.set_epoch_datapoint
(x)Mark the present iteration as an epoch, and compute the mean value of the metric since the past epoch. to_dict
()Returns the batch data, epoch domain, and epoch data in a dictionary. -
__init__
(name: str)[source]¶ Parameters: - name : str
Raises: - TypeError
Invalid metric name (must be string)
Methods
__init__
(name)Parameters: add_datapoint
(value, weighting)Record a batch-level measurement of the metric. from_dict
(metrics_dict, numpy.ndarray])The inverse of LiveMetric.to_dict
.set_epoch_datapoint
(x)Mark the present iteration as an epoch, and compute the mean value of the metric since the past epoch. to_dict
()Returns the batch data, epoch domain, and epoch data in a dictionary. Attributes
batch_data
Batch-level measurements of the metric. batch_domain
Array of iteration-counts at which the metric was recorded. epoch_data
Epoch-level measurements of the metrics. epoch_domain
Array of iteration-counts at which an epoch was set for this metric. name
Name of the metric.