|
MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
|
Stateful statistical characterization of an evolving scalar stream. More...
#include <Estimate.hpp>
Collaboration diagram for MayaFlux::Kinesis::Stochastic::Estimate:Public Member Functions | |
| double | confidence (double step) const |
| Confidence that a step is signal, not floor. | |
| double | confidence_of_rate (double rate, double dt) const |
| Confidence that a Differential-derived rate reflects signal, not floor. | |
| Estimate (EstimateModel model=EstimateModel::EWM_VARIANCE, double adapt_rate=0.05, size_t window=32) | |
| Constructs an estimator with the specified model. | |
| double | floor () const |
| Current learned floor. | |
| double | get_adapt_rate () const |
| Gets the current adapt rate. | |
| EstimateModel | get_model () const |
| Gets current model. | |
| size_t | get_window () const |
| Gets the current window size. | |
| void | reset () |
| Resets internal state. | |
| void | set_adapt_rate (double rate) |
| Sets the adapt rate used by EWM_VARIANCE. | |
| void | set_model (EstimateModel model) |
| Changes active model. | |
| void | set_window (size_t window) |
| Sets the window size used by windowed models. | |
| const EstimateState & | state () const |
| Gets current internal state. | |
| EstimateState & | state_mutable () |
| Gets mutable internal state. | |
| double | update (double sample) |
| Feed one new sample, updating the running estimate. | |
| void | update_into (double sample, Memory::HistoryBuffer< double > &out) |
| Feed one sample and push the filtered result into a HistoryBuffer. | |
| double | value () const |
| Current filtered value, the cleaned counterpart to the raw sample. | |
Static Public Member Functions | |
| static std::vector< size_t > | flag_outliers (std::span< const double > samples, double threshold_mad=3.0) noexcept |
| Flags samples whose deviation from the median exceeds a threshold. | |
| static double | median_absolute_deviation (std::span< const double > samples) noexcept |
| Median absolute deviation of a span. | |
| static double | stddev (std::span< const double > samples) noexcept |
| Standard deviation of a span. | |
| static double | trend_explained_ratio (std::span< const double > samples) noexcept |
| Fraction of a span's variance attributable to its linear trend. | |
| static double | trend_slope (std::span< const double > samples) noexcept |
| Linear trend slope across a span. | |
| static double | variance (std::span< const double > samples) noexcept |
| Sample variance of a span. | |
Private Member Functions | |
| double | update_ewm_variance (double sample) |
| double | update_mad (double sample) |
| double | update_quiet_period (double sample) |
| double | update_rolling_variance (double sample) |
| double | update_trend (double sample) |
Private Attributes | |
| double | m_adapt_rate |
| Memory::HistoryBuffer< double > | m_history |
| EstimateModel | m_model |
| EstimateState | m_state |
| size_t | m_window |
Stateful statistical characterization of an evolving scalar stream.
Provides mathematical primitives for characterizing controlled uncertainty in an arriving signal, across all computational domains. This is the read direction of what Stochastic is for the write direction: Stochastic produces a signal with chosen statistical character, Estimate consumes a signal and characterizes its statistical character, updating that characterization as the stream's behavior itself changes.
Treats stream characterization as fundamental mathematical infrastructure rather than domain-specific processing. The same primitives that learn a tablet's pressure noise floor can learn a camera-derived tracking point's jitter, an analysis feature's drift, or any other per-frame scalar's evolving statistical behavior. The numbers themselves are discipline-agnostic.
Windowed (bounded recent memory):
Unbounded (exponentially weighted memory):
Learning a noise floor:
Feeding Differential with cleaned values:
One-shot characterization of an already-captured window:
Definition at line 125 of file Estimate.hpp.