Similar to other predict methods, this function predicts fitted values from a fitted "RDTRegressor" object.

# S3 method for RDTRegressor
predict(
  model,
  data,
  key,
  features = NULL,
  block.size = NULL,
  missing.replacement = NULL
)

Format

S3 methods

Arguments

model

R6Class object
A "RDTRegressor" object for prediction.

data

DataFrame
DataFrame containting the data.

key

character
Name of the ID column.

features

character of list of characters, optional
Name of feature columns for prediction.
If not provided, it defaults to all non-key columns of data.

block.size

integer, optional
The number of rows loaded per time during prediction. 0 indicates load all data at once.
Defaults to 0.

missing.replacement

character, optional
The missing replacement strategy:

  • "feature.marginalized": marginalize each missing feature out independently.

  • "instance.marginalized": marginalize all missing features in an instance as a whole corresponding to each category.

Defaults to "feature.marginalized".

Value

DataFrame of predicted values, structured as follows.

  • ID, with same name and type as data's ID column.

  • SCORE, type NVARCHAR, predicted values.

  • CONFIDENCE, type DOUBLE. Representing the confidence of a class. All 0s for regression.

Examples

Call the function with a "RDTRegressor" object rfr:


> predict(rfr, data, key = "ID")