scale_X: scale_X Scales a matrix of inputs according to LARS algorithm

Description Usage Arguments Value Examples

View source: R/FunctionsALasso.R

Description

scale_X Scales a matrix of inputs according to LARS algorithm

Usage

1
scale_X(X, Y, gamma)

Arguments

X

n x p design matrix of inputs

Y

n x 1 vector of outputs

gamma

a scalar(>0) input used in the weight(user input)

Value

A list with the elements

X_w

A n x p matrix scaled according to LARS algorithm

weights

adaptive weights

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
EXAMPLE
X <- matrix(rnorm(500), 50, 10)
Y <- rnorm(50)
gamma <- 2
#Scaling using scale_X
sc <- scale_X(X , Y , gamma)
#Deriving weighted design matrix
X_w <- sc$X_w
#Deriving weights
weights <- sc$weights

Saptati-Datta/AdapLasso documentation built on Dec. 18, 2021, 12:57 p.m.