![]() |
SynAPSE
0.6.0
Synergistic Analysis of Phase Space Evolution
|
Computes the Optimal Binning density estimator of a set of points. More...
#include <OptimalBinning.hh>
Public Member Functions | |
| OptimalBinning () | |
| Default constructor, initilizes everything to 0. More... | |
| OptimalBinning (const std::vector< std::vector< double >> &points, const std::string algo="scott", const bool interp=true, const bool ex=true) | |
| Cloud constructor, sets vector of points and their mapping for a point cloud. More... | |
| OptimalBinning (const OptimalBinning &ob) | |
| Copy constructor. More... | |
| OptimalBinning & | operator= (const OptimalBinning &ob) |
| Equality operator. More... | |
| double | operator() (const std::vector< double > &v) const |
| Overloaded function operator, calls Evaluate. More... | |
| double | operator() (const double &v) const |
| Overloaded function operator, calls Evaluate. More... | |
| double | operator() (const double *v) const |
| Overloaded function operator, calls Evaluate. More... | |
| ~OptimalBinning () | |
| Destructor. More... | |
| void | Initialize (const std::vector< std::vector< double >> &points, const std::string &algo) |
| Initializes the histogram with the optimal binning. More... | |
| double | Evaluate (const std::vector< double > &v) const |
| Performs the density estimation at an n-point v. More... | |
| double | Evaluate (const double &v) const |
| Performs the density estimation at an n-point v. More... | |
| double | Evaluate (const double *v) const |
| Performs the density estimation at an n-point v. More... | |
| const std::vector< double > & | GetLowerBoundArray () const |
| Returns the array of lower bounds in each dimension. More... | |
| const double & | GetLowerBound (const size_t i=0) const |
| Returns the lower bound in dimension i. More... | |
| const std::vector< double > & | GetUpperBoundArray () const |
| Returns the array of upper bounds in each dimension. More... | |
| const double & | GetUpperBound (const size_t i=0) const |
| Returns the upper bound in dimension i. More... | |
| size_t | GetNbins (const size_t i=0) const |
| Returns the amount of bins in one projection. More... | |
| std::vector< TPolyLine * > | Meshing () const |
| Returns the meshing, used to build the interpolation, as polygons. More... | |
Private Attributes | |
| size_t | _dim |
| Dimension of the space the estimator lives in. More... | |
| Histogram | _hist |
| Optimal histogram for density estimation. More... | |
| Interpolator | _int |
| Grid interpolator. More... | |
| bool | _interp |
| Apply grid interpolation if true. More... | |
| bool | _ex |
| Extrapolate if true. More... | |
Computes the Optimal Binning density estimator of a set of points.
This method finds the optimal binning of the space by an array of different methods. The amount of data points in each bin is directly related to the density in the bin.
| OptimalBinning::OptimalBinning | ( | ) |
Default constructor, initilizes everything to 0.
| OptimalBinning::OptimalBinning | ( | const std::vector< std::vector< double >> & | points, |
| const std::string | algo = "scott", |
||
| const bool | interp = true, |
||
| const bool | ex = true |
||
| ) |
Cloud constructor, sets vector of points and their mapping for a point cloud.
| points | N points in a _dim dimensional space |
| algo | Algorithm to be used for binning optimization |
| interp | Perform an interpolation on the histogram if requested |
| ex | Extrapolate outside the outmost points if requested |
| OptimalBinning::OptimalBinning | ( | const OptimalBinning & | ob | ) |
Copy constructor.
| OptimalBinning::~OptimalBinning | ( | ) |
Destructor.
| double OptimalBinning::Evaluate | ( | const std::vector< double > & | v | ) | const |
Performs the density estimation at an n-point v.
| v | Vector of coordinates of the n-point |
| double OptimalBinning::Evaluate | ( | const double & | v | ) | const |
Performs the density estimation at an n-point v.
| v | One dimensional value of the point |
| double OptimalBinning::Evaluate | ( | const double * | v | ) | const |
Performs the density estimation at an n-point v.
| v | Pointer to an array of coordinates of the n-point |
|
inline |
Returns the lower bound in dimension i.
|
inline |
Returns the array of lower bounds in each dimension.
|
inline |
Returns the amount of bins in one projection.
|
inline |
Returns the upper bound in dimension i.
|
inline |
Returns the array of upper bounds in each dimension.
| void OptimalBinning::Initialize | ( | const std::vector< std::vector< double >> & | points, |
| const std::string & | algo | ||
| ) |
Initializes the histogram with the optimal binning.
| points | vector of points of n dimensions |
| algo | Algorithm to be used for binning optimization |
| std::vector< TPolyLine * > OptimalBinning::Meshing | ( | ) | const |
Returns the meshing, used to build the interpolation, as polygons.
|
inline |
Overloaded function operator, calls Evaluate.
| v | Vector of coordinates |
|
inline |
Overloaded function operator, calls Evaluate.
| v | One dimensional value |
|
inline |
Overloaded function operator, calls Evaluate.
| v | Pointer to an array of coordinates |
| OptimalBinning & OptimalBinning::operator= | ( | const OptimalBinning & | ob | ) |
Equality operator.
|
private |
Dimension of the space the estimator lives in.
|
private |
Extrapolate if true.
|
private |
Optimal histogram for density estimation.
|
private |
Grid interpolator.
|
private |
Apply grid interpolation if true.
1.8.6