Description Usage Arguments Value Author(s) References Examples
Fit EMLasso for 1 lambda
1 2 3 4 5 6 7 8 | EMLasso.1l(ds, out, lambda, nrOfSamplesPerMDRow = 10,
rowsToUseForFit = seq(nrow(ds)),
firstTimeCompleter = marginalCompleter(),
imputeDs2FitDsProperties = normalImputationConversion(),
fitPredictor = GLoMo, family = "binomial",
convergenceChecker = convergenceCheckCreator(),
postProcess = postProcessEMLasso1l, verbosity = 0,
extraLog = function(...) { })
|
ds |
dataset ( |
out |
outcome vector |
lambda |
the single lambda |
nrOfSamplesPerMDRow |
For rows with missing data, how many rows to sample. Defaults to 10. |
rowsToUseForFit |
Which of the rows of dfr/out can be used for fitting the LASSO (int vector). Defaults to all rows. |
firstTimeCompleter |
object supported by
|
imputeDs2FitDsProperties |
see
|
fitPredictor |
function that will perform the
predictor model fit. Defaults to |
family |
see |
convergenceChecker |
function that will check based
on the coefficients over the repeats whether convergence
has been achieved. Defaults to
|
postProcess |
function, like
|
verbosity |
The higher this value, the more levels of progress and debug information is displayed (note: in R for Windows, turn off buffered output) |
extraLog |
A function (by default one that does nothing) that will be used in each iteration to perform extra logging |
An object of class EMLasso1l. This is a list with the following items:
lasso.fit
: glmnet
object
predictorModel
: final predictor fit
(typically of class GLoMo)
coefs
: coefs for
all iterations (rows) and dummycoded columnames
(columns), incl. (intercept).
ds
: original
dataset passed along
out
: outcome variable
(1 for each row in ds)
lambda
: 1 lambda
value
nrOfSamplesPerMDRow
: how many
imputations per row with missing data
convergence
: return value of last call to
convergenceChecker
. Will typically contain
information like minIt
and maxIt
.
rowsToUseForFit
: which of the rows in ds was used
to fit the lasso
iterCount
: how many
iterations occurred before convergence / maxIt
imputeDs2FitDsProperties
: as passed in, but first
fed to imputeDs2FitDsProps
any other
items added by postProcess
Nick Sabbe nick.sabbe@ugent.be
[PENDING]
1 2 3 4 5 6 7 8 9 10 11 12 | 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))}))
aDfr.MD<-randomNA(aDfr, 0.01, verbosity=1)
rlh<-findReasonableLambdaHelper(aDfr, y, verbosity=10)
aLam<-rlh$regionDfr[2,"lambda"]
emlfit1<-EMLasso.1l(aDfr.MD, y, lambda=aLam, nrOfSamplesPerMDRow=7,
convergenceChecker=convergenceCheckCreator(minIt=5, maxIt=10), verbosity=10)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.