EMLasso: Fit EMLasso to a complete dataset, creating a GLoMo for each...

Description Usage Arguments Value Note Author(s) See Also Examples

View source: R/EMLasso.R

Description

Fit EMLasso to a complete dataset, creating a GLoMo for each lambda

Usage

1
2
3
4
5
6
7
  EMLasso(ds, out,
    family = c("gaussian", "binomial", "poisson", "multinomial", "cox"),
    lambdas = smartLambdaRetriever(),
    imputeDs2FitDsProperties = normalImputationConversion(),
    ..., verbosity = 0, logdir = "./",
    saveTempResults = TRUE,
    postProcessAll = postProcessEMLasso)

Arguments

ds

dataset with predictors

out

vector (binary factor) of outcomes

family

see glmnet

lambdas

see dfrConversionProps

imputeDs2FitDsProperties

see imputeDs2FitDs object that will provide the conversion from imputed dataset to one that is ready for fitting the predictor model

...

passed on to EMLasso.1l

verbosity

The higher this value, the more levels of progress and debug information is displayed (note: in R for Windows, turn off buffered output)

logdir

path to folder where logfiles (and results) of each repeat are stored

saveTempResults

if TRUE, save the results of each (parallelized)

postProcessAll

function, like postProcessEMLasso (its default) and of that signature, to do some extra work before returning the result of EMLasso

Value

an object of class "EMLasso", "glmnet" and some other classes based on the class of the outcome model. The items added to the glmnet members are:

result

list of EMLasso1l objects per lambda

params

EMLasso.1l.param parameters passed in

logdir

directory where logging/saving occurred

combinedGLoMo

GLoMo object: the combination (through combineGLoMos) of the GLoMos for each lambda (note: this item is added by postProcessEMLasso, so it may not be present if another postProcessAll is used)

imputeDs2FitDsProperties

as passed in, but first fed to imputeDs2FitDsProps

family

as passed in

Note

If lambdas is not passed along or is NULL, a set of lambdas is used by utilizing findReasonableLambdaHelper

Author(s)

Nick Sabbe nick.sabbe@ugent.be

See Also

EMLasso.1l

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
y<-rbinom(nrow(iris), 1, 0.5)
require(addendum)
require(NumDfr)
require(GLoMo)
require(snowfall)
require(EMLasso)
sfInit(parallel = FALSE, cpus = 1)
sfLibrary(addendum)
sfLibrary(NumDfr)
sfLibrary(GLoMo)
sfLibrary(EMLasso)
iris.cpy<-randomNA(iris, n=0.1)
iris.emlognet<-EMLasso(ds=numdfr(iris.cpy), out=y, family="binomial",
	lambdas=c(0.03,0.002,0.0003), nrOfSamplesPerMDRow=7, verbosity=2,
	convergenceChecker=convergenceCheckCreator(minIt=5, maxIt=10))
sfStop()

EMLasso documentation built on May 2, 2019, 5:49 p.m.