Class to calculate statistics using the so-called Chauvenet criterion. More...
#include <ChauvenetCriterionStatistics.h>
Public Member Functions | |
ChauvenetCriterionStatistics (Double zscore=-1, Int maxIterations=0) | |
If zscore is not negative, use that value to discard outliers beyond zscore standard deviations from the mean, and compute statistics based on the remaining data. | |
virtual | ~ChauvenetCriterionStatistics () |
ChauvenetCriterionStatistics < CASA_STATP > & | operator= (const ChauvenetCriterionStatistics< CASA_STATP > &other) |
copy semantics | |
virtual StatisticsData::ALGORITHM | algorithm () const |
get the algorithm that this object uses for computing stats | |
virtual void | reset () |
reset object to initial state. | |
void | setCalculateAsAdded (Bool c) |
This class does not allow statistics to be calculated as datasets are added, so an exception will be thrown if c is True. | |
uInt | getNiter () const |
get the number of iterations | |
Private Member Functions | |
void | _setRange () |
Private Attributes | |
Double | _zscore |
Int | _maxIterations |
Bool | _rangeIsSet |
uInt | _niter |
Class to calculate statistics using the so-called Chauvenet criterion.
This method iteratively calculates statistics by discarding outliers on the basis of Chauvenet's criterion, until the specified maximum number of iterations is reached, or the final iteration results in no additional points being discarded. Alternatively, one can specify a z score which indicates the number of standard deviations beyond which to discard points. In this case, no iterating is done.
Definition at line 48 of file ChauvenetCriterionStatistics.h.
casacore::ChauvenetCriterionStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::ChauvenetCriterionStatistics | ( | Double | zscore = -1 , |
|
Int | maxIterations = 0 | |||
) |
If zscore
is not negative, use that value to discard outliers beyond zscore standard deviations from the mean, and compute statistics based on the remaining data.
If zscore
is negative, use Chauvenet's Criterion to determine which outliers to discard. maxIterations
is the maximum number of iterations to use before stopping. If negative, continue iterating until the set zscore or Chauvenet's criterion is met (ie that there are no remaining outliers).
virtual casacore::ChauvenetCriterionStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::~ChauvenetCriterionStatistics | ( | ) | [virtual] |
void casacore::ChauvenetCriterionStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_setRange | ( | ) | [private] |
virtual StatisticsData::ALGORITHM casacore::ChauvenetCriterionStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::algorithm | ( | ) | const [inline, virtual] |
get the algorithm that this object uses for computing stats
Reimplemented from casacore::ClassicalStatistics< CASA_STATP >.
Definition at line 68 of file ChauvenetCriterionStatistics.h.
References casacore::StatisticsData::CHAUVENETCRITERION.
uInt casacore::ChauvenetCriterionStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::getNiter | ( | ) | const [inline] |
get the number of iterations
Definition at line 82 of file ChauvenetCriterionStatistics.h.
References casacore::ChauvenetCriterionStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_niter.
ChauvenetCriterionStatistics<CASA_STATP>& casacore::ChauvenetCriterionStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::operator= | ( | const ChauvenetCriterionStatistics< CASA_STATP > & | other | ) |
copy semantics
Reimplemented from casacore::ConstrainedRangeStatistics< CASA_STATP >.
virtual void casacore::ChauvenetCriterionStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::reset | ( | ) | [virtual] |
reset object to initial state.
Clears all private fields including data, accumulators, global range. It does not affect the fence factor (_f), which was set at object construction.
Reimplemented from casacore::ConstrainedRangeStatistics< CASA_STATP >.
void casacore::ChauvenetCriterionStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::setCalculateAsAdded | ( | Bool | c | ) | [virtual] |
This class does not allow statistics to be calculated as datasets are added, so an exception will be thrown if c
is True.
Reimplemented from casacore::ClassicalStatistics< CASA_STATP >.
Int casacore::ChauvenetCriterionStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_maxIterations [private] |
Definition at line 87 of file ChauvenetCriterionStatistics.h.
uInt casacore::ChauvenetCriterionStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_niter [private] |
Definition at line 89 of file ChauvenetCriterionStatistics.h.
Referenced by casacore::ChauvenetCriterionStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::getNiter().
Bool casacore::ChauvenetCriterionStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_rangeIsSet [private] |
Definition at line 88 of file ChauvenetCriterionStatistics.h.
Double casacore::ChauvenetCriterionStatistics< AccumType, DataIterator, MaskIterator, WeightsIterator >::_zscore [private] |
Definition at line 86 of file ChauvenetCriterionStatistics.h.