plotCoefConvergence: Plot coefficient evolution of EMLasso.lognet objects

Description Usage Arguments Value Author(s) Examples

View source: R/plotCoefConvergence.R

Description

Plot coefficient evolution of EMLasso.lognet objects over iterations

Usage

1
2
3
  plotCoefConvergence(cofs, skipForNZ = 5,
    zeroThres = 1e-04, colors = neatColorSet(),
    maxleg = 10, leg.cex = 0.5, verbosity = 0, ...)

Arguments

cofs

matrix (or (sparse) Matrix) of coefficients: rows=iterations, cols=variables

skipForNZ

when checking if a coefficient is ever nonzero, the first skipForNZ (run-in) iterations are skipped

zeroThres

how high does a value have to be (in absolute value) to be nonzero.

colors

colors used for the matplot

maxleg

show legend for (at most) the first maxleg variables

leg.cex

cex passed to legend

...

passed on to matplot

verbosity

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

Value

nothing

Author(s)

Nick Sabbe nick.sabbe@ugent.be

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
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,
	lambdas=c(0.03,0.002,0.0003), nrOfSamplesPerMDRow=7, verbosity=2,
	convergenceChecker=convergenceCheckCreator(minIt=5, maxIt=10))
sfStop()
plotCoefConvergence(iris.emlognet$result[[1]]$coefs, lty=1, xlab="iteration", ylab="coefficient")

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