svd_like: Create a SVD-like low rank matrix factorization object

Description Usage Arguments Examples

View source: R/object-svd-like.R

Description

A low rank matrix factorization of a matrix X is parameterized by X ~= u %*% diag(d) %*% t(v). The object is "svd-like" because the middle matrix in the decomposition must be strictly diagonal.

Usage

1
svd_like(u, d, v, subclasses = NULL, ...)

Arguments

u

A matrix "left singular-ish" vectors.

d

A vector of "singular-ish" values.

v

A matrix of "right singular-ish" vectors.

subclasses

A character vector of subclasses. Optional, defaults to NULL.

...

Optional additional items to pass to the constructor.

Examples

1
2
3
4
5
6
7
s <- svd(as.matrix(trees))

# using the constructor directly
svd_like(s$u, s$d, s$v)

# coercing svd-like lists
as_svd_like(s)

LRMF3 documentation built on Feb. 10, 2022, 1:09 a.m.