predict.rf: Predict method for rf model fits

Description Usage Arguments See Also Examples

View source: R/rf.R

Description

Predicted values based on rf model object.

Usage

1
2
3
## S3 method for class 'rf'
predict(model, newdata, predict.all = FALSE, R = 100,
  interval = FALSE, interval_method = "sd", ...)

Arguments

model

'rf' class object

newdata

matrix containg the regressor of the model that you want to predict the response for.

predict.all

logical value (FALSE by default). If TRUE, a matrix of dimension R by nrow(neawdata) is return, containing several predictions from undermodels generate by underModel.rf

interval

a boolean value (FALSE by default) to return a interval of prediction

interval_method

either 'sd' (by default) or 'qt'

...

further arguments passed to or from other methods.

See Also

rf, underModel.rf

Examples

1
2
3
4
5
6
7
library(mfe)
data(indicateurs)
X <- indicateurs[, -c(1,2,3)]
Y <- indicateurs[,1]
model <- rf(X = X, Y = Y, Ylabel = colnames(indicateurs)[1])
predict(model, newdata = indicateurs[1,])
predict(model, newdata = indicateurs[1,], predict.all = TRUE, R = 10)

alex-conanec/OptFilBov documentation built on May 21, 2019, 9:46 a.m.