Data Reduction using Singular Value Decomposition
Harsha S V, Suresha. R and Vishwanatha. S
Department of Mathematics,School of Computer Science and Engineering,Jain (Deemed-to-be-University)
Email: sv.harsha@jainuniversity.ac.in, Ph: 9538571172
Motivation
Singular Value Decomposition (SVD) is like a magic trick for matrices, helping
to break down any rectangular matrix into simpler parts. Imagine you have
a giant puzzle representing your data, where each piece is a number in the
matrix. SVD helps you solve this puzzle by finding three special matrices: U,
S, and V. The U matrix shows how the pieces fit together horizontally, S tells
you the importance of each piece, and V shows how the pieces fit together
vertically. By rearranging pieces, SVD lets you see the big picture hidden
in your data, revealing its underlying patterns and structures in a way that’s
easy to understand and work with. It’s like having a secret code to unlock
the mysteries of your matrix! Figure 1: Decomposition of A into U, S and V𝑇
1. Objective 5. Image Quality
Given a dataset with a high-dimensional feature , the problem is to reduce Case 1: Evaluating image quality for a matrix size of 1024x1024 with
the dimensionality while preserving the essential information. Using SVD, the inclusion of the first 10 singular values output can be seen below:
we aim to find a lower-dimensional representation of the data that retains
as much variance as possible. This reduced representation should enable
efficient analysis and visualization of the dataset without losing critical any
information.
2. Problem Approach
• Import an image into MATLAB.
• Convert the image to grayscale.
• Reshape the gray scale image into matrices of dimensions 1024x1024.
• Implement Singular Value Decomposition (SVD) on the matrices.
• Analyse and interpret the results.
Figure 2: Size of Matrix A = 1024*1024 with K=10
Case 2: Evaluating image quality for a matrix size of 1024x1024
3. MATLAB Code while considering the first 50 singular values output can be seen below:
RGB = imread(’Shakuntaladevi.jpg’);
A = mat2gray(RGB);
A = rgb2gray(A);
A = imresize(A,[1024 1024]);
[𝑈 , 𝑆, 𝑉] = svd(A);
sv = diag(S);
k = 10 or 50 or 100;
Ak = U(:,1:k)*S(1:k,1:k)*V(:,1:k)’;
subplot(1,2,1);
imagesc(A); colormap gray; axis image; title(’ORIGINAL’)
subplot(1,2,2);
imagesc(Ak); colormap gray; axis image; title(’1-image’) Figure 3: Size of Matrix A = 1024*1024 with K=50
Case 3: Evaluating image quality for a matrix size of 1024x1024 with
the utilization of the first 100 singular values output can be seen below:
4. Rank-1 Matrices
Rank-1 matrices with different singular values offer a method for data re-
duction by capturing the essential structure of a matrix. The singular val-
ues represent the importance or significance of each corresponding rank-1
component in reconstructing the original matrix. Higher singular values in-
dicate components that contribute more significantly to the overall struc-
ture of the data, while lower singular values represent less crucial compo-
nents. By retaining only the most significant components and discarding
the rest, one can reduce the dimensionality of the data while preserving its
essential features. This process of retaining only the most important singu-
lar values and their corresponding vectors is the basis for technique of SVD,
which are widely used for dimensionality reduction and data compression.
Cases Discussed: K=10,50 and 100. Figure 4: Size of Matrix A = 1024*1024 with K=100
6. Results and Coclusion
Retaining approximately 2% of the most significant data points can reproduce the blurred image, whereas retaining approximately 10% of the data
points can reproduce an almost identical image but with a significant compromise in image quality. In conclusion, retaining approximately 20% of the
data points can reproduce the same image without compromising the quality, resulting in a saving of almost 80% of the memory storage space.