[][src]Module compute::summary

A module for computing summary statistics of data.

Functions

covariance

Calculates the covariance between two vectors x and y. This is a two-pass algorithm which centers the data before computing the covariance, which improves stability but does not change the result as covariance is invariant with respect to shifts.

max

Returns the largest element in the array.

mean

Calculates the mean of an array of data points.

min

Returns the smallest element in the array.

sample_covariance

Calculates the sample covariance between two vectors x and y. This is a two-pass algorithm which centers the data before computing the covariance, which improves stability but does not change the result as covariance is invariant with respect to shifts.

sample_covariance_onepass

Calculates the covariance between two vectors x and y. This is a one-pass algorithm which shifts the data by the first element in each vector before computing the covariance, which improves stability but does not change the result as covariance is invariant with respect to shifts.

sample_covariance_online

Calculates the covariance between two vectors x and y. This is a stable one-pass online algorithm. See https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Covariance

sample_std

Calculates the sample standard deviation of an array of data points. This is the square root of the sample variance.

sample_var

Calculates the sample variance from an array of data points in a numerically stable manner using the Welford algorithm.

std

Calculates the standard deviation of an array of data points. This is the square root of the variance.

var

Calculates the population variance from an array of data points in a numerically stable manner using the Welford algorithm.

welford_mean

Calculates the mean of an array of data points using the Welford algorithm.