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
2 answers

Applying a matrix decomposition for classification using a saved W matrix

I'm performing an NMF decomposition on a tf-idf input in order to perform topic analysis. def decomp(tfidfm, topic_count): model = decomposition.NMF(init="nndsvd", n_components=topic_count, max_iter=500) H = model.fit_transform(tfidfm) …
Thomas Kimber
  • 10,601
  • 3
  • 25
  • 42
0
votes
1 answer

What is the difference between computeScalingRotation and computeRotationScaling

In the documentation of Eigen's Transform class, there are two member functions with almost identical signatures: void computeRotationScaling(RotationMatrixType*, ScalingMatrixType*) const void computeScalingRotation(ScalingMatrixType*,…
Henricus V.
  • 898
  • 1
  • 8
  • 29
0
votes
1 answer

How to output 2 or more arrays in a fortran's function?

I am writing a program which computes the LU decomposition of a matrix, with partial pivoting, and I would like the function to output several (2 or 3) matrices without running the program several times to output each one individually, which is a…
0
votes
0 answers

Most efficient method for computing Singular Value Decomposition for an upper triangular matrix?

There are several methods available for computing SVD of a general matrix. I am interested to know about the best approach which could be used for computing SVD of an upper triangular matrix. Please suggest me an algorithm which could be optimized…
sv_jan5
  • 1,543
  • 16
  • 42
0
votes
0 answers

Writing an R function that outputs maximum likelihood estimates?

How would I write an R function that takes a response vec y and covariate matrix X and outputs a vector of maximum likelihood estimates of coefficients β where μ = Xβ And E[Y] = μ, where Y is an exponentially distributed random vector? I can use the…
Fenn Cris
  • 1
  • 2
0
votes
1 answer

2D image decomposition

I have a matrix and I want to decompose it into different matrices with low to high frequency limit. As I have noticed, it can be done using wavelet transform. I found something like the figure below for 1D signal and I want to do similar procedure…
0
votes
1 answer

How Matlab equality approximation works?

In the following code, I followed a procedure to create a random positive definite matrix P. At first, I created a singular value decomposition [U,S,V] of a random array A and I am trying to verify that in fact U'*U==U*U'=I (where I is the identity…
mgus
  • 808
  • 4
  • 17
  • 39
0
votes
1 answer

R function for Matrix Multiplication and Addition

After performing SVD on a matrix, I would like to create a function (I'm not good with functions in R yet) that creates a reduced matrix per my specified n-value. For instance, here is the R code for what I have now. scores = c(3,1,1,-1,3,1) Mat =…
MAJ Les
  • 13
  • 1
  • 1
  • 4
0
votes
1 answer

Reorder eigenvalues in Schur factorization in Eigen library

I am using Eigen library with Eclipse C++. I wonder if there is a method or a function that I can use to reorder the Schur factorization X = UTU' produced by the RealSchur function and return the reordered Schur matrix TS and the cumulative…
M.A.
  • 169
  • 1
  • 1
  • 18
0
votes
2 answers

C - stack smashing detected

I need to implement a pretty easy in-place LU-decomposition of matrix A. I'm using Gaussian elimination and I want to test it with a 3x3 matrix. The problem is, I keep getting stack smashing error and I don't have any idea why. I don't see any…
Eenoku
  • 2,741
  • 4
  • 32
  • 64
0
votes
0 answers

faster alternatives to solve()

If chol2inv(chol(matrix)) is not applicable to my matrix (not a positive-definite square matrix), is there any other alternative methods in R to do matrix inversion (or avoiding the inversion). I am attempting to invert matrices of size 10K by 10K…
SOUser
  • 610
  • 1
  • 11
  • 25
0
votes
2 answers

PETSc - MatLUFactor - No support for this operation for this object type

I'm trying to program LU decomposition app in PETSc. My idea was, that the program will print the unfactorized matrix, then the factorized matrix and count time taken by a factorization itself. I've written my code according to little information…
Eenoku
  • 2,741
  • 4
  • 32
  • 64
0
votes
2 answers

LU Decomposition N^3

Suppose I have a square N X N symmetric real matrix A, and that I want to compute the LU decomposition of A. What is the complexity (e.g. O(N^2), O(N^3), etc...) of the best algorithm to do this If A is a dense matrix If A is a sparse matrix?
James
  • 383
  • 1
  • 4
  • 15
0
votes
1 answer

Java Concurrent - Thread synchronization in Fork/Join - LU decomposition

During developing a Java software, I asked here Java Concurrent - no speedUp gained LU algorithm - False sharing? why I don't have no speed up parallelizing this code using CyclicBarrier. public void decompose(){ int n = A.length; for(int…
0
votes
1 answer

Ruby Matrix::Eigenvalue Decomposition error

I looked at the eigenvector matrix of a given matrix, but when I try to inverse it I have an error in eigenvector_matrix_inv(). require 'matrix' m = Matrix[ [0.5703125, 1.8369140625, 0.0, 0.0], [-0.6875, -0.4609375, 0.0, 0.0], …
Cedric H.
  • 7,980
  • 10
  • 55
  • 82