Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
12
Task/Multiple-regression/Haskell/multiple-regression-1.hs
Normal file
12
Task/Multiple-regression/Haskell/multiple-regression-1.hs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import Numeric.LinearAlgebra
|
||||
import Numeric.LinearAlgebra.LAPACK
|
||||
|
||||
m :: Matrix Double
|
||||
m = (3><3)
|
||||
[7.589183,1.703609,-4.477162,
|
||||
-4.597851,9.434889,-6.543450,
|
||||
0.4588202,-6.115153,1.331191]
|
||||
|
||||
v :: Matrix Double
|
||||
v = (3><1)
|
||||
[1.745005,-4.448092,-4.160842]
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
*Main> linearSolveLSR m v
|
||||
(3><1)
|
||||
[ 0.9335611922087276
|
||||
, 1.101323491272865
|
||||
, 1.6117769115824 ]
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
*Main> inv m `multiply` v
|
||||
(3><1)
|
||||
[ 0.9335611922087278
|
||||
, 1.101323491272865
|
||||
, 1.6117769115824006 ]
|
||||
Loading…
Add table
Add a link
Reference in a new issue