Questions tagged [hmatrix]

Purely functional interface to basic linear algebra and other numerical computations, internally implemented using GSL, BLAS and LAPACK.

35 questions
0
votes
2 answers

How much space does ridge regression require?

In Haskell, ridge regression can be expressed as: import Numeric.LinearAlgebra createReadout :: Matrix Double → Matrix Double → Matrix Double createReadout a b = oA <\> oB where μ = 1e-4 oA = (a <> (tr a)) + (μ * (ident $ rows a)) oB =…
penkovsky
  • 893
  • 11
  • 14
0
votes
1 answer

Trouble installing hmatrix through MSYS2 on Windows 10

I've been trying to install hmatrix on my (64-bit) Windows 10 computer; after searching through and trying many possible solutions (including the instructions under "Windows" and "Alternative Windows Build" given here), I decided to pursue the…
0
votes
1 answer

How to parse multiple matrices from single file to hmatrix?

I have a txt file with several integer matrices with different dimensions that I want to parse into an hmatrix package representation, but I can't find any suitable functions. The text file contains the following form: [single-value] [single-row…
manews
  • 340
  • 2
  • 12
0
votes
1 answer

hMatrix breaks in a file, what could be the cause?

I have been using the hMatrix package in the ghci environment, and all works fine (I can for instance import Numeric.LinearAlgebra.HMatrix). However, when I attempt to import and utilise the same things in a script, everything breaks (I truncated…
stian
  • 1,947
  • 5
  • 25
  • 47
0
votes
1 answer

HMatrix Matrix Double - Double product

f1 :: Mesh -> Matrix Double f1 me = knx where hx :: Double (hx , _) = h me a, knx :: Matrix Double a = fromLists [[1,2], [3,4]] knx = hx * a -- knx = 2 * a I don't get why in the above function, mutliplying by 2 works whereas…
ocramz
  • 816
  • 6
  • 18
1 2
3