The OpenD Programming Language

mir.stat.transform

This module contains algorithms for transforming data that are useful in statistical applications.

Function NameDescription
centerSubtracts the mean (or using some other function) from each element of a slice.
robustScaleSubtracts the median and divides by the difference between a lower and upper quantile from each element of a slice.
scaleSubtracts the mean (or using some other function) and divides by the standard deviation (or using some other function) from each element of a slice.
sweepApplies a function and an operation to each element of a slice.
zscoreSubtracts the mean and divides by the standard deviation from each element of a slice.

Members

Functions

scale
auto scale(Slice!(Iterator, N, kind) slice, T m, U d)
auto scale(SliceLike x, T m, U d)

Templates

center
template center(alias centralTendency = mean!(Summation.appropriate))

Centers slice, which must be a finite iterable.

robustScale
template robustScale(F, QuantileAlgo quantileAlgo = QuantileAlgo.type7, bool allowModifySlice = false)

Scales input using robust statistics.

robustScale
template robustScale(QuantileAlgo quantileAlgo = QuantileAlgo.type7, bool allowModifySlice = false)
template robustScale(F, string quantileAlgo, bool allowModifySlice = false)
template robustScale(string quantileAlgo, bool allowModifySlice = false)
template robustScale(bool allowModifySlice)
scale
template scale(alias centralTendency = mean!(Summation.appropriate), alias dispersion = standardDeviation!(VarianceAlgo.hybrid, Summation.appropriate))

Scales the input.

sweep
template sweep(alias fun, string op)

For each e of the input, applies e op m where m is the result of fun and op is an operation, such as "+", "-", "*", or "/". For instance, if op = "-", then this function computes e - m for each e of the input and where m is the result of applying fun to the input. Overloads are provided to directly provide m to the function, rather than calculate it using fun.

sweep
template sweep(string op)
zscore
template zscore(F, VarianceAlgo varianceAlgo = VarianceAlgo.hybrid, Summation summation = Summation.appropriate)
template zscore(VarianceAlgo varianceAlgo = VarianceAlgo.hybrid, Summation summation = Summation.appropriate)
template zscore(F, string varianceAlgo, string summation = "appropriate")
template zscore(string varianceAlgo, string summation = "appropriate")

Computes the Z-score of the input.

Meta

License

Apache-2.0

The center function is borrowed from mir.math.stat.

Authors

John Michael Hall, Ilya Yaroshenko