predict-iEN-method: predicts with a iEN object, defualt of the model is to...

Description Usage Arguments Value Examples

Description

predicts with a iEN object, defualt of the model is to predict the new data with the mean coefficient model over each out of sample instance. With the default phi applied to to newx being the mean phi from optimal models found during CV.

Usage

1
2
## S4 method for signature 'iEN'
predict(object, newx, priors, phi)

Arguments

object

object of type iEN

newx

new data to predict

priors

priors indicating how phi will be applied, should be identical to the priors used during cross-validation.

phi

The amount of prioritization to use on newx, this should be the same phi as is used to construct the iEN model during prediction. Default for this method is to apply the mean phi from out of sample models.

Value

vector of predicted values using object to predict newx

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
data(test_data)

alphaGrid <- seq(0,1, length.out=2)
phiGrid <- exp(seq(log(1),log(10), length.out=2))
nlambda <- 3
ncores <- 2
eval <- "RSS" 
family <- "gaussian"
intercept <- TRUE
standardize <- TRUE
center <- TRUE

model <- cv_iEN(X, Y, foldid, alphaGrid, phiGrid, nlambda, NULL, priors, ncores, eval, family, intercept, standardize, center)
predict(model, X, priors)

Teculos/immunological-EN documentation built on Sept. 23, 2020, 11:53 p.m.