predict.OnlineLinearRegression.RdSimilar to other predict methods, this function predicts fitted values from a fitted "OnlineLinearRegression" object.
# S3 method for OnlineLinearRegression predict(model, data, key, features = NULL)
| model |
|
|---|---|
| data |
|
| key |
|
| features |
|
S3 methods
Predicted values are returned as a DataFrame, structured as follows.
ID column, with same name and type as data's ID column.
VALUE, type DOUBLE, representing predicted values.
Call predict() with df.predict:
> df.predict$Collect()
ID X1 X2
0 14 2 67
1 15 3 51
Invoke predict():
> fitted <- predict(olr, df.predict, key="ID", features=list("X1", "X2"))
> fitted$Collect()
ID VALUE
0 14 279.020611
1 15 218.024511