SvdDecomposition<T>

Models & Types ยท AiDotNet.DecompositionMethods.MatrixDecomposition

Implements Singular Value Decomposition (SVD) for matrices.

Inheritance: MatrixDecompositionBase<T> โ†’ SvdDecomposition<T>

For Beginners

SVD is a way to break down a matrix into three simpler matrices (U, S, and V^T). Think of it like factoring a number, but for matrices. This decomposition is useful for data compression, noise reduction, and solving systems of equations.

How It Works

Singular Value Decomposition (SVD) factors a matrix A into the product A = U * S * V^T, where U and V are orthogonal matrices and S is a diagonal matrix containing singular values. SVD is one of the most important matrix decompositions with applications across many fields of science and engineering.

Real-world applications:

  • Data compression and dimensionality reduction (PCA)
  • Image compression and denoising
  • Recommender systems (collaborative filtering)

Constructors

Constructor Summary
SvdDecomposition(Matrix<T> matrix, SvdAlgorithmType svdAlgorithm, double? relativeTolerance) Initializes a new instance of the SVD decomposition for the specified matrix.

Properties

Property Summary
Matrix<T> U { get; set; } Gets the left singular vectors matrix.
Matrix<T> Vt { get; set; } Gets the transposed right singular vectors matrix.
Vector<T> S { get; set; } Gets the singular values vector.
double RelativeTolerance { get; set; } Gets the relative cutoff below which a singular value is treated as zero.
int Rank { get; set; } Gets the number of singular values above RelativeTolerance: the numerical rank of the decomposed matrix.

Methods

Method Summary
Vector<T> Solve(Vector<T> b) Solves a linear system Ax = b using the SVD decomposition.