MINT2
|
#include <HyperStatisticsFinder.h>
Public Member Functions | |
HyperStatisticsFinder (int dimension, bool mean=1, bool width=1, bool widthError=1, bool keepOrderedEvents=0) | |
HyperStatisticsFinder (const HyperPoint &point, bool mean=1, bool width=1, bool widthError=1, bool keepOrderedEvents=0) | |
void | add (const HyperPoint &x) |
double | correlation (int i, int j) const |
double | covarience (int i, int j) const |
double | mean (int i) const |
double | meanError (int i) const |
double | width (int i) const |
double | getMin (int i) const |
double | getMax (int i) const |
HyperPoint | mean () const |
HyperPoint | meanError () const |
HyperPoint | width () const |
HyperPoint | getMin () const |
HyperPoint | getMax () const |
const StatisticsFinder & | getStatisticsFinder (int i) const |
virtual | ~HyperStatisticsFinder () |
Private Attributes | |
int | _dim |
std::vector< std::vector< StatisticsFinder > > | _statisticsFinders |
HyperPlot, Author: Sam Harnew, sam.h , Date: Jan 2017 arne w@gma il.c om
This class is used to find statistics (e.g. mean, width...) of a multi dimensional (Hyper) dataset. To do so it uses a 2D array of the StatisticsFinder class. I suspect there is a computationally less expensive way to do this, but this does the job for now.
Definition at line 22 of file HyperStatisticsFinder.h.
HyperStatisticsFinder::HyperStatisticsFinder | ( | int | dimension, |
bool | mean = 1 , |
||
bool | width = 1 , |
||
bool | widthError = 1 , |
||
bool | keepOrderedEvents = 0 |
||
) |
In the constuctor you decide what things you want to be stored once you start adding values. This will determine what statistics you are able to calcuate later. Also decide the dimensionality of each data point.
Definition at line 5 of file HyperStatisticsFinder.cpp.
HyperStatisticsFinder::HyperStatisticsFinder | ( | const HyperPoint & | point, |
bool | mean = 1 , |
||
bool | width = 1 , |
||
bool | widthError = 1 , |
||
bool | keepOrderedEvents = 0 |
||
) |
In the constuctor you decide what things you want to be stored once you start adding values. This will determine what statistics you are able to calcuate later. Also decide the dimensionality of each data point by passing a HyperPoint. This point is also added to the HyperStatisticsFinder
Definition at line 19 of file HyperStatisticsFinder.cpp.
|
virtual |
void HyperStatisticsFinder::add | ( | const HyperPoint & | x | ) |
add a HyperPoint to the HyperStatisticsFinder
Definition at line 35 of file HyperStatisticsFinder.cpp.
double HyperStatisticsFinder::correlation | ( | int | i, |
int | j | ||
) | const |
get the correlation coefficient of dimesnions i and j
Definition at line 50 of file HyperStatisticsFinder.cpp.
double HyperStatisticsFinder::covarience | ( | int | i, |
int | j | ||
) | const |
get the covarience of dimesnions i and j
Definition at line 61 of file HyperStatisticsFinder.cpp.
double HyperStatisticsFinder::getMax | ( | int | i | ) | const |
get the maximum in a given dimension
Definition at line 96 of file HyperStatisticsFinder.cpp.
HyperPoint HyperStatisticsFinder::getMax | ( | ) | const |
get a HyperPoint filled with the maximum of each dimension
Definition at line 127 of file HyperStatisticsFinder.cpp.
double HyperStatisticsFinder::getMin | ( | int | i | ) | const |
get the minimum in a given dimension
Definition at line 92 of file HyperStatisticsFinder.cpp.
HyperPoint HyperStatisticsFinder::getMin | ( | ) | const |
get a HyperPoint filled with the minimum of each dimension
Definition at line 121 of file HyperStatisticsFinder.cpp.
|
inline |
get the statistics finder for a specific dimesion
Definition at line 77 of file HyperStatisticsFinder.h.
double HyperStatisticsFinder::mean | ( | int | i | ) | const |
get the mean in a given dimension
Definition at line 80 of file HyperStatisticsFinder.cpp.
HyperPoint HyperStatisticsFinder::mean | ( | ) | const |
get a HyperPoint filled with the mean of each dimension
Definition at line 103 of file HyperStatisticsFinder.cpp.
double HyperStatisticsFinder::meanError | ( | int | i | ) | const |
get the meanError in a given dimension
Definition at line 84 of file HyperStatisticsFinder.cpp.
HyperPoint HyperStatisticsFinder::meanError | ( | ) | const |
get a HyperPoint filled with the error on the mean of each dimension
Definition at line 109 of file HyperStatisticsFinder.cpp.
double HyperStatisticsFinder::width | ( | int | i | ) | const |
get the width in a given dimension
Definition at line 88 of file HyperStatisticsFinder.cpp.
HyperPoint HyperStatisticsFinder::width | ( | ) | const |
get a HyperPoint filled with the width of each dimension
Definition at line 115 of file HyperStatisticsFinder.cpp.
|
private |
dimension of the HyperStatisticsFinder
Definition at line 24 of file HyperStatisticsFinder.h.
|
private |
matrix of StatisticsFinder's. Need a matrix rather than a vector in order to calculate the covarience between two dimensions.
Definition at line 27 of file HyperStatisticsFinder.h.