Skip to content

SVDResult

Module: strata.core • Kind: struct • Traits: Copyable, Movable
Source: strata/core/linalg.mojo

struct SVDResult[dtype: DType = DType.float64](Copyable, Movable)
from strata.core import SVDResult

Result of Singular Value Decomposition (A=UΣVTA = U \Sigma V^T).


def __init__(
out self,
var U: Matrix[Self.dtype],
var S: List[Scalar[Self.dtype]],
var Vt: Matrix[Self.dtype],
)

Initialize an SVDResult container.


Attribute Description
U Left singular vectors matrix of shape (M,K)(M, K).
S Singular values vector of length KK in descending order.
Vt Right singular vectors transposed matrix of shape (K,N)(K, N).