compute_eigen_decomposition: Compute the eigendecomposition of a matrix

View source: R/generalized-replication-helpers.R

compute_eigen_decompositionR Documentation

Compute the eigendecomposition of a matrix

Description

Compute the eigendecomposition of a matrix

Usage

compute_eigen_decomposition(Sigma)

Arguments

Sigma

A symmetric matrix

Details

Computes the eigendecomposition of a symmetric matrix, either using the base R function eigen() or instead using the 'torch' package if the user has 'torch' installed and has set options(svrep.torch_device = "cpu") or options(svrep.torch_device = "cuda").

Value

A list object with two named components:

  • values: A vector of eigenvalues.

  • vectors: A matrix with eigenvectors corresponding to the eigenvalues.


bschneidr/svrep documentation built on Feb. 11, 2025, 4:24 a.m.