Reminder: Friends don't let friends invert matrices There's almost always a better way. @MATLAB has backslash and decomposition objects @Python has np.linalg.solve Here's a graph from Gregory Gundersen showing differences in runtime.
5
3
1
23
Just had a code clinic today, one component of which mentioned inverting large matrices (in C++). Outside of my field of expertise, but directed them to this as something to consider.
1
1
Well they were calling a C++ fn from R to invert the matrices.
1
1
I'm not sure what #rstats equivalent of @MATLAB's backslash operator is but maybe someone on here knows?
1
1
You probably want `solve()`: solve package:base R Documentation Solve a System of Equations Description: This generic function solves the equation ‘a %*% x = b’ for ‘x’, where ‘b’ can be either a vector or a matrix.

May 25, 2022 · 2:49 PM UTC

1
2