bilasso.html 8.55 KB
 Armin Rauschenberger committed Dec 12, 2018 1 2 3 4 5 6 7 8   Armin Rauschenberger committed Dec 13, 2018 9 Logistic regression with a continuous response — bilasso • colasso  Armin Rauschenberger committed Dec 12, 2018 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32   Armin Rauschenberger committed Dec 13, 2018 33   Armin Rauschenberger committed Dec 12, 2018 34   Armin Rauschenberger committed Dec 19, 2018 35   Armin Rauschenberger committed Dec 12, 2018 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 
 Armin Rauschenberger committed Dec 19, 2018 110 

Implements logistic regression with a continuous response.

 Armin Rauschenberger committed Dec 12, 2018 111 112 113 
 Armin Rauschenberger committed Jan 08, 2019 114 115 116 
bilasso(y, cutoff, X, npi = 101, pi = NULL, nsigma = 99,   sigma = NULL, nfolds = 10, foldid = NULL,   type.measure = "deviance", ...)
 Armin Rauschenberger committed Dec 12, 2018 117 118 119 120 121 122 123 124 125 126 127 

Arguments

y

continuous response: vector of length $$n$$

cutoff

cutoff point for dichotomising response into classes: value between min(y) and max(y)

X

covariates:  Armin Rauschenberger committed Dec 19, 2018 134 numeric matrix with $$n$$ rows (samples)  Armin Rauschenberger committed Dec 13, 2018 135 and $$p$$ columns (variables)

npi

number of pi values

pi

pi sequence: vector of values in the unit interval; or NULL (default sequence)

nsigma

number of sigma values

sigma

sigma sequence: vector of increasing positive values; or NULL (default sequence)

nfolds

number of folds

foldid

fold identifiers: vector with entries between $$1$$ and nfolds; or NULL (balance)

type.measure

loss function for binary classification (linear regression uses the deviance)

...

further arguments passed to glmnet

 Armin Rauschenberger committed Dec 19, 2018 128 129   Armin Rauschenberger committed Dec 12, 2018 130 131 132 133   Armin Rauschenberger committed Jan 08, 2019 136 137 138 139 140 141 142 143 144 145   Armin Rauschenberger committed Dec 12, 2018 146 147   Armin Rauschenberger committed Dec 20, 2018 148 149 150 151 152 153 154 155   Armin Rauschenberger committed Dec 12, 2018 156 157 158 159 160   Armin Rauschenberger committed Dec 19, 2018 161 162 163 164 165 166   Armin Rauschenberger committed Dec 12, 2018 167   Armin Rauschenberger committed Dec 13, 2018 168   Armin Rauschenberger committed Dec 19, 2018 169 170   Armin Rauschenberger committed Dec 14, 2018 171   Armin Rauschenberger committed Dec 20, 2018 172 173 174 175   Armin Rauschenberger committed Dec 12, 2018 176 177   Armin Rauschenberger committed Dec 13, 2018 178 179 

Details

 Armin Rauschenberger committed Dec 20, 2018 180 181 182 183 

- INCLUDE note on deviance (not comparable between lin and log models) - alpha: elastic net parameter: numeric between $$0$$ (ridge) and $$1$$ (lasso) - do not use "family"

 Armin Rauschenberger committed Dec 13, 2018 184   Armin Rauschenberger committed Dec 12, 2018 185 186 

Examples

 Armin Rauschenberger committed Dec 19, 2018 187 188 189 
n <- 100; p <- 200 y <- rnorm(n) X <- matrix(rnorm(n*p),nrow=n,ncol=p)  Armin Rauschenberger committed Dec 21, 2018 190 191 net <- bilasso(y=y,cutoff=0,X=X) ### Add ... to all glmnet::glmnet calls !!! ###
 Armin Rauschenberger committed Dec 12, 2018 192 193 194 195 196