Moore-Penrose generalized inverse. Equivalent to MASS::ginv() in R.
MASS::ginv()
Computed from the singular value decomposition; singular values not greater than tol times the largest singular value are treated as zero.
tol
A matrix (array of rows).
tol: relative tolerance for treating singular values as zero. Default: sqrt(Number.EPSILON).
sqrt(Number.EPSILON)
The generalized inverse (ncol x nrow) as an array of rows.
ncol
nrow
ginv([[1, 2], [3, 4]]); // [[-2, 1], [1.5, -0.5]]ginv([[1, 1], [1, 1]]); // [[0.25, 0.25], [0.25, 0.25]] Copy
ginv([[1, 2], [3, 4]]); // [[-2, 1], [1.5, -0.5]]ginv([[1, 1], [1, 1]]); // [[0.25, 0.25], [0.25, 0.25]]
Moore-Penrose generalized inverse. Equivalent to
MASS::ginv()in R.Computed from the singular value decomposition; singular values not greater than
toltimes the largest singular value are treated as zero.