tensorboard

tensorboard#


class TensorboardData(events: tensorboard.backend.event_processing.event_accumulator.EventAccumulator)[source]#

Bases: object

get_series(tag: str, smoothing_factor: float = 0.0) pandas.Series[source]#

Gets the (smoothed) pandas Series for a specific tensorboard tag.

Parameters:
  • tag – the tensorboard tag

  • smoothing_factor – the smoothing factor between 0 and 1 which determines the relative importance of past values. 0: no smoothing 1: maximum smoothing (all values will be equal to the first value)

Returns:

the pandas series with the step as the index

get_tags() List[str][source]#

Get list of available scalar tags in the events.

Returns:

list of tag names

get_data_frame(tags: Optional[List[str]] = None, smoothing_factor: float = 0.0) pandas.DataFrame[source]#

Gets multiple series as a DataFrame.

Parameters:
  • tags – the list of tensorboard tags to consider; if None, use all

  • smoothing_factor – smoothing factor to apply to all series

Returns:

DataFrame with steps as index and tags as columns

class TensorboardSeriesComparison(tb_reference: TensorboardData, tb_current: TensorboardData, tag: str, index_start: int, index_end: int)[source]#

Bases: object

mean_relative_difference()[source]#

Computes the difference between the current series and the reference series, relative to the reference, e.g. if the current series is on average 105% of the reference series (5% relative difference), then the value will be 0.05. Since we divide by the absolute value of the reference, this also works for negative cases, i.e. if the reference series value is -0.10 and the current series value is -0.08, then the relative difference is 0.2 (20%).

Returns:

the mean relative difference

plot_series(show=False) matplotlib.pyplot.Figure[source]#