predict.prioritylasso: Predictions from prioritylasso

Description Usage Arguments Value Author(s) See Also Examples

View source: R/predict.prioritylasso.R

Description

Makes predictions for a prioritylasso object. It can be chosen between linear predictors or fitted values.

Usage

1
2
## S3 method for class 'prioritylasso'
predict(object, newdata, type = c("link", "response"), ...)

Arguments

object

An object of class prioritylasso.

newdata

(nnew x p) matrix or data frame with new values.

type

Specifies the type of predictions. link gives the linear predictors for all types of response and response gives the fitted values.

...

Further arguments passed to or from other methods.

Value

Predictions that depend on type.

Author(s)

Simon Klau

See Also

pl_data, prioritylasso

Examples

1
2
3
4
5
6
7
8
9
pl_bin <- prioritylasso(X = matrix(rnorm(50*190),50,190), Y = rbinom(50,1,0.5),
                       family = "binomial", type.measure = "auc",
                       blocks = list(block1=1:13,block2=14:80, block3=81:190),
                       block1.penalization = TRUE, lambda.type = "lambda.min",
                       standardize = FALSE, nfolds = 3)

newdata_bin <- matrix(rnorm(10*190),10,190)

predict(object = pl_bin, newdata = newdata_bin, type = "response")

prioritylasso documentation built on Jan. 13, 2021, 8:45 p.m.