predict.OnlineMultiLogisticRegression.RdSimilar to other predict methods, this function predicts fitted values from a fitted "OnlineMultiLogisticRegression" object.
# S3 method for OnlineMultiLogisticRegression predict(model, data, key, features = NULL, thread.ratio = NULL)
| model |
|
|---|---|
| data |
|
| key |
|
| features |
|
| thread.ratio |
|
S3 methods
Returns a Dataframe
containing predicted values, characteructured as follows.
ID column, with same name and type as `data`'s ID column.
CLASS, type NVARCHAR, predicted class name.
PROBABILITY, type DOUBLE.
omlr is an "OnlineMultiLogisticRegression" object.
Call predict() with df.predict:
> df.predict$Collect ID X1 X2 0 1 1.2 0.7 1 2 1.0 -2.0
Invoke predict():
> fitted <- predict(omlr, df.predict, key="ID", features=list("X1", "X2"))
> fitted$Collect
ID CLASS PROBABILITY
0 1 0 0.539350
1 2 2 0.830026