linalg-svd: svd

Description Usage Arguments Details Examples

Description

Computes the singular value decomposition.

Usage

1
linalg_svd(x, s, u = NULL, vt = NULL)

Arguments

x

Input data. The input values are overwritten.

s

Singular values.

u, vt

The left/right singular vectors. Should both be NULL or matrices of the same backend and fundamental type as x.

Details

You will need to initialize the return objects s and/or u and vt. manually. See the example.

Examples

1
2
3
4
5
6
7
8
suppressMessages(library(fmlr))
x = cpumat(3, 2)
x$fill_linspace(1, 6)

s = cpuvec()
linalg_svd(x, s)
s$info()
s$print()

fml-fam/fmlr documentation built on Jan. 16, 2022, 9:27 a.m.