| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
DataFrame.LinearAlgebra
Description
Dependency-free dense linear algebra over row-major matrices, shared by the
models in dataframe-learn. Solvers live in DataFrame.LinearAlgebra.Solve
and eigenproblems in DataFrame.LinearAlgebra.Eigen.
Synopsis
- type Matrix = Vector (Vector Double)
- dot :: Vector Double -> Vector Double -> Double
- axpy :: Double -> Vector Double -> Vector Double -> Vector Double
- scaleV :: Double -> Vector Double -> Vector Double
- matVec :: Matrix -> Vector Double -> Vector Double
- tMatVec :: Matrix -> Vector Double -> Vector Double
- gram :: Matrix -> Matrix
- transposeM :: Matrix -> Matrix
- identityM :: Int -> Matrix
- logSumExp :: Vector Double -> Double
- sqDist :: Vector Double -> Vector Double -> Double
- nearestCenter :: Vector (Vector Double) -> Vector Double -> (Int, Double)
- epsNeighbors :: Double -> Matrix -> Int -> Vector Int
Documentation
type Matrix = Vector (Vector Double) Source #
Row-major dense matrix: an outer boxed vector of equal-length rows. An
n×d matrix has n rows of length d.
matVec :: Matrix -> Vector Double -> Vector Double Source #
matVec A v for A of shape n×d and v of length d; result length n.
tMatVec :: Matrix -> Vector Double -> Vector Double Source #
tMatVec A v = Aᵀ v for A of shape n×d, v of length n; result length d.
transposeM :: Matrix -> Matrix Source #
Transpose an n×d matrix to d×n.