hmatrixを使用してマトリックスの直交基盤をどのように計算しますか?
-
28-10-2019 - |
質問
orth(somematrix)
Matlabに組み込まれていますが、Haskell Hmatrixライブラリでは利用できないようです。
解決
import Numeric.LinearAlgebra
orth :: Field a => Matrix a -> [Vector a]
orth m = toColumns $ fst $ qr m
またはポイントフリー
orth = toColumns . fst . qr
ウィキペディア 説明があります。
他のヒント
おそらくこれはあなたが必要とするものです:
orth m = toColumns u
where (u,_,_) = compactSVD m
https://github.com/albertoruiz/hmatrix/issues/10#issuecomment-4077403
所属していません StackOverflow