0

Let A be a matrix of dimension m×n, representing the original data set.

The QR decomposition, [Q, R] = qr (A) produces:

  • Upper triangular matrix R of the same dimension as A

  • Unitary matrix Q

so that A = Q*R

If [m, n] = size (A), then

Q is m-by-m and

R is m-by-n

How can I use QR-Decomposition to reduce the dimension (reduce the number of columns or features) of A?

Joe
  • 457
  • 5
  • 18
shdotcom
  • 125
  • 1
  • 1
  • 11
  • @Matt yes I did, but I could not find the answer, I found many articles they use singular Value decomposition (SVD) with QR-decomposition, but I do not what to use SVD. – shdotcom Feb 16 '17 at 03:59
  • I don't want to post this as an answer because I'm not sure of what you are asking for, however the tool you might need is the LQ decomposition. Given an **A** matrix with many columns, compute `L = triu(qr(A'))';`. Then `L` will contain the *condensed* information. – Jommy Feb 16 '17 at 09:46

1 Answers1

1

Generally, for rank reduction you should prefer to use the singular value decomposition unless you know that the original matrix is indeed rank deficient. This is because the svd orders the singular values, whereas the QR decomposition does not.

Nonetheless, I would suggest you try a simple example. If a matrix A is mxn with a rank of p

bremen_matt
  • 6,902
  • 7
  • 42
  • 90