tensortrade.feed.api.generic.imputation module

imputation.py contains classes for imputation stream operations.

class tensortrade.feed.api.generic.imputation.FillNa(fill_value: T)[source]

Bases: tensortrade.feed.core.base.Stream

A stream operator that computes the padded imputation of a stream.

Parameters:fill_value (T) – The fill value to use for missing values in the stream.
forward() → T[source]

Generates the next value from the underlying data streams.

Returns:T – The next value in the stream.
generic_name = 'fillna'
has_next() → bool[source]

Checks if there is another value.

Returns:bool – If there is another value or not.
class tensortrade.feed.api.generic.imputation.ForwardFill[source]

Bases: tensortrade.feed.core.base.Stream

A stream operator that computes the forward fill imputation of a stream.

forward() → T[source]

Generates the next value from the underlying data streams.

Returns:T – The next value in the stream.
generic_name = 'ffill'
has_next() → bool[source]

Checks if there is another value.

Returns:bool – If there is another value or not.