gginv: Generalized Inverse of a Matrix using a custom tolerance or...

Description Usage Arguments Details Value Author(s) See Also

View source: R/gginv.R

Description

The gginv function creates a function that calculates the Moore-Penrose generalized inverse of a matrix X using a fixed tolerance value and a custom implementation for computing the singular value decomposition.

Usage

1
gginv(tol = sqrt(.Machine$double.eps), svd = base::svd)

Arguments

tol

A relative tolerance to detect zero singular values.

svd

A function that computes the singular value decomposition of a matrix

Details

The svd argument is expected to adhere to the interface of base::svd. It will be called as svd(x) (with the nu and nv arguments unset) and is expected to return a named list with components d, u and v.

Value

A function that accepts one argument X that computes a MP generalized inverse matrix for it.

Author(s)

Adapted implementation from the MASS package.

See Also

ginv, svd


krlmlr/grake documentation built on May 6, 2019, 6:06 p.m.