Handbook
Glossary
(push-values) ( regress x y -- regress )
Vocabulary
math
.
statistics
.
running
.
private
Inputs
regress
an
object
x
an
object
y
an
object
Outputs
regress
an
object
Definition
USING:
accessors
kernel
math
math.statistics.running
;
IN:
math.statistics.running.private
::
(push-values)
( regress x y -- regress )
regress
n>>
:>
n regress
x-stats>>
mean
x
-
regress
y-stats>>
mean
y
-
*
n
*
n 1
+
/
regress
[
+
]
change-xy
[
x-stats>>
x
push-value
drop
]
[
y-stats>>
y
push-value
drop
]
[
[
1
+
]
change-n
]
tri
;