predict.cvboost: predict for cvboost

Description Usage Arguments Value Examples

View source: R/cvboost.R

Description

predict for cvboost

Usage

1
2
## S3 method for class 'cvboost'
predict(object, newx = NULL, ...)

Arguments

object

a cvboost object

newx

covariate matrix to make predictions on. If null, return the predictions on the training data

...

additional arguments (currently not used)

Value

vector of predictions

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
n = 100; p = 10

x = matrix(rnorm(n*p), n, p)
y = pmax(x[,1], 0) + x[,2] + pmin(x[,3], 0) + rnorm(n)

fit = cvboost(x, y, objective="reg:squarederror")
est = predict(fit, x)

## End(Not run)

xnie/rlearner documentation built on April 11, 2021, 12:49 a.m.