lm_lasso_py_or: Lasso regression using python when the design matrix is...

Description Usage Arguments Examples

View source: R/lm-lasso-py-or.r

Description

This function is for lasso regression using python

Usage

1
lm_lasso_py_or(Y, X, lambda)

Arguments

Y

The response of the data

X

Design matrix

lambda

The penalty parameter for ridge regression

Examples

1
2
3
4
5
6
n=1000
p=4
X <- matrix(rnorm(n*p),n,p)
beta_true <- matrix(c(2,4,1.5,5),p,1)
Y <- X%*%beta_true
lm_lasso_py_or(Y,X,lambda=0.01)$coefficients

cz354/bis557 documentation built on Dec. 20, 2020, 3:05 a.m.