Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
addBiases :: Matrix Double -> Matrix Double Source #
Prepend a row of ones
>>>
addBiases $ (2><3) [20..26]
(3><3) [ 1.0, 1.0, 1.0 , 20.0, 21.0, 22.0 , 23.0, 24.0, 25.0 ]
:: StdGen | |
-> (Int, Int) | Number of rows and columns |
-> (Double, Double) | Minimal and maximal values |
-> Matrix Double |
Random matrix with elements in the range of [minVal; maxVal]
randSparse :: StdGen -> (Int, Int) -> (R, R) -> R -> Matrix R Source #
Random sparse matrix
NB: at the moment, the matrix is stored in memory as an ordinary (dense) matrix.
:: (Fractional a, Ord a) | |
=> (a, a, a) | Vertical scaling, width, offset |
-> a | |
-> a |
Hard sigmoid