API Reference
BatchStats.BatchCorrelation — Method
BatchCorrelation(nx::Integer, ny::Integer, nbatch::Integer=16)
Initializes the BatchCorrelation matrix for nx by ny samples, upto nbatch observations can be added in a single add! call.
BatchStats.BatchVariance — Method
BatchVariance(nx::Integer)
Initializes the BatchVariance state for nx samples.
BatchStats.add! — Method
add!(ic::BatchCorrelation, X::AbstractMatrix, Y::AbstractMatrix)
Updates the correlation statistics with a batch of observations of X and Y. Every column is an observation.
BatchStats.add! — Method
add!(ic::BatchCorrelation, x::AbstractVector, y::AbstractVector)
Updates the correlation statistics with a single observation of x and y.
BatchStats.add! — Method
add!(ic::BatchCorrelation, other::BatchCorrelation)
Updates the correlation statistics in ic with the statistics in other.
BatchStats.add! — Method
add!(ic::BatchVariance, X::AbstractMatrix)
Updates the variance statistics with a batch of observation of X. Every column is an observation.
BatchStats.add! — Method
add!(ic::BatchVariance, x::AbstractVector)
Updates the variance statistics with a single observation of x.
BatchStats.add! — Method
add!(ic::BatchVariance, other::BatchVariance)
Updates the variance statistics in ic with the statistics in other.
BatchStats.getCorrelation — Method
Return Pearson's correlation matrix.
BatchStats.getCovariance — Method
getCovariance(ic::BatchCorrelation{T}; corrected = true)
Returns the covariance matrix, corrected means 1/(n-1) correction factor, otherwise 1/n where n is the number of observations.
BatchStats.getMean — Method
Returns the mean
BatchStats.getMeanX — Method
Returns the mean of the X variable.
BatchStats.getMeanY — Method
Returns the mean of the Y variable.
BatchStats.getVariance — Method
Returns the variance
BatchStats.getVarianceX — Method
Returns the variance of the X variable.
BatchStats.getVarianceY — Method
Returns the variance of the Y variable.
BatchStats.nobservations — Method
The number of observations in the statistic.
BatchStats.reset! — Method
Resets the statistics to uninitialized, useful for parallel use cases.
BatchStats.welcht — Method
welcht(x::BatchVariance, y::BatchVariance)
Computes the Welch-t statistics between x and y.
Returns a struct with fields t containing the Welch-t values, df containing the degrees of freedom, and pvalue containing the p-values.
BatchStats.welcht_one_vs_rest — Method
welcht_one_vs_rest(vars::AbstractVector{BatchVariance})
Computes the Welch-t statistics of each element of vars versus all other elements combined. All elements of vars should be a variance statistic over the same number of samples nsamples.
Returns a matrix of nsamples vs length(vars) with Welch-t values where every column i are the Welch-t values of vars[i] vs all other entries of vars combined.
BatchStats.welcht_pairwise — Method
welcht_pairwise(vars::AbstractVector{BatchVariance})
Computes the Welch-t statistics of each element of vars versus each other element. All elements of vars should be a variance statistic over the same number of samples nsamples.
Returns a 3d array of nsamples vs length(vars) vs length(vars). Every column [:, i, j] is the pairwise Welch-t between vars[i] and vars[j]. We only populate where j > i.