The Open
D
Programming Language
Learn
Language
Library
Contribute
Blog
simpleLinearRegression.simpleLinearRegression
mir
math
stat
simpleLinearRegression
sumType
!
YRange
[
2
]
simpleLinearRegression
(XRange x, YRange y)
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
Source
See Implementation
mir
math
stat
simpleLinearRegression
functions
simpleLinearRegression