kmath icon indicating copy to clipboard operation
kmath copied to clipboard

SVD support for matrices

Open Ixw123 opened this issue 6 years ago • 1 comments

implement commons-math implementation of http://commons.apache.org/proper/commons-math/apidocs/org/apache/commons/math4/linear/SingularValueDecomposition.html for java backend

Look into implementation for Koma backend

Ixw123 avatar Feb 21 '19 16:02 Ixw123

@Ixw123 you now can use DoubleTensorAlgebra, also SVD is supported in kmath-ejml:

import space.kscience.kmath.ejml.EjmlLinearSpaceDDRM
import space.kscience.kmath.linear.SingularValueDecompositionFeature
import space.kscience.kmath.linear.getFeature
import space.kscience.kmath.linear.invoke
import space.kscience.kmath.linear.one

EjmlLinearSpaceDDRM {
    val svd = getFeature<Double, SingularValueDecompositionFeature<Double>>(one(1, 2))!!
    println(svd.singularValues)
}

CommanderTvis avatar May 20 '21 14:05 CommanderTvis