feed.api.generic package¶
Submodules¶
feed.api.generic.imputation module¶
imputation.py contains classes for imputation stream operations.
-
class
feed.api.generic.imputation.
FillNa
(fill_value: T)[source]¶ Bases:
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: The next value in the stream. Return type: T
-
generic_name
= 'fillna'¶
-
-
class
feed.api.generic.imputation.
ForwardFill
[source]¶ Bases:
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: The next value in the stream. Return type: T
-
generic_name
= 'ffill'¶
-
feed.api.generic.operators module¶
operators.py contains function for generic stream operators.
feed.api.generic.reduce module¶
reduce.py contains functions and classes for reducing multiple streams into a single stream.
-
class
feed.api.generic.reduce.
Aggregate
(func: Callable[[List[T]], T])[source]¶ Bases:
feed.core.base.Stream
A multi-stream operator for aggregating multiple streams into a single stream.
Parameters: func (Callable[[List[Stream]], T]) – A function for aggregating the value of multiple streams. -
forward
() → T[source]¶ Generates the next value from the underlying data streams.
Returns: The next value in the stream. Return type: T
-
generic_name
= 'reduce'¶
-
-
class
feed.api.generic.reduce.
Reduce
(dtype: str = None)[source]¶ Bases:
feed.core.base.Stream
A stream for reducing multiple streams of the same type.
Parameters: dtype (str, optional) – The data type of the aggregated stream. -
agg
(func: Callable[[List[T]], T]) → feed.core.base.Stream[~T][T][source]¶ Computes the aggregation of the input streams.
Returns: An aggregated stream of the input streams. Return type: Stream[T]
-
forward
() → List[T][source]¶ Generates the next value from the underlying data streams.
Returns: The next value in the stream. Return type: T
-
has_next
() → bool[source]¶ Checks if there is another value.
Returns: If there is another value or not. Return type: bool
-
max
() → feed.core.base.Stream[~T][T][source]¶ Computes the reduced maximum of the input streams.
Returns: A reduced maximum stream. Return type: Stream[T]
-
min
() → feed.core.base.Stream[~T][T][source]¶ Computes the reduced minimum of the input streams.
Returns: A reduced minimum stream. Return type: Stream[T]
-
feed.api.generic.warmup module¶
warmup.py contains classes for warm up stream operations.
-
class
feed.api.generic.warmup.
WarmUp
(periods: int)[source]¶ Bases:
feed.core.base.Stream
A stream operator for warming up a given stream.
Parameters: periods (int) – Number of periods to warm up. -
forward
() → T[source]¶ Generates the next value from the underlying data streams.
Returns: The next value in the stream. Return type: T
-