# Implementing SVD using Lanczos algorithm

**Description:**
The main objective of Deliverable 4 was to use the Lanczos algorithm and SVD to put the theory into practice.

After reading text files and parsing word/sentences into a matrix A, each number in A contains the frequency of a particular word appearing in each sentence.

Using SVD and Lanczos algorithm, A is decomposed into three matrices (U, S, and transpose of V).

Then, I select n number of sentences from transpose of sentence matrix V, depending on the singular matrix S.

But numerical stability needs to be further improved to handle large sets of data.

**You can find a zip file containing source codes and a screenshot of the output below.**

The zip file consists of two java files - Lanczos.java and matrix.java.

Lanczos.java contains main and methods for reading from text files containing short texts to summarize, parsing words/sentences into a matrix form, calculating SVD, and changing a symmetric matrix into a tridiagonal matrix using Lanczos algorithm.

Matrix.java contains methods for common matrix operations.