Skip to content

Tag: linear-algebra

Cholesky factorisation not lower triangular

I am building a cholesky factorisation algorthim as proposed from the book: Linear Algebra and Optimisation for Machine Learning They provide the following algorthim: I have attempted this with python with the following algorithm: When testing this on a matrix I get upper triangular as opposed to lower triang…

np.linalg.multi_dot for R

I’m trying to do a nested dot result is effectively x.dot(M.dot(M)): In python this loop can be reduced by: Is there something similar for R? Answer As @akrun commented, you could also use Reduce:

Values in Python lists getting overwritten

I am calculating some values for a certain type of matrix A of varying sizes. Namely the backward error, forward error, condition number, and the error magnification (everything with the infinity norm). My values get calculated and then I am trying to put them into lists, looping through increasing sizes of t…