predict.FFMClassifier.RdMake Predictions from an "FFMClassifier" Object
# S3 method for FFMClassifier predict( model = NULL, data = NULL, key = NULL, features = NULL, handle.missing = NULL, thread.ratio = NULL )
| model |
|
|---|---|
| data |
|
| key |
|
| features |
|
| handle.missing |
|
| thread.ratio |
|
S3 methods
DataFrame
Prediction made by the model, structured as follows:
ID: id
SCORE: Predict value
CONFIDENCE: the confidence of a category (NULL for "regression")
> data$Collect() ID USER MOVIE TIMESTAMP 1 1 A Movie0 3 2 2 A Movie4 1 3 3 B Movie3 2 4 4 B <NA> 5 5 5 C Movie2 2 6 6 F Movie4 3 7 7 D Movie2 2 8 8 D Movie4 1 9 9 E Movie7 4
Call the function:
> cres <- predict.FFMClassifier(model = FFMClsf,
data = data.pred.df.fit,
thread.ratio = 1)Output:
> cres$Head(5) ID SCORE CONFIDENCE 1 1 Not click 0.5435375 2 2 Not click 0.5454705 3 3 Click 0.5427368 4 4 Click 0.5194578 5 5 Click 0.5110010