predict.HGBTRegressor.RdSimilar to other predict methods, this function predicts fitted values from a fitted "HGBTRegressor" object.
# S3 method for HGBTRegressor predict( model, data, key, features = NULL, thread.ratio = NULL, missing.replacement = NULL, ... )
| model |
|
|---|---|
| data |
|
| key |
|
| features |
|
| thread.ratio |
|
| missing.replacement |
|
| ... | Reserved parameter. |
S3 methods
DataFrame
DataFrame containing the prediction result, structured as follows:
ID, INTEGER - ID column, with the same name and type as df's ID column
SCORE, NVARCHAR - representing the predicted values.
CONFIDENCE, DOUBLE - representing the confidence of
a class label assignment.
Input DataFrame df:
> df.predict$Collect()
ID ATT1 ATT2 ATT3 ATT4
1 1 19.76 6235.0 100.00 100.00
2 2 17.85 46230.0 43.67 84.53
3 3 19.96 7360.0 65.51 81.57
4 4 16.80 28715.0 45.16 93.33
5 5 18.20 21934.0 49.20 83.07
6 6 16.71 1337.0 74.84 94.99
7 7 18.81 17881.0 70.66 92.34
8 8 20.74 2319.0 63.93 95.08
9 9 16.56 18040.0 14.45 61.24
10 10 18.55 1147.0 68.58 97.90
Call the function and predict with a "HGBTRegressor" object hgr:
> result <- predict(hgr, df.predict, key = "ID")
> result$Collect()
ID SCORE CONFIDENCE
1 1 23.79109147050638 NA
2 2 19.09572889593064 NA
3 3 21.56501359501561 NA
4 4 18.622664075787082 NA
5 5 19.05159916592106 NA
6 6 18.815530665858763 NA
7 7 19.761714911364443 NA
8 8 23.79109147050638 NA
9 9 17.84416828725911 NA
10 10 19.915574945518465 NA