ML_101
  • Introduction
  • ML Fundamentals
    • Basics
    • Optimization
    • How to prevent overfitting
    • Linear Algebra
    • Clustering
    • Calculate Parameters in CNN
    • Normalization
    • Confidence Interval
    • Quantization
  • Classical Machine Learning
    • Basics
    • Unsupervised Learning
  • Neural Networks
    • Basics
    • Activation function
    • Different Types of Convolution
    • Resnet
    • Mobilenet
  • Loss
    • L1 and L2 Loss
    • Hinge Loss
    • Cross-Entropy Loss
    • Binary Cross-Entropy Loss
    • Categorical Cross-Entropy Loss
    • (Optional) Focal Loss
    • (Optional) CORAL Loss
  • Computer Vision
    • Two Stage Object Detection
      • Metrics
      • ROI
      • R-CNN
      • Fast RCNN
      • Faster RCNN
      • Mask RCNN
    • One Stage Object Detection
      • FPN
      • YOLO
      • Single Shot MultiBox Detector(SSD)
    • Segmentation
      • Panoptic Segmentation
      • PSPNet
    • FaceNet
    • GAN
    • Imbalance problem in object detection
  • NLP
    • Embedding
    • RNN
    • LSTM
    • LSTM Ext.
    • RNN for text prediction
    • BLEU
    • Seq2Seq
    • Attention
    • Self Attention
    • Attention without RNN
    • Transformer
    • BERT
  • Parallel Computing
    • Communication
    • MapReduce
    • Parameter Server
    • Decentralized And Ring All Reduce
    • Federated Learning
    • Model Parallelism: GPipe
  • Anomaly Detection
    • DBSCAN
    • Autoencoder
  • Visualization
    • Saliency Maps
    • Fooling images
    • Class Visualization
Powered by GitBook
On this page
  • The Rank of a Matrix
  • Singular Value Decomposition
  • Formula
  • Properties
  • Interpretation

Was this helpful?

  1. ML Fundamentals

Linear Algebra

PreviousHow to prevent overfittingNextClustering

Last updated 3 years ago

Was this helpful?

The Rank of a Matrix

You can think of an r×cr \times cr×c matrix as a set of rrr row , each having ccc elements; or you can think of it as a set of ccc column vectors, each having rrr elements.

The rank of a matrix is defined as (a) the maximum number of column vectors in the matrix or (b) the maximum number of linearly independent rowrowrow vectors in the matrix. Both definitions are equivalent.

For an r×cr \times cr×c matrix,

  • If rrr is less than ccc, then the maximum rank of the matrix is rrr.

  • If rrr is greater than ccc, then the maximum rank of the matrix is ccc.

The rank of a matrix would be zero only if the matrix had no elements. If a matrix had even one element, its minimum rank would be one.

For example, the following matrix has rank of 2.

X=(12443480)X = \begin{pmatrix} 1 & 2 & 4 & 4 \\ 3 & 4 & 8 & 0 \end{pmatrix}X=(13​24​48​40​)

Formula

A[m×n]=U[m×r]Σ[r×r](V[n×r])TA_{[m \times n]}=U_{[m \times r]} \Sigma_{[r \times r]} (V_{[n \times r]})^TA[m×n]​=U[m×r]​Σ[r×r]​(V[n×r]​)T

  • A: Input data matrix

  • U: left singular vectors

  • V: Right singular vectors

Properties

    • (Columns are orthogonal unit vectors)

Interpretation

  • U: user-to-concept similarity matrix

  • V: movie-to-concept similarity matrix

m×nm \times nm×n matrix (e.g. m documents, n terms)

m×rm \times rm×r matrix (m documents, r concepts)

Σ\SigmaΣ: Singular values

r×rr \times rr×r diagonal matrix (strength of each concept) (r: rank of matrix A)

n×rn \times rn×r matrix (n terms, r concepts)

It is always possible to decompose a real matrix A into A=UΣVTA=U \Sigma V^TA=UΣVT, where

U,Σ,VU, \Sigma, VU,Σ,V: unique

U,VU, VU,V: column orthonormal

UTU=IU^T U = IUTU=I; VTV=IV^T V = IVTV=I (I: identity matrix)

Σ\SigmaΣ: diagonal

Entries (singular values) are positive, and sorted in decreasing order (σ1≥σ2≥⋯≥0\sigma_1 \geq \sigma_2 \geq \cdots \geq 0σ1​≥σ2​≥⋯≥0)

Σ\SigmaΣ: its diagonal elements strength of each concept

vectors
linearly independent
Singular Value Decomposition