Description Usage Arguments Value Author(s) Examples
View source: R/gespeR-functions.R
Based on Meinshausen and Buehlmann (2009)
1 2 |
x |
The design matrix |
y |
The response vector |
weakness |
The weakness parameter |
subsample |
The data subsample (default: none) |
dfmax |
The maxiumum number of degrees of freedom |
lambda |
The regularisation parameter |
standardize |
Indicator, wheter to standardize the design matrix |
intercept |
Indicator, whether to fit an intercept |
... |
Additional arguments to |
A glmnet
object
Fabian Schmich
1 2 3 | y <- rnorm(50)
x <- matrix(runif(50 * 20), ncol = 20)
lasso.rand(x = x, y = y)
|
Loading required package: ggplot2
Warning message:
In read.dcf(con) :
URL 'http://bioconductor.org/BiocInstaller.dcf': status was 'Couldn't resolve host name'
Call: glmnet(x = x[subsample, ], y = y[subsample, ], family = "gaussian", alpha = 1, lambda = lambda, standardize = FALSE, dfmax = dfmax, penalty.factor = (1/runif(ncol(x), weakness, 1)))
Df %Dev Lambda
[1,] 0 0.00000 0.0702200
[2,] 1 0.01225 0.0639800
[3,] 2 0.03019 0.0582900
[4,] 4 0.04910 0.0531200
[5,] 5 0.08204 0.0484000
[6,] 6 0.10980 0.0441000
[7,] 7 0.13930 0.0401800
[8,] 7 0.16980 0.0366100
[9,] 8 0.19690 0.0333600
[10,] 9 0.22520 0.0303900
[11,] 9 0.24900 0.0276900
[12,] 9 0.26870 0.0252300
[13,] 9 0.28510 0.0229900
[14,] 11 0.30350 0.0209500
[15,] 12 0.32230 0.0190900
[16,] 12 0.33800 0.0173900
[17,] 13 0.35470 0.0158500
[18,] 13 0.37060 0.0144400
[19,] 13 0.38390 0.0131600
[20,] 13 0.39490 0.0119900
[21,] 13 0.40400 0.0109200
[22,] 13 0.41160 0.0099530
[23,] 14 0.41840 0.0090690
[24,] 15 0.42490 0.0082630
[25,] 16 0.43080 0.0075290
[26,] 17 0.43660 0.0068600
[27,] 17 0.44210 0.0062510
[28,] 17 0.44660 0.0056950
[29,] 17 0.45030 0.0051890
[30,] 17 0.45340 0.0047280
[31,] 18 0.45610 0.0043080
[32,] 18 0.45880 0.0039260
[33,] 18 0.46100 0.0035770
[34,] 18 0.46290 0.0032590
[35,] 18 0.46440 0.0029700
[36,] 18 0.46570 0.0027060
[37,] 19 0.46690 0.0024650
[38,] 19 0.46800 0.0022460
[39,] 19 0.46880 0.0020470
[40,] 19 0.46950 0.0018650
[41,] 19 0.47010 0.0016990
[42,] 19 0.47070 0.0015480
[43,] 19 0.47110 0.0014110
[44,] 19 0.47140 0.0012850
[45,] 19 0.47170 0.0011710
[46,] 19 0.47190 0.0010670
[47,] 19 0.47210 0.0009724
[48,] 19 0.47230 0.0008860
[49,] 19 0.47240 0.0008073
[50,] 19 0.47250 0.0007356
[51,] 19 0.47260 0.0006702
[52,] 19 0.47270 0.0006107
[53,] 19 0.47280 0.0005564
[54,] 20 0.47280 0.0005070
[55,] 20 0.47290 0.0004620
[56,] 20 0.47290 0.0004209
[57,] 20 0.47300 0.0003835
[58,] 20 0.47300 0.0003495
[59,] 20 0.47300 0.0003184
[60,] 20 0.47300 0.0002901
[61,] 20 0.47300 0.0002644
[62,] 20 0.47310 0.0002409
[63,] 20 0.47310 0.0002195
[64,] 20 0.47310 0.0002000
[65,] 20 0.47310 0.0001822
[66,] 20 0.47310 0.0001660
[67,] 20 0.47310 0.0001513
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.