matrix.standardize | R Documentation |
Creates a standardized matrix.
matrix.standardize(
mat,
centers = NULL,
scales = NULL,
weights = NULL,
ddof = 0,
n_threads = 1
)
mat |
An |
centers |
The center values. Default is to use the column means. |
scales |
The scale values. Default is to use the sample standard deviations. |
weights |
Observation weight vector, which defaults to 1/n per observation. |
ddof |
Degrees of freedom for standard deviations, with default 0 (1/n). The alternative is 1 leading to 1/(n-1). |
n_threads |
Number of threads. |
Standardized matrix. The object is an S4 class with methods for efficient computation by adelie.
James Yang, Trevor Hastie, and Balasubramanian Narasimhan
Maintainer: Trevor Hastie hastie@stanford.edu
n <- 100
p <- 20
X <- matrix(rnorm(n * p), n, p)
out <- matrix.standardize(matrix.dense(X))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.