Description Usage Arguments Value Note Author(s) Examples
View source: R/findReasonableLambdaHelper.R
Expects a singly imputed dataset and fits a logistic LASSO so the user can pick a set that wil probably be interesting.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | findReasonableLambdaHelper(ds, out, family = "binomial",
showFirst = 20, showPlot = TRUE, type.measure = "auc",
repsNeededForFirstOccurrence = 3,
weights = rep(1, nrow(ds)), ..., verbosity = 0,
minNumHigher = 20, minNumLower = 20, maxNumLower = 30,
imputeDs2FitDsProperties = normalImputationConversion(),
standardize = FALSE, nfolds = 10)
## S3 method for class 'LambdaHelper'
object[i, j, drop = TRUE]
getLambdas(x, ...)
## S3 method for class 'lambdaregion'
getLambdas(x, ...)
## S3 method for class 'LambdaHelper'
getLambdas(x, ...)
|
ds |
dataset to investigate |
out |
outcome vector |
family |
see |
showFirst |
show the top coefficients (first
|
showPlot |
if |
type.measure |
see |
repsNeededForFirstOccurrence |
How many times (i.e. for how many lambda values) must a coefficient be consecutively nonzero before we count it as "occurring" |
weights |
vector with weight to be assigned to each
row of |
... |
passed on to |
verbosity |
The higher this value, the more levels of progress and debug information is displayed (note: in R for Windows, turn off buffered output) |
minNumHigher |
How many lambdas higher than the optimum do you minimally want (if available) |
minNumLower |
How many lambdas lower than the optimum do you minimally want (if available) |
maxNumLower |
How many lambdas lower than the optimum do you maximally want |
imputeDs2FitDsProperties |
see
|
standardize |
see |
nfolds |
see |
object |
|
i |
row index |
j |
column index. If this is missing, the |
drop |
if |
x |
object to find 'interesting' set of lambdas for |
list of class "LambdaHelper":
topres
|
|
allLambda |
vector of lambda values |
regionDfr |
|
regionOfInterestData |
see
|
depends on the parameters
vector of lambda values, normally high to low
EMLasso is pretty heavy and has to be run per lambda. This functions helps preselect some lambda values, and can typically avoid useless calculations for non-interesting lambda values.
Nick Sabbe nick.sabbe@ugent.be
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | aDfr<-generateTypicalIndependentDfr(numCat=10, numCnt=10, numObs=100, catProbs=rep(1/3,3),
rcnt=typicalRandomNorm, doShuffle=TRUE, verbosity=1)
outlins<- -mean(aDfr$cnt1)+aDfr$cnt1+2*(aDfr$cat1=="b")
outprobs<-expit(outlins)
y<-factor(sapply(outprobs, function(prob){sample(c("no", "yes"), 1, prob=c(1-prob,prob))}))
rlh<-findReasonableLambdaHelper(aDfr, y, verbosity=10)
data(emlcvfit, package="EMLasso")
rlh<-findReasonableLambdaHelper(aDfr, y, verbosity=10)
rlh[1]
rlh[1:5, NULL]
data(emlcvfit, package="EMLasso")
rlh<-findReasonableLambdaHelper(aDfr, y, verbosity=10)
getLambdas(rlh$regionOfInterestData)
data(emlcvfit, package="EMLasso")
rlh<-findReasonableLambdaHelper(aDfr, y, verbosity=10)
getLambdas(rlh)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.