Learn R Programming

RLT (version 3.2.6)

predict.RLT: Prediction function for reinforcement learning trees

Description

Predict future subjects with a fitted RLT model

Usage

# S3 method for RLT
predict(object, testx, ...)

Value

The predicted values. For survival model, it returns the fitted survival functions

Arguments

object

A fitted RLT object

testx

Testing data

...

...

Examples

Run this code
x = matrix(rnorm(100), ncol = 10)
y = rowMeans(x)
fit = RLT(x, y, ntrees = 5)
predict(fit, x)

Run the code above in your browser using DataLab