rgp (version 0.4-1)

predict.symbolicRegressionModel: Predict method for symbolic regression models

Description

Predict values via a model function from a population of model functions generated by symbolic regression.

Usage

"predict"(object, newdata, model = "BEST", detailed = FALSE, ...)

Arguments

object
A model created by symbolicRegression.
newdata
A data.frame containing input data for the symbolic regression model. The variables in object$formula must match column names in this data frame.
model
The numeric index of the model function in object$population to use for prediction or "BEST" to use the model function with the best training fitness.
detailed
Whether to add metadata to the prediction object returned.
...
Ignored in this predict method.

Value

A vector of predicted values or, if detailed is TRUE, a list of the following elements: model the model used in this prediction response a matrix of predicted versus respone values RMSE the RMSE between the real and predicted response