npstat::MultivariateWeightedSumsqAccumulator< Precise > Class Template Reference
Detailed Descriptiontemplate<typename Precise = long double>
|
npstat::MultivariateWeightedSumsqAccumulator< Precise >::MultivariateWeightedSumsqAccumulator | ( | const unsigned long * | columns, |
unsigned | nColumns, | ||
const MultivariateWeightedSumAccumulator< 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::MultivariateWeightedSumsqAccumulator< Precise >::accumulate | ( | const T * | data, |
unsigned long | len, | ||
double | w | ||
) |
Accumulate statistics for an array (ntuple row)
Precise npstat::MultivariateWeightedSumsqAccumulator< Precise >::corr | ( | unsigned | i, |
unsigned | j | ||
) | const |
Correlation coefficient between the given variables
Matrix<Precise> npstat::MultivariateWeightedSumsqAccumulator< Precise >::corrMat | ( | ) | const |
Retrieve the correlation matrix
Precise npstat::MultivariateWeightedSumsqAccumulator< Precise >::count | ( | ) | const |
This method returns the effective number of counts which is (squared sum of weights)/(sum of squared weights)
Precise npstat::MultivariateWeightedSumsqAccumulator< Precise >::cov | ( | unsigned | i, |
unsigned | j | ||
) | const |
Covariance between the variables corresponding to the given indices (as mapped to the original indices)
Matrix<Precise> npstat::MultivariateWeightedSumsqAccumulator< Precise >::covMat | ( | ) | const |
Retrieve the covariance matrix
|
inline |
Inspect object properties
|
inline |
Mean values from the sum accumulator provided in the constructor
void npstat::MultivariateWeightedSumsqAccumulator< Precise >::reset | ( | ) |
Reset all accumulators and counters
Precise npstat::MultivariateWeightedSumsqAccumulator< Precise >::stdev | ( | unsigned | i | ) | const |
Standard deviation for the given variable
const Precise& npstat::MultivariateWeightedSumsqAccumulator< Precise >::sumsq | ( | unsigned | i, |
unsigned | j | ||
) | const |
Accumulated sums of squares or cross terms