mir-algorithm ~master (2021-09-24T13:11:04Z)
Dub
Repo
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