Description Usage Arguments Examples
View source: R/lm-lasso-py-or.r
This function is for lasso regression using python
1 | lm_lasso_py_or(Y, X, lambda)
|
Y |
The response of the data |
X |
Design matrix |
lambda |
The penalty parameter for ridge regression |
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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.