CV_lbd: Cross validation to select lambda

Description Usage Arguments Value

View source: R/CV.R

Description

Cross-validation to select λ for estimating the precision matrix of Z. Split the data into two parts. Estimating Cov(Z) on two datasets. Then, for each value in lbdGrids, calculate Omega on the first dataset and calculate the loss on the second dataset. Choose the value which minimizes

<Cov(Z), Ω> - log(det(Ω)).

Usage

1
CV_lbd(X, lbdGrids, AI, pureVec, diagonal)

Arguments

X

A n by p data matrix.

lbdGrids

A vector of numerical constants.

AI

A p by K matrix.

pureVec

The estimated set of pure variables.

diagonal

Logical. If TRUE, the covariance matrix of Z is diagonal; else FALSE.

Value

The selected λ.


bingx1990/LOVE documentation built on Jan. 23, 2022, 1:30 a.m.