Multiple regression: Difference between revisions

Content deleted Content added
m Moved link to text
m →‎{{header|Ruby}}: formatting
Line 27:
 
(x.t * x).inverse * x.t * y
end</lang>
</lang>
 
Testing:
<lang ruby>regression_coefficients([1, 2, 3, 4, 5], [ [2, 1, 3, 4, 5] ]) # =</lang> Matrix[[0.981818181818182]]
<lang ruby>
Output:
regression_coefficients([1, 2, 3, 4, 5], [ [2, 1, 3, 4, 5] ]) # => Matrix[[0.981818181818182]]
<pre>Matrix[[0.981818181818182]]</pre>
</lang>