feed.api.float.window.expanding module¶
expanding.py contains functions and classes for expanding stream operations.
-
class
feed.api.float.window.expanding.
Expanding
(min_periods: int = 1)[source]¶ Bases:
feed.core.base.Stream
A stream that generates the entire history of a stream at each time step.
Parameters: min_periods (int, default 1) – The number of periods to wait before producing values from the aggregation function. -
agg
(func: Callable[[List[float]], float]) → feed.core.base.Stream[float][float][source]¶ Computes an aggregation of a stream’s history.
Parameters: func (Callable[[List[float]], float]) – A aggregation function. Returns: A stream producing aggregations of the stream history at each time step. Return type: Stream[float]
-
count
() → feed.core.base.Stream[float][float][source]¶ Computes an expanding count fo the underlying stream.
Returns: An expanding count stream. Return type: Stream[float]
-
forward
() → List[float][source]¶ Generates the next value from the underlying data streams.
Returns: The next value in the stream. Return type: T
-
generic_name
= 'expanding'¶
-
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[float][float][source]¶ Computes an expanding maximum fo the underlying stream.
Returns: An expanding maximum stream. Return type: Stream[float]
-
mean
() → feed.core.base.Stream[float][float][source]¶ Computes an expanding mean fo the underlying stream.
Returns: An expanding mean stream. Return type: Stream[float]
-
median
() → feed.core.base.Stream[float][float][source]¶ Computes an expanding median fo the underlying stream.
Returns: An expanding median stream. Return type: Stream[float]
-
min
() → feed.core.base.Stream[float][float][source]¶ Computes an expanding minimum fo the underlying stream.
Returns: An expanding minimum stream. Return type: Stream[float]
-
std
() → feed.core.base.Stream[float][float][source]¶ Computes an expanding standard deviation fo the underlying stream.
Returns: An expanding standard deviation stream. Return type: Stream[float]
-
-
class
feed.api.float.window.expanding.
ExpandingCount
[source]¶ Bases:
feed.api.float.window.expanding.ExpandingNode
A stream operator that counts the number of non-missing values.
-
class
feed.api.float.window.expanding.
ExpandingNode
(func: Callable[[List[float]], float])[source]¶ Bases:
feed.core.base.Stream
A stream operator for aggregating an entire history of a stream.
Parameters: func (Callable[[List[float]], float]) – A function that aggregates the history of a stream.
-
feed.api.float.window.expanding.
expanding
(s: feed.core.base.Stream[float][float], min_periods: int = 1) → feed.core.base.Stream[typing.List[float]][List[float]][source]¶ Computes a stream that generates the entire history of a stream at each time step.
Parameters: - s (Stream[float]) – A float stream.
- min_periods (int, default 1) – The number of periods to wait before producing values from the aggregation function.