predict.pre | R Documentation |
predict.pre
generates predictions based on the final prediction rule
ensemble, for training or new (test) observations
## S3 method for class 'pre'
predict(
object,
newdata = NULL,
type = "link",
penalty.par.val = "lambda.1se",
...
)
object |
object of class |
newdata |
optional |
type |
character string. The type of prediction required; the default
|
penalty.par.val |
character or numeric. Value of the penalty parameter
|
... |
further arguments to be passed to
|
If newdata
is not provided, predictions for training data will be
returned.
pre
, plot.pre
,
coef.pre
, importance.pre
, cvpre
,
interact
, print.pre
,
predict.cv.glmnet
set.seed(1)
train <- sample(1:sum(complete.cases(airquality)), size = 100)
set.seed(42)
airq.ens <- pre(Ozone ~ ., data = airquality[complete.cases(airquality),][train,])
predict(airq.ens)
predict(airq.ens, newdata = airquality[complete.cases(airquality),][-train,])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.