Estimates mean of a data stream using Welford's algorithm and calculates statistic properties.
More...
#include <statisticsestimator.h>
|
| StatisticsEstimator () |
|
void | reset () |
| Resets the StatisticsEstimator so that it is ready to process a new data stream. More...
|
|
void | process (double x) |
| Processes a new sample of the current data stream and updates internal intermediate values. More...
|
|
size_t | getCount () const |
| Gets the amount of processed samples. More...
|
|
double | getMean () const |
| Gets the mean of processed samples. More...
|
|
double | calculateVariance () const |
| Calculates the sample variance of the processed data stream from internal intermediate values. More...
|
|
double | calculateRelativeErrorSq () const |
| Calculates the squared relative three sigma error range, i.e. the squared estimation accuracy in percent, of the processed data stream from internal intermediate values. Use the squared value to avoid expensive root calculation. More...
|
|
Estimates mean of a data stream using Welford's algorithm and calculates statistic properties.
◆ StatisticsEstimator()
StatisticsEstimator::StatisticsEstimator |
( |
| ) |
|
◆ calculateRelativeErrorSq()
double StatisticsEstimator::calculateRelativeErrorSq |
( |
| ) |
const |
Calculates the squared relative three sigma error range, i.e. the squared estimation accuracy in percent, of the processed data stream from internal intermediate values. Use the squared value to avoid expensive root calculation.
- Returns
- Squared relative error range.
◆ calculateVariance()
double StatisticsEstimator::calculateVariance |
( |
| ) |
const |
Calculates the sample variance of the processed data stream from internal intermediate values.
- Returns
- Sample variance
◆ getCount()
size_t StatisticsEstimator::getCount |
( |
| ) |
const |
|
inline |
Gets the amount of processed samples.
- Returns
- Processed sample count.
◆ getMean()
double StatisticsEstimator::getMean |
( |
| ) |
const |
|
inline |
Gets the mean of processed samples.
- Returns
- Mean of processed samples.
◆ process()
void StatisticsEstimator::process |
( |
double |
x | ) |
|
Processes a new sample of the current data stream and updates internal intermediate values.
◆ reset()
void StatisticsEstimator::reset |
( |
| ) |
|
◆ m_count
size_t StatisticsEstimator::m_count |
|
private |
◆ m_mean
double StatisticsEstimator::m_mean |
|
private |
◆ m_var
double StatisticsEstimator::m_var |
|
private |
The documentation for this class was generated from the following files: