predictProb: predict probabilities

Description Usage Arguments Value Author(s) Examples

View source: R/predictProb.R

Description

predict probabilities

Usage

1
2
3
4
5
  predictProb(object, newdata, ..., verbosity = 0)

  ## S3 method for class 'lognetProbabilityReusable'
 predictProb(object,
    newdata, ..., verbosity = 0)

Arguments

object

object that is used to predict the probabilities

newdata

dataset for which the probabilities must be predicted

...

provided for extensibility (S3)

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

vector of probabilities of the same length as nrow(newdata)

vector of probabilities of the same length as nrow(newdata)

Author(s)

Nick Sabbe nick.sabbe@ugent.be

Nick Sabbe nick.sabbe@ugent.be

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data(iris)
	iris.nd2<-numdfr(iris)
	y2<-rbinom(nrow(iris), 1, 0.5)
	iris.nic2<-normalImputationConversion(
		scalingParams=typicalScaleAndCenter(),
		transformParams=typicalTransformations())
	iris.cp2<-imputeDs2FitDsProps(iris.nic2,iris.nd2,verbosity=1)

	iris.cvtd2<-imputeDs2FitDs(iris.cp2,ds=iris.nd2,verbosity=3)

	lnet<-glmnet(iris.cvtd2, y2, family="binomial")
	lpw<-lognetProbabilityReusable(lnet, imputeDs2FitDsProperties=iris.cp2, iris.nd2, usecol=5, verbosity=1)
predictProb(lpw, iris.nd2[seq(20),], verbosity=10)

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