find_independent_regression_vectors.glmnet_multivariate: Given a regularization path, find K selected independent...

View source: R/init_EM.R

find_independent_regression_vectors.glmnet_multivariateR Documentation

Given a regularization path, find K selected independent variables.

Description

find_independent_regression_vectors tries to find a situation where K variables are selected, so that the selected columns of matrix Xp are independent.

Usage

find_independent_regression_vectors.glmnet_multivariate(Xp, K, fit, root)

Arguments

Xp

(transformed) matrix of regression

K

number of non-zero components allowed

root

integer, position of the root column (intercept) excluded from the fit. null if no root column.

Details

To do that, if a set of selected is not independent, we go back to the previous selected variables, and forbid the moves that led to non-independence for the rest of the path.

Value

delta a vector of regression with K non-zero coefficients.


pbastide/PhylogeneticEM documentation built on Feb. 12, 2024, 1:27 a.m.