tensortrade.feed.api.generic.imputation module

imputation.py contains classes for imputation stream operations.

class tensortrade.feed.api.generic.imputation.FillNa(*args, **kwargs)[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: str = '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(*args, **kwargs)[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: str = 'ffill'
has_next()bool[source]

Checks if there is another value.

Returns

bool – If there is another value or not.