Alexandria 2.31.0
SDC-CH common library for the Euclid project
|
#include <Scott.h>
Public Member Functions | |
template<typename Iterator > | |
void | computeBins (Iterator begin, Iterator end) |
ssize_t | getBinIndex (VarType value) const final |
std::pair< VarType, VarType > | getBinEdges (size_t i) const final |
VarType | getEdge (size_t i) const final |
![]() | |
BinStrategy () | |
virtual | ~BinStrategy ()=default |
size_t | getBinCount () const |
virtual std::vector< VarType > | getEdges () const |
virtual VarType | getBin (size_t i) const |
Private Attributes | |
VarType | m_start |
VarType | m_step |
VarType | m_end |
Additional Inherited Members | |
![]() | |
size_t | m_nbins |
Bin strategy that estimates the number of bins applying Scott's normal reference rule
A proposed bin width is given by \( h = \frac{3.5\sigma}{\sqrt[3]{n}} \) Where \( \sigma \) is the standard deviation of the data set
The final number of bins is computed with \( k = \left \lceil \frac{\max x - \min x}{h} \right \rceil \)
|
inline |
Definition at line 57 of file Scott.h.
References std::ceil(), std::for_each(), Euclid::Histogram::Binning::Scott< VarType >::m_end, Euclid::Histogram::BinStrategy< VarType >::m_nbins, Euclid::Histogram::Binning::Scott< VarType >::m_start, Euclid::Histogram::Binning::Scott< VarType >::m_step, std::pow(), std::ref(), and std::sqrt().
|
inlinefinalvirtual |
Get the two edges corresponding to the bin i
i | The bin index |
Reimplemented from Euclid::Histogram::BinStrategy< VarType >.
Definition at line 91 of file Scott.h.
References Euclid::Histogram::Binning::Scott< VarType >::m_start, Euclid::Histogram::Binning::Scott< VarType >::m_step, and std::make_pair().
|
inlinefinalvirtual |
Get the bin index corresponding to the given value
value | The value to map to a bin |
Implements Euclid::Histogram::BinStrategy< VarType >.
Definition at line 85 of file Scott.h.
References Euclid::Histogram::Binning::Scott< VarType >::m_end, Euclid::Histogram::BinStrategy< VarType >::m_nbins, Euclid::Histogram::Binning::Scott< VarType >::m_start, and Euclid::Histogram::Binning::Scott< VarType >::m_step.
|
inlinefinalvirtual |
Get the edge value e. Note that there are always one more edge than bins: i.e. the bin 0 has the edges (0, 1), the bin 1 the edges (1, 2), etc...
Implements Euclid::Histogram::BinStrategy< VarType >.
Definition at line 95 of file Scott.h.
References Euclid::Histogram::Binning::Scott< VarType >::m_start, and Euclid::Histogram::Binning::Scott< VarType >::m_step.
|
private |
Definition at line 101 of file Scott.h.
Referenced by Euclid::Histogram::Binning::Scott< VarType >::computeBins(), and Euclid::Histogram::Binning::Scott< VarType >::getBinIndex().
|
private |
|
private |