Adaptive normalizer: normalizes values on-the-run using exponential moving averages over mean and standard deviation.
More...
|
| | Normalizer (Engine &engine=Engine::primary()) |
| | Default constructor.
|
| |
| | Normalizer (float timeWindow, Engine &engine=Engine::primary()) |
| | Constructor with time window.
|
| |
| | Normalizer (float mean, float stdDev, Engine &engine=Engine::primary()) |
| | Constructor with infinite time window.
|
| |
| | Normalizer (float mean, float stdDev, float timeWindow, Engine &engine=Engine::primary()) |
| | Constructor with time window.
|
| |
| void | targetMean (float mean) |
| | Sets target mean of normalized values.
|
| |
|
float | targetMean () const |
| | Returns target mean.
|
| |
| void | targetStdDev (float stdDev) |
| | Sets target standard deviation of normalized values.
|
| |
|
float | targetStdDev () const |
| | Returns target standard deviation.
|
| |
| virtual void | reset () |
| | Resets the statistics.
|
| |
| virtual void | reset (float estimatedMeanValue) |
| | Resets the filter with a prior estimate of the mean value.
|
| |
| virtual void | reset (float estimatedMinValue, float estimatedMaxValue) |
| | Resets the moving filter with a prior estimate of the min and max values.
|
| |
| virtual float | put (float value) |
| | Pushes value into the unit.
|
| |
| virtual float | filter (float value) |
| | Returns the filtered value (without calibrating).
|
| |
| virtual float | lowOutlierThreshold (float nStdDev=1.5f) const |
| | Returns value above which value is considered to be a low outler (below average).
|
| |
| virtual float | highOutlierThreshold (float nStdDev=1.5f) const |
| | Returns value above which value is considered to be a high outler (above average).
|
| |
|
bool | isClamped () const |
| | Return true iff the normalized value is clamped within reasonable range.
|
| |
| void | clamp (float nStdDev=NORMALIZER_DEFAULT_CLAMP_STDDEV) |
| | Assign clamping value.
|
| |
|
void | noClamp () |
| | Remove clamping.
|
| |
| virtual float | mapTo (float toLow, float toHigh) |
| | Maps value to new range.
|
| |
| virtual void | resumeCalibrating () |
| | Switches to calibration mode (default).
|
| |
|
virtual void | pauseCalibrating () |
| | Switches to non-calibration mode: calls to put(value) will return filtered value without updating the normalization statistics.
|
| |
|
virtual void | toggleCalibrating () |
| | Toggles calibration mode.
|
| |
|
virtual bool | isCalibrating () const |
| | Returns true iff the moving filter is in calibration mode.
|
| |
|
unsigned int | nSamples () const |
| | Returns the number of samples that have been processed thus far.
|
| |
|
virtual bool | isPreInitialized () const |
| | Returns true if the moving filter has been initialized with a starting range at reset.
|
| |
| virtual float | get () |
| | Returns value in [0, 1].
|
| |
|
virtual void | clearEvents () |
| |
|
float | seconds () const |
| | Returns engine time in seconds.
|
| |
|
uint32_t | milliSeconds () const |
| | Returns engine time in milliseconds.
|
| |
|
uint64_t | microSeconds () const |
| | Returns engine time in microseconds.
|
| |
|
unsigned long | nSteps () const |
| | Returns number of engine steps.
|
| |
|
float | sampleRate () const |
| | Returns engine sample rate.
|
| |
|
float | samplePeriod () const |
| | Returns enginesample period.
|
| |
|
| operator float () |
| | Object can be used directly to access its value.
|
| |
|
| operator bool () |
| | Operator that allows usage in conditional expressions.
|
| |
|
virtual void | infiniteTimeWindow () |
| | Sets time window to infinite.
|
| |
|
virtual void | noTimeWindow () |
| | Sets time window to no time window.
|
| |
|
virtual void | timeWindow (float seconds) |
| | Changes the time window (expressed in seconds).
|
| |
|
virtual float | timeWindow () const |
| | Returns the time window (expressed in seconds).
|
| |
|
virtual bool | timeWindowIsInfinite () const |
| | Returns true if time window is infinite.
|
| |
|
virtual void | cutoff (float hz) |
| | Changes the time window cutoff frequency (expressed in Hz).
|
| |
|
virtual float | cutoff () const |
| | Returns the time window cutoff frequency (expressed in Hz).
|
| |
|
virtual float | update (float value, float alpha) |
| | Adds a value to the statistics (returns the mean).
|
| |
|
virtual float | mean () const |
| | Returns an exponential moving average of the samples.
|
| |
|
virtual float | meanSquared () const |
| | Return an exponential moving variance of the squared samples.
|
| |
|
virtual float | var () const |
| | Returns an exponential moving variance of the samples.
|
| |
|
virtual float | stdDev () const |
| | Returns the standard deviation of the samples.
|
| |
|
virtual float | normalize (float value) const |
| | Returns the normalized value according N(0, 1).
|
| |
|
virtual float | normalize (float value, float mean, float stdDev) const |
| | Returns the normalized value according to the computed statistics (mean and variance).
|
| |
| virtual bool | isOutlier (float value, float nStdDev=1.5f) const |
| | Returns true if the value is considered an outlier.
|
| |
| virtual bool | isLowOutlier (float value, float nStdDev=1.5f) const |
| | Returns true if the value is considered a low outlier (below average).
|
| |
| virtual bool | isHighOutlier (float value, float nStdDev=1.5f) const |
| | Returns true if the value is considered a high outlier (above average).
|
| |
| virtual float | stddev () const |
| |
Adaptive normalizer: normalizes values on-the-run using exponential moving averages over mean and standard deviation.