Is your feature request related to a problem? Please describe.
As pointed out in the fslab discord channel there is no requirement for Matrix.nullspace to be guarded by the HasService query. The SVD works even if no service is available.
Describe the solution you'd like
The condition could simply be removed. The results may be different for different SVD implementations. Unit tests should be added to ensure the validity of the nullspace result.
Additional context
The matrix multiplied with its nullspace must result in zeros. It's up to discussion what the threshold for the singular value filtering should be (currently it is set to 1E-05).
let m =
[|
[|1.;1.;2.|]
[|3.;2.;1.;|]
|]
|> matrix
let ns = Algebra.LinearAlgebra.nullspace m
m * ns
val it: Matrix<float> = matrix [[-3.330669074e-16]
[-3.885780586e-16]]
Is your feature request related to a problem? Please describe. As pointed out in the fslab discord channel there is no requirement for Matrix.nullspace to be guarded by the HasService query. The SVD works even if no service is available.
Describe the solution you'd like The condition could simply be removed. The results may be different for different SVD implementations. Unit tests should be added to ensure the validity of the nullspace result.
Additional context The matrix multiplied with its nullspace must result in zeros. It's up to discussion what the threshold for the singular value filtering should be (currently it is set to 1E-05).