npstat::MultivariateSumsqAccumulator< Precise > Class Template Reference
Detailed Descriptiontemplate<typename Precise = long double>
|
npstat::MultivariateSumsqAccumulator< Precise >::MultivariateSumsqAccumulator | ( | const unsigned long * | columns, |
unsigned | nColumns, | ||
const MultivariateSumAccumulator< Precise2 > & | sums | ||
) |
To calculate covariances for select columns only, use this constructor with a non-trivial column map. Statistics will be accumulated only for the columns included in the "columns" argument. This can be useful for speeding up the code, as the computational complexity of covariance matrix calculations increases as the number of columns squared.
|
explicit |
Constructor with a trivial column map
void npstat::MultivariateSumsqAccumulator< Precise >::accumulate | ( | const T * | data, |
unsigned long | len | ||
) |
Accumulate statistics for an array (ntuple row)
void npstat::MultivariateSumsqAccumulator< Precise >::accumulateSample | ( | const T * | data, |
unsigned long | len, | ||
unsigned long | chunkSize | ||
) |
Accumulate statistics multiple arrays of size "chunkSize"
Precise npstat::MultivariateSumsqAccumulator< Precise >::corr | ( | unsigned | i, |
unsigned | j | ||
) | const |
Correlation coefficient between the given variables
Matrix<Precise> npstat::MultivariateSumsqAccumulator< Precise >::corrMat | ( | ) | const |
Retrieve the correlation matrix
Precise npstat::MultivariateSumsqAccumulator< Precise >::cov | ( | unsigned | i, |
unsigned | j | ||
) | const |
Covariance between the variables corresponding to the given indices (not mapped to the original indices)
Matrix<Precise> npstat::MultivariateSumsqAccumulator< Precise >::covMat | ( | ) | const |
Retrieve the covariance matrix
|
inline |
Inspect object properties
|
inline |
Mean values from the sum accumulator provided in the constructor
void npstat::MultivariateSumsqAccumulator< Precise >::reset | ( | ) |
Reset all accumulators and counters
Precise npstat::MultivariateSumsqAccumulator< Precise >::stdev | ( | unsigned | i | ) | const |
Standard deviation for the given variable
const Precise& npstat::MultivariateSumsqAccumulator< Precise >::sumsq | ( | unsigned | i, |
unsigned | j | ||
) | const |
Accumulated sums of squares or cross terms