Questions tagged [qr-decomposition]

QR factorization is an important type of matrix factorization in scientific computing. It is commonly used for generating orthonormal basis and solving least squares problem.

The standard scientific library supports Householder QR factorization with or without pivoting via dgeqrf and dgeqp3.

The scientific software for statistical computing and graphics has a built-in function qr(, LAPACK = TRUE) that interfaces dgeqp3. Note that if LAPACK = FALSE (default), the factorization is implemented with a modified LINPACK routine that can detect numerical rank. This is used for lm and glm functions that fits linear models and generalized linear models.

69 questions
2
votes
3 answers

QR decomposition in OpenCV

OpenCV provides SVD decomposition, but I cannot find general QR decomposition in its library. Is there any alternative to achieve this?
Xiaolong
  • 239
  • 1
  • 3
  • 12
1
vote
2 answers

How to get the pivot and rank from Matrix::qr() like that of base::qr()?

When applying Matrix::qr() on the sparse matrix in R, the output is quite different from that of base::qr. There are V, beta, p, R, q but not rank and pivot. Below is a small example code. I want to detect linear dependent columns of the A sparse…
1
vote
1 answer

QR method for eigenvectors Python

I am trying to find the eigenvectors of matrix A using QR method. I found the eigenvalues and eigenvector which corresponds to the largest eigenvalue. How do I find the rest of the eigenvectors without using numpy.linalg.eig? import numpy as np A =…
1
vote
1 answer

What is the algorithm used in QRF_ALT function in linear Algebra library provided with the Xilinx Vivado_HLS?

Along with Vivado HLS installation a linear algebra library is provided. Within this library there is this function QRF_ALT, which is supposed to be a high throughput version of Qrf-basic: QR decomposition which uses givens rotations. My question is…
1
vote
0 answers

QR decomposition in Eigen C++ - sign problem

I need to compute some determinants for a project: I use c++ 14 and Eigen. So, MatrixXd A is a Eigen matrix with X rows and X cols and contains double values. To compute determinant I use A.determinant(). Let's pretend that A.determinant() is equal…
dacian
  • 95
  • 1
  • 8
1
vote
0 answers

HouseHolder Transformation-QR Decomposition

I am working on QR factorization, the code is working here but my problem is, for example, there is an array dimension(6,4) but I want to decompose dimension(6,2). I use the subroutine(dgeqrf) so Should I use a different one or not? That subroutine…
Nobody
  • 79
  • 13
1
vote
1 answer

What can we do with a tensor factorization?

I have three questions about tensor factorization. what is the case(or application) for tensor factorization(decomposition)? how likely is this to become a mainstream technology in the future? how do you use it?
S.Kang
  • 581
  • 2
  • 10
  • 28
1
vote
1 answer

QR decomposition in TensorFlow

I saw that there are methods for doing Cholesky decomposition, and solving linear systems using a QR method in TensorFlow, however, I cannot find a way to implement a QR decomposition in TensorFlow. How do you perform a QR decomposition in…
kstan0725
  • 11
  • 2
1
vote
1 answer

Calculating R matrix in QR decomposition with column pivoting in R

I have a matrix A which can get by following code: b = matrix(c(20, 33, 10, 12, 14, 22, 34, 55, 11, 40, 0, 0, 0, 0, 0, 33,40, 66, 78, 90, 11, 45, 32, 55, 65), nrow = 5, ncol= 5) A =crossprod(b) > A …
rose
  • 1,971
  • 7
  • 26
  • 32
1
vote
1 answer

Root finding with companion matrix

I would like to find all the real roots of a univariate polynomial. I could use Jenkins-Traub algorithm for example, but I want to learn how to solve it using the companion matrix. I know how to turn a polynomial to companion matrix and I found a…
Ecir Hana
  • 10,864
  • 13
  • 67
  • 117
1
vote
1 answer

QR decomposition in Math.NET Numerics

How is QR decomposition implemented in Math.NET Numerics? Is it with Gram-Schimdt or with Givens rotations? I have a feeling that it is implemented with Gram-Schimdt, but I'm not sure. I can't find the implementation. Is QR decomposition with…
Stefan P.
  • 331
  • 6
  • 23
0
votes
0 answers

LAPACKE_dgeqrf/LAPACKE_dorgqr: How to generate matrix Q of the QR factorization of an orthogonal matrix that has more rows than columns

Introduction: I'm using the Intel Math Kernel Library (MKL) functions LAPACKE_dgeqrf and LAPACKE_dorgqr for generating the QR decomposition of a general input matrix A of size (m x n) stored in row-major order, (where m is the number of A's rows and…
101010
  • 41,839
  • 11
  • 94
  • 168
0
votes
1 answer

How to tridiagonalize a symmetric matrix with Householder transformations?

I am following this notes to tridiagonalize a symmetric matrix using Householder transformations. The above note has an example worked out in page two. Let me paste my code written in python below. Although this code did the job for a particular…
0
votes
0 answers

Pivot matrix in Eigen QR decomposition

Is there any way to get the pivot matrix in Eigen when doing QR decomposition? I use ColPivHouseholderQR which performs AP = QR and I don't get how can I have access to matrix P. Thanks in advance I need to have the permutation/pivot and I don't…
Hamed
  • 11
  • 3
0
votes
0 answers

Python implementation of Francis double step QR iteration algorithm does not converge

I am implementing the Francis double step QR Iteration algorithm using the notes and psuedocode from lecture https://people.inf.ethz.ch/arbenz/ewp/Lnotes/chapter4.pdf - Algorithm 4.5 The psuedocode is provided in Matlab I believe. Below is the…