standardize: Standardizes the input design matrix X and output vector Y to...

Description Usage Arguments Value Examples

View source: R/FunctionsALasso.R

Description

Standardizes the input design matrix X and output vector Y to mean 0 and scales X

Usage

1

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

Xstd

scaled X

Ystd

scaled Y

meanY

mean of Y

meanX

Column means after centering the weighted X matrix from scale_X

weights

weights obtained by centering X_w which is obtained from scale X

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
X <- matrix(rnorm(500), 50, 10)
Y <- rnorm(50)
gamma <- 2
#Standardizing X and Y
std <- standardize(X , Y , gamma)
#Deriving weighted and centered design matrix
Xstd <- std$Xstd
#Column means of centered X_w
meanX <- std$meanX
#Deriving centered Y
Ystd <- std$Ystd
#Mean of Ystd
meanY <- std$meanY
# Weights
weights <- std$weights

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