predict.PolynomialRegression.RdSimilar to other predict methods, this function predicts fitted values from a fitted "PolynomialRegression" object.
# S3 method for PolynomialRegression predict( model, data, key, features = NULL, thread.ratio = NULL, model.format = NULL )
| model |
|
|---|---|
| data |
|
| key |
|
| features |
|
| thread.ratio |
|
| model.format |
|
S3 methods
Predicted values are returned as a DataFrame, structured as follows.
ID: with same name and type as data's ID column.
VALUE: type DOUBLE, representing predicted values.
Input DataFrame data2:
> data2$Collect() ID X1 1 0 0.30 2 1 4.00 3 2 1.60 4 3 0.45 5 4 1.70
Predict with DataFrame data2 and the "PolynomialRegression" Object pr:
> predict(pr, data2, key = "ID") ID VALUE 0 1 6.157063 1 2 8.401269 2 3 15.668581 3 4 33.928501