Category "linear-algebra"

Matrix multiplication of an Eigen Matrix for a subset of columns

What is the fastest method for matrix multiplication of an Eigen::Matrix over a random set of column indices? Eigen::MatrixXd mat = Eigen::MatrixXd::Random(100,

Python Numpy - Treat really small numbers as zero

I want to calculate the Determinant of a Singular Matrix (which has a 0 determinant) with Numpy and when I print the determinant it shows a really small number

Why is numpy.linalg.pinv() preferred over numpy.linalg.inv() for creating inverse of a matrix in linear regression

If we want to search for the optimal parameters theta for a linear regression model by using the normal equation with: theta = inv(X^T * X) * X^T * y one step

Linear index upper triangular matrix

If I have the upper triangular portion of a matrix, offset above the diagonal, stored as a linear array, how can the (i,j) indices of a matrix element be extrac

Calculate a 2D homogeneous perspective transformation matrix from 4 points in MATLAB

I've got coordinates of 4 points in 2D that form a rectangle and their coordinates after a perspective transformation has been applied. The perspective trans