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
0
votes
0 answers

Re-orthogonalizing matrix with Eigen

Is there any built-in way in Eigen to re-orthogonalize matrix? When you multiply lots of rotations, matrix will eventually need to be re-orthogonalize. There are standard techniques such as using SVD and one can certainly spend a day writing and…
Shital Shah
  • 63,284
  • 17
  • 238
  • 185
0
votes
1 answer

QR factorisation using modified Gram Schmidt

The question: For this problem, you are given a list of matrices called As, and your job is to find the QR factorization for each of them. Implement qr_by_gram_schmidt: This function takes as input a matrix A and computes a QR decomposition,…
0
votes
1 answer

Lapack Orthonormalization Function for Rectangular Matrix

I was wondering if there was a function in Lapack for orthonormalizing the columns of a very tall and skinny matrix. A similar previous question asked this question, presumably in the context of a square matrix. My setting is as follows: I have an M…
Jack Hessel
  • 103
  • 1
  • 13
0
votes
0 answers

Eigen SparseQR matrix inverse is not precise as in Matlab

In my algorithm I employ a sparse matrix inverse operation and I solve it by using the A*x=b method using the QR decomposition method. On Matlab the QR operation runs fine. However, when I tried to convert the code to C++ using the Eigen library, I…
user1389578
  • 21
  • 1
  • 3
0
votes
1 answer

Computing the Hessenberg matrix using Givens-rotations

I am making an implementation in matlab to compute the Hessenberg matrix of a given matrix A. I understand the math and i calculated it manualy but i keep comming to the same solution. Matrix A = -149.0000 -42.2037 -156.3165 537.6783 152.5511 …
user3877317
0
votes
2 answers

Different QR decomposition results with numpy and CULA

I'm performing QR decomposition in two different ways: using standard numpy method and using GEQRF LAPACK function implemented in CULA library. Here is simple example in python (PyCULA used to access CULA): from PyCULA.cula import…
grapescan
  • 251
  • 1
  • 5
  • 10
0
votes
1 answer

QR decomposition in MatLab

I have following problem. My task is to fit a polynomial to the data. I want to implenet QR algorithm using Gram-Schimdt orthogonalization process. It is built in this function: function [ Q,R ] = QRDec( A ) n = length(A(1,:)); for i=1:n Q(:,i)…
chip
  • 1
  • 1
  • 1
0
votes
1 answer

How to do QR decomposition via modified Gram-Schmidt method in C and CUDA

anyone know how to do the QR decomposition via modified Gram-Schmidt method in C and CUDA. Some example/source/paper or other else? Thanks so much. Edit: I can't answer to my question because someone have closed it, so i decided to update my…
realnot
  • 721
  • 1
  • 11
  • 31
-1
votes
1 answer

Building QR decomposition of matrix in python

I am trying to build function that performs QR decomposition, but upper triangular matrix R is not working, when I multiply it with Q the resulting matrix is different, I am not sure why it is not working properly. import numpy as np import math…
1 2 3 4
5