This structure is a visual aid to study the distributions of data set variables. More...
#include <statistics.h>
Public Member Functions | |
Histogram () | |
Default constructor. More... | |
Histogram (const Index &) | |
Bins number constructor. More... | |
Histogram (const Tensor< type, 1 > &, const Tensor< Index, 1 > &) | |
Values constructor. More... | |
Histogram (const Tensor< type, 1 > &, const Index &) | |
Data constructor. More... | |
Histogram (const Tensor< type, 1 > &) | |
Probabillities constructor. More... | |
virtual | ~Histogram () |
Destructor. More... | |
Index | get_bins_number () const |
Returns the number of bins in the histogram. More... | |
Index | count_empty_bins () const |
Returns the number of bins with zero variates. More... | |
Index | calculate_minimum_frequency () const |
Returns the number of variates in the less populated bin. More... | |
Index | calculate_maximum_frequency () const |
Returns the number of variates in the most populated bin. More... | |
Index | calculate_most_populated_bin () const |
Retuns the index of the most populated bin. More... | |
Tensor< type, 1 > | calculate_minimal_centers () const |
Returns a vector with the centers of the less populated bins. More... | |
Tensor< type, 1 > | calculate_maximal_centers () const |
Returns a vector with the centers of the most populated bins. More... | |
Index | calculate_bin (const type &) const |
Index | calculate_frequency (const type &) const |
void | save (const string &) const |
Public Attributes | |
Tensor< type, 1 > | centers |
Positions of the bins in the histogram. More... | |
Tensor< type, 1 > | minimums |
Minimum positions of the bins in the histogram. More... | |
Tensor< type, 1 > | maximums |
Maximum positions of the bins in the histogram. More... | |
Tensor< Index, 1 > | frequencies |
Population of the bins in the histogram. More... | |
This structure is a visual aid to study the distributions of data set variables.
This structure contains the essentials for making histograms and obtain the data generated by the histogram :
Definition at line 149 of file statistics.h.
|
explicit |
Default constructor.
Definition at line 210 of file statistics.cpp.
|
explicit |
Bins number constructor.
Bins number constructor.
bins_number | Number of bins in the histogram. |
Definition at line 221 of file statistics.cpp.
|
explicit |
Values constructor.
Values constructor.
new_centers | Center values for the bins. |
new_frequencies | Number of variates in each bin. |
Definition at line 232 of file statistics.cpp.
|
explicit |
Data constructor.
Data constructor
data | Numerical data. |
number_of_bins | Number of bins. |
Definition at line 244 of file statistics.cpp.
|
explicit |
Probabillities constructor.
Probabilities constructor
probability_data | Numerical probabilities data. |
Definition at line 280 of file statistics.cpp.
|
virtual |
Destructor.
Definition at line 215 of file statistics.cpp.
Index calculate_bin | ( | const type & | value | ) | const |
Returns the number of the bin to which a given value belongs to.
value | Value for which we want to get the bin. |
Definition at line 464 of file statistics.cpp.
Index calculate_frequency | ( | const type & | value | ) | const |
Returns the frequency of the bin to which a given value belongs to.
value | Value for which we want to get the frequency. |
Definition at line 508 of file statistics.cpp.
Tensor< type, 1 > calculate_maximal_centers | ( | ) | const |
Returns a vector with the centers of the most populated bins.
Definition at line 422 of file statistics.cpp.
Index calculate_maximum_frequency | ( | ) | const |
Returns the number of variates in the most populated bin.
Definition at line 358 of file statistics.cpp.
Tensor< type, 1 > calculate_minimal_centers | ( | ) | const |
Returns a vector with the centers of the less populated bins.
Definition at line 381 of file statistics.cpp.
Index calculate_minimum_frequency | ( | ) | const |
Returns the number of variates in the less populated bin.
Definition at line 350 of file statistics.cpp.
Index calculate_most_populated_bin | ( | ) | const |
Retuns the index of the most populated bin.
Definition at line 366 of file statistics.cpp.
Index count_empty_bins | ( | ) | const |
Returns the number of bins with zero variates.
Definition at line 333 of file statistics.cpp.
Index get_bins_number | ( | ) | const |
Returns the number of bins in the histogram.
Definition at line 325 of file statistics.cpp.
void save | ( | const string & | histogram_file_name | ) | const |
Definition at line 522 of file statistics.cpp.
Tensor<type, 1> centers |
Positions of the bins in the histogram.
Definition at line 199 of file statistics.h.
Tensor<Index, 1> frequencies |
Population of the bins in the histogram.
Definition at line 211 of file statistics.h.
Tensor<type, 1> maximums |
Maximum positions of the bins in the histogram.
Definition at line 207 of file statistics.h.
Tensor<type, 1> minimums |
Minimum positions of the bins in the histogram.
Definition at line 203 of file statistics.h.