matrix.dense {adelie} | R Documentation |
Creates a dense matrix object.
Description
Creates a dense matrix object.
Usage
matrix.dense(mat, method = c("naive", "cov", "constraint"), n_threads = 1)
Arguments
mat |
The dense matrix. |
method |
Method type, with default |
n_threads |
Number of threads. |
Value
Dense matrix. The object is an S4 class with methods for efficient computation by adelie.
Author(s)
Trevor Hastie and James Yang
Maintainer: Trevor Hastie hastie@stanford.edu
Examples
n <- 100
p <- 20
X_dense <- matrix(rnorm(n * p), n, p)
out <- matrix.dense(X_dense, method="naive")
A_dense <- t(X_dense) %*% X_dense
out <- matrix.dense(A_dense, method="cov")
out <- matrix.dense(X_dense, method="constraint")
[Package adelie version 1.0.8 Index]