lapack-0.3.2: bug/GGGLM.hs
module Main where
import qualified Numeric.LAPACK.Orthogonal as Ortho
import qualified Numeric.LAPACK.Matrix as Matrix
import qualified Numeric.LAPACK.Vector as Vector
import Numeric.LAPACK.Matrix (shapeInt)
import Data.Array.Comfort.Shape ((:+:)((:+:)))
main :: IO ()
main = do
let ab = Matrix.fromList (shapeInt 0) (shapeInt 0 :+: shapeInt 3) ([]::[Double])
let d = Vector.fromList (shapeInt 0) []
let xy = Vector.fromList (shapeInt 0 :+: shapeInt 3) [-3,1,2]
let a = Matrix.tallFromGeneral $ Matrix.takeLeft ab
let b = Matrix.takeRight ab
print $ Ortho.gaussMarkovLinearModel a b d
print $ Ortho.project (Matrix.wideFromGeneral ab) d xy