datarobot (version 2.18.6)

RequestPredictions: Request predictions from a model against a previously uploaded dataset

Description

Prediction intervals can now be returned for predictions with datetime models. Use `includePredictionIntervals = TRUE` in calls to Predict or RequestPredictions. For each model, prediction intervals estimate the range of values DataRobot expects actual values of the target to fall within. They are similar to a confidence interval of a prediction, but are based on the residual errors measured during the backtesting for the selected model.

Usage

RequestPredictions(
  project,
  modelId,
  datasetId,
  includePredictionIntervals = NULL,
  predictionIntervalsSize = NULL
)

Value

predictJobId to be used by GetPredictions function to retrieve the model predictions.

Arguments

project

character. Either (1) a character string giving the unique alphanumeric identifier for the project, or (2) a list containing the element projectId with this identifier.

modelId

numeric. The ID of the model to use to make predictions

datasetId

numeric. The ID of the dataset to make predictions against (as uploaded from UploadPredictionDataset)

includePredictionIntervals

logical. Optional. Should prediction intervals bounds should be part of predictions? Only available for time series projects. See "Details" for more info.

predictionIntervalsSize

numeric. Optional. Size of the prediction intervals, in percent. Only available for time series projects. See "Details" for more info.

Examples

Run this code
if (FALSE) {
  dataset <- UploadPredictionDataset(project, diamonds_small)
  model <- ListModels(project)[[1]]
  modelId <- model$modelId
  predictJobId <- RequestPredictions(project, modelId, dataset$id)
  predictions <- GetPredictions(project, predictJobId)

  # Or, if prediction intervals are desired (datetime only)
  predictJobId <- RequestPredictions(datetimeProject,
                                     DatetimeModelId,
                                     includePredictionIntervals = TRUE,
                                     predictionIntervalsSize = 100)
  predictions <- GetPredictions(datetimeProject, predictJobId, type = "raw")
}

Run the code above in your browser using DataLab