Matrix Ops

This section contains various matrix decomposition routines.

SVD

SVD

Description

Singular Value Decomposition (SVD) performs a decomposition such that: M=UnΣnV M = U_{n} \Sigma_{n} V^{*}

Returns

  • Matrix Un U_{n} : Orthogonal matrix
  • Matrix Σn \Sigma_{n} : Ranked singular values
  • Matrix V V^{*} : Orthogonal matrix

QR

QR

Description

Performs a decomposition such that: M=QR M = QR where Q Q is an orthogonal matrix and R R is an upper triangular matrix.

Returns

  • Matrix Q: Orthogonal matrix
  • Matrix R: Upper triangular matrix

PCA

PCA

Description

Suppose we have a data matrix X X . In Principal Component Analysis, we maximize the following relation:

F(W)=1nj=0q1WjXXWj F(W) = \frac{1}{n} \sum_{j=0}^{q-1} W_j^{\top} X^{\top} X W_j

subject to the constraint WW=I W^{\top} W = I where W W is a matrix of q q orthonomal vectors.

Returns

  • Scores: Ranked projections
  • Singular Values: Ranked eigenvalues
  • W: Ranked columnwise coefficient matrix
  • T2: Hotelling’s T-Squared
  • % Variance: Percent variance explained by each component

NNMF

NNMF

Description

Suppose we have a matrix V V with no negative values and we want the following decomposition: V=WH V = W H where W W and H H have only non-negative elements, this is known as Non-Negative Matrix Factorization.

Returns

  • Wmxp W_{m \mathrm{x} p}
  • Hpxn H_{p \mathrm{x} n}