simpleLinearRegression.simpleLinearRegression

  1. sumType!YRange[2] simpleLinearRegression(XRange x, YRange y)
  2. sumType!(Y[])[2] simpleLinearRegression(X[] x, Y[] y)
    template simpleLinearRegression(Summation summation = Summation.kbn)
    @safe
    @fmamath
    sumType!(Y[])[2]
    simpleLinearRegression
    (
    X
    Y
    )
    (
    scope const X[] x
    ,
    scope const Y[] y
    )

Parameters

x X[]

x[i] points

y Y[]

f(x[i]) values

Return Value

Type: sumType!(Y[])[2]

The pair of shift and slope of the linear curve.

Meta