The OpenD Programming Language

scale

Scales the input.

By default, the input is first centered using the mean of the input. A custom function may also be provided using centralTendency. The centered input is then divided by the sample standard deviation of the input. A custom function may also be provided using dispersion.

Overloads are also provided to scale with variables m and d, which correspond to the results of centralTendency and dispersion. This function is equivalent to center when passing d = 1.

  1. auto scale(Slice!(Iterator, N, kind) slice)
    template scale(alias centralTendency = mean!(Summation.appropriate), alias dispersion = standardDeviation!(VarianceAlgo.hybrid, Summation.appropriate))
    scale
    (
    Iterator
    size_t N
    SliceKind kind
    )
    (
    Slice!(Iterator, N, kind) slice
    )
  2. auto scale(SliceLike x)
  3. auto scale(Slice!(Iterator, N, kind) slice, T m, U d)
  4. auto scale(SliceLike x, T m, U d)

Members

Functions

scale
auto scale(Slice!(Iterator, N, kind) slice)
auto scale(SliceLike x)

Parameters

centralTendency

function used to center input, default is mean

dispersion

function used as divisor, default is dispersion

Return Value

The scaled result

See Also

center, $(SUB2REF univariate, VarianceAlgo), $(MATHREF sum, Summation), $(SUB2REF univariate, mean), $(SUB2REF univariate, standardDeviation), $(SUB2REF univariate, median), $(SUB2REF univariate, gmean), $(SUB2REF univariate, hmean), $(SUB2REF univariate, variance), $(SUB2REF univariate, dispersion)

Meta