Alpha-Beta Filter Traces#

The alpha-beta filter trace collection is used to store the resulting signal traces produced by the alpha-beta filter of the signal samples of a signal trace.

Create the Trace Collection#

You can create an alpha-beta filter trace collection without samples by calling the AlphaBetaFilterTraces class.

>>> # create an empty alpha-beta filter trace collection
>>> traces = AlphaBetaFilterTraces()
>>> traces
AlphaBetaFilterTraces(forecast=Trace(label='Trace', samples=[]),
                      forecast_sign=Trace(label='Trace', samples=[]),
                      level=Trace(label='Trace', samples=[]),
                      level_sign=Trace(label='Trace', samples=[]),
                      trend=Trace(label='Trace', samples=[]),
                      trend_sign=Trace(label='Trace', samples=[]),
                      trend_inflection=Trace(label='Trace', samples=[]),
                      error=Trace(label='Trace', samples=[]),
                      variance_forecast=Trace(label='Trace', samples=[]),
                      variance_level=Trace(label='Trace', samples=[]),
                      variance_trend=Trace(label='Trace', samples=[]))

Number of Traces#

You can get the number of the traces in the AlphaBetaFilterTraces collection with the built-in function len().

>>> # number of traces in the collection
>>> len(traces)
11

Names of the Traces#

You can get the list with the names of the traces in the AlphaBetaFilterTraces collection.

A list with the key names of the traces is returned.

>>> # key names of the traces in the collection
>>> list(traces)
['forecast',
 'forecast_sign',
 'level',
 'level_sign',
 'trend',
 'trend_sign',
 'trend_inflection',
 'error',
 'variance_forecast',
 'variance_level',
 'variance_trend']
>>> # key names of the traces in the collection
>>> list(traces.keys())
['forecast',
 'forecast_sign',
 'level',
 'level_sign',
 'trend',
 'trend_sign',
 'trend_inflection',
 'error',
 'variance_forecast',
 'variance_level',
 'variance_trend']

Forecast Trace#

You can get the forecast Trace with the forecast attribute from the AlphaBetaFilterTraces collection.

The Trace with the forecast samples is returned.

>>> # forecast trace by attribute
>>> traces.forecast
Trace(label='Trace', samples=[])
>>> # forecast trace by key
>>> traces['forecast']
Trace(label='Trace', samples=[])

Forecast Sign Trace#

You can get the forecast sign Trace with the forecast_sign attribute from the AlphaBetaFilterTraces collection.

The Trace with the forecast sign samples is returned.

>>> # forecast sign trace by attribute
>>> traces.forecast_sign
Trace(label='Trace', samples=[])
>>> # forecast trace by key
>>> traces['forecast_sign']
Trace(label='Trace', samples=[])

Level Trace#

You can get the level Trace with the level attribute from the AlphaBetaFilterTraces collection.

The Trace with the level samples is returned.

>>> # level trace by attribute
>>> traces.level
Trace(label='Trace', samples=[])
>>> # level trace by key
>>> traces['level']
Trace(label='Trace', samples=[])

Level Sign Trace#

You can get the level sign Trace with the level_sign attribute from the AlphaBetaFilterTraces collection.

The Trace with the level samples is returned.

>>> # level sign trace by attribute
>>> traces.level_sign
Trace(label='Trace', samples=[])
>>> # level sign trace by key
>>> traces['level_sign']
Trace(label='Trace', samples=[])

Trend Trace#

You can get the trend Trace with the trend attribute from the AlphaBetaFilterTraces collection.

The Trace with the trend samples is returned.

>>> # trend trace by attribute
>>> traces.trend
Trace(label='Trace', samples=[])
>>> # trend trace by key
>>> traces['trend']
Trace(label='Trace', samples=[])

Trend Sign Trace#

You can get the trend sign Trace with the trend_sign attribute from the AlphaBetaFilterTraces collection.

The Trace with the trend sign samples is returned.

>>> # trend sign trace by attribute
>>> traces.trend_sign
Trace(label='Trace', samples=[])
>>> # trend sign trace by key
>>> traces['trend_sign']
Trace(label='Trace', samples=[])

Trend Inflection Trace#

You can get the trend inflection Trace between the predicted forecast and the estimated level with the trend_inflection attribute from the AlphaBetaFilterTraces collection.

The Trace with the trend sign samples is returned.

>>> # trend sign trace by attribute
>>> traces.trend_inflection
Trace(label='Trace', samples=[])
>>> # trend sign trace by key
>>> traces['trend_inflection']
Trace(label='Trace', samples=[])

Error Trace#

You can get the error Trace for the predicted forecast with the error attribute from the AlphaBetaFilterTraces collection.

The Trace with the error samples is returned.

>>> # error trace by attribute
>>> traces.error
Trace(label='Trace', samples=[])
>>> # error trace by key
>>> traces['error']
Trace(label='Trace', samples=[])

Variance Reduction Factors#

Forecast Trace#

You can get the variance reduction factor for the forecast Trace with the variance_forecast attribute from the AlphaBetaFilterTraces collection.

The Trace with the forecast variance reduction factor samples is returned.

>>> # variance reduction factor forecast trace by attribute
>>> traces.variance_forecast
Trace(label='Trace', samples=[])
>>> # variance reduction factor forecast trace by key
>>> traces['variance_forecast']
Trace(label='Trace', samples=[])

Level Trace#

You can get the variance reduction factor for the level Trace with the variance_level attribute from the AlphaBetaFilterTraces collection.

The Trace with the variance reduction factor samples for the level Trace is returned.

>>> # variance reduction factor level trace by attribute
>>> traces.variance_level
Trace(label='Trace', samples=[])
>>> # level variance reduction level trace by key
>>> traces['variance_level']
Trace(label='Trace', samples=[])

Trend Trace#

You can get the variance reduction factor for the trend Trace with the variance_trend attribute from the AlphaBetaFilterTraces collection.

The Trace with the variance reduction factor samples for the trend Trace is returned.

>>> # variance reduction factor trend trace by attribute
>>> traces.variance_trend
Trace(label='Trace', samples=[])
>>> # variance reduction factor trend trace by key
>>> traces['variance_trend']
Trace(label='Trace', samples=[])