loss_quadratic: Quadratic Loss

Description Usage Arguments Examples

Description

loss_quadratic computes the quadratic loss.

Usage

1
loss_quadratic(S, Sinv)

Arguments

S

Covariance Estimate

Sinv

Reference Precision Matrix

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
set.seed(12345)
p <- 20
d <- sort(abs(rcauchy(p)),decreasing=TRUE)
sigma <- diag(d)
n <- 20
X <- scale(matrix(rnorm(n*p),n,p),center=FALSE,scale=1/sqrt(d))
alpha <- get_alpha(X)
lambda <- 10**(seq(-2,2,length.out=100))
sol_cv <- select_lambda(X,lambda)
loss_quadratic(sol_cv$S,solve(sigma))

Example output

[1] 1968.226

cernn documentation built on May 2, 2019, 6 a.m.

Related to loss_quadratic in cernn...