Questions tagged [matrix-decomposition]

In the mathematical discipline of linear algebra, a matrix decomposition or matrix factorization is a factorization of a matrix into a product of matrices.

In the mathematical discipline of linear algebra, a matrix decomposition or matrix factorization is a factorization of a matrix into a product of matrices.

In numerical analysis, different decompositions are used to implement efficient matrix algorithms.

94 questions
0
votes
1 answer

Doolittle's LU decomposition for matrices

I'm trying to implement, using python, a primitive (without import a library, such scipy or numpy) Doolittle LU decomposition for square matrices. Until now, here's my code. def luDecomposition(mat, n): lower = [[0 for x in range(n)] …
0
votes
1 answer

To find an inverse matrix of A with LU decomposition

The task asks me to generate A matrix with 50 columns and 50 rows with a random library of seed 1007092020 in the range [0,1]. import numpy as np np.random.seed(1007092020) A = np.random.randint(2, size=(3,3)) Then I have to find an inverse matrix…
0
votes
1 answer

Is Eigen library perform gaussian reduction in order to solve homogeneous system?

I used to perform Cholesky/LU decompostion to solve linear problem with Eigen but now I have to solve an Linear homogeneous system (the right hand side of my linear system is the null vector). I have to do an Gaussian reduction on my square Matrix…
Benzait Sofiane
  • 107
  • 1
  • 12
0
votes
1 answer

How to decompose 2d transform matrix and how to composite them back

I am writing some vector shape transform demo , and I am stucked: There is a transform matrix datas got from some shape : matrix = [3.23891, -0.87126, 246.73324, 1.07431, 0.86589, 169.21047, 0, 0, 1] Then I use a decomposeMatrix method (comes from…
0
votes
0 answers

Homography matrix decomposition- conversion from right hand to left hand coordinate system

How do I convert the decomposition of a homography matrix made in a right-hand coordinate system (i.e. x points right, y points down, z points into the scene) into a left-hand coordinate system (y points up)? Given a homography H and, a camera…
0
votes
1 answer

Manually calculating Pseudo inverse from SVD in R looks wrong?

A<-matrix(c(4,5,5,6,4,3,6,11,31),nrow=3,ncol=3) B B<-cov(A) [,1] [,2] [,3] [1,] 0.3333333 -0.8333333 5.0 [2,] -0.8333333 2.3333333 -17.5 [3,] 5.0000000 -17.5000000…
123123
  • 63
  • 6
0
votes
1 answer

Stable Translation from essential decomposition

When implementing monocular SLAM or Structure from Motion using single camera, translation can be estimated up to unknown scale. It is proven that without any other external information, this scale can not be determined. However, my question: How to…
0
votes
1 answer

How to update the results from a solve function to the original L and U matrices?

I can find each equation to solve but I cannot seem to update each computation's result in the original matrix. I tried to itemset in the matrix, replacing the u variables with actual result from the solve function. But then it gives the following…
Vick
  • 15
  • 6
0
votes
1 answer

Gcc gives [1] 504 ...what is this?

I compiled a c recipe and have no idea if I got ir right. It did compile. I matched a matrix to the specified format and ran: ./croutLU matrix1 & tee > b The response the first time seemed successful but "b" was empty. The second run of the same…
0
votes
1 answer

Why does scipy.linalg.lu() return the wrong decomposition matrices of square matrix B in this code?

I have the following code of which the outcome is very confusing: import numpy as np import scipy.linalg B = np.array([[2,-1,-2],[-4,6,3],[-4,-2,8]]) P,L,U = scipy.linalg.lu(B) print(L) Which returns the following: [[ 1. 0. 0. ] [ 1. 1. …
0
votes
1 answer

How to do LDL decomposition when all I have is an LU solver that always applies pivoting?

I'm hoping I'm just missing a simple trick of matrix arithmetic, but the issue I'm having is that all I have access to is an LU solver (Matlab LU* or SuperLU) and I need an LDL decomposition of a symmetric matrix A. So I thought "no problem", since…
0
votes
1 answer

What do the values of latent feature models for user and item matrix in collabarative filter represent?

When decomposing a rating matrix for recommender system, the rating matrix can be written as P* t(Q), which P represents user factor matrix and Q represents item factor matrix. The dimension of Q can be written as rank*number of items. I am…
0
votes
1 answer

Recompose Results of OpenCV RQDecomp3x3

After running RQDecomp3x3 in OpenCV, you get: mtxR – Output 3x3 upper-triangular matrix. mtxQ – Output 3x3 orthogonal matrix. Qx – Optional output 3x3 rotation matrix around x-axis. Qy – Optional output 3x3 rotation matrix around y-axis. Qz –…
0
votes
1 answer

Verilog synthesis implementing cholesky decomposition

I am implementing Cholesky decomposition in verilog, following python code below def cholesky(A): n = len(A) L = [[0.0] * n for i in xrange(n)] for i in xrange(n): for j in xrange(i+1): tmp_sum = sum(L[i][k] *…
xtt
  • 857
  • 1
  • 8
  • 24
0
votes
1 answer

How does LU decomposition with partial pivoting work?

I am using the method in which initially the elements on the main diagonal of L are set to ones (think that is Doolittle’s method, but not sure because I have seen it named differently). I know there tons of documentations, papers and books but I…
Blake
  • 149
  • 1
  • 8