makeRandomEffectLearner: Create a random effect learner object

View source: R/random_effect_learner.R

makeRandomEffectLearnerR Documentation

Create a random effect learner object

Description

Creates a random effect learner object to be used in veb_boost

Usage

makeRandomEffectLearner(
  R,
  R_test = NULL,
  growMode = c("NA", "+*", "+", "*"),
  changeToConstant = FALSE
)

Arguments

R

is a positive semi-definite matrix (e.g. correlation matrix) to be used as the predictors in training. R must contain an attribute called svd, with elements u and d, and v, which contain the (compact) SVD of R. See, e.g. sparsesvd::sparsesvd

R_test

is a positive semi-definite matrix (e.g. correlation matrix) to be used as the predictors in training. R must contain an attribute called svd, with elements u, d, and v, which contain the (compact) SVD of R_test. See, e.g. sparsesvd::sparsesvd. N.B. Observations in R and R_test are assumed to be independent

growMode

is a string for if the learner should be grown (or not) If "+*", we grow mu_0 -> (mu_0 * mu_2) + mu_1 If "+", we grow mu_0 -> (mu_0 + mu_1) If "*", we grow mu_0 -> (mu_0 * mu_1) (NOTE: Not recommended if we start with k = 1) If "NA", we do not grow this learner

changeToConstant

is a logical for if constant fits should be changed to be constant

Details

A random effect learner \alpha has a prior distribution

\alpha ~ N(0, \sigma_{\alpha}^2 R)

for a fixed and given R. In order to deal with a rank-deficient matrix R (say with rank k < n), we let

z ~ N(0, \sigma_{\alpha}^2 I_k)

and let

\alpha := US^{1/2}z

where R = USU^T is the singular/Eigen value decomposition of R (in compact form).


stephenslab/VEB.Boost documentation built on July 2, 2023, 1 p.m.