GetDeploymentAccuracy: Retrieve accuracy statistics for a deployment.

View source: R/DeploymentAccuracy.R

GetDeploymentAccuracyR Documentation

Retrieve accuracy statistics for a deployment.

Description

Retrieve accuracy statistics for a deployment.

Usage

GetDeploymentAccuracy(
  deploymentId,
  modelId = NULL,
  start = NULL,
  end = NULL,
  segmentAttribute = NULL,
  segmentValue = NULL,
  targetClasses = NULL
)

Arguments

deploymentId

character. The ID of the deployment.

modelId

character. Optional. The ID of the model to query. If provided, only data for this specific model will be retrieved; otherwise, data for the deployment's default model will be retrieved.

start

POSIXct. Optional. The start time of the reporting period for monitoring data. Defaults to seven days prior to the end of the period. Sub-hour resolution is not permitted, and the timezone must be UTC.

end

POSIXct. Optional. The end time of the reporting period for monitoring data. Defaults to the next top of the hour. Sub-hour resolution is not permitted, and the timezone must be UTC.

segmentAttribute

character. Optional. The name of an attribute used for segment analysis. See SegmentAnalysisAttribute for permitted values. Added in DataRobot 2.21.

segmentValue

character. Optional. The value of segmentAttribute. Added in DataRobot 2.21.

targetClasses

character. Optional. List of target classes to filter out of the response. Added in DataRobot 2.23.

Value

An object representing service health metrics for the deployment, containing:

  • modelId character. The ID of the deployment model for which monitoring data was retrieved.

  • period list. The duration of the reporting period, containing:

    • start POSIXct. Start of the reporting period.

    • end POSIXct. End of the reporting period.

  • metrics data.frame. Accuracy metrics for the deployment, where each row is a separate metric and contains the columns:

    • metric. character. Name of the metric. See DeploymentAccuracyMetric for valid values.

    • baselineValue. numeric. May be NA if accuracy data is not available.

    • value. numeric. May be NA if accuracy data is not available.

    • percentChange. numeric. The percent change of value over baseline. May be NA if accuracy data is not available.

  • segmentAttribute character. Optional. The name of the segment on which segment analysis was performed. Added in DataRobot 2.21.

  • segmentValue character. Optional. The value of the segmentAttribute. Added in DataRobot 2.21.

See Also

Other deployment accuracy functions: GetDeploymentAccuracyOverTime(), GetDeploymentAssociationId(), SubmitActuals()

Examples

## Not run: 
library(dplyr)
deploymentId <- "59a5af20c80891534e3c2bde"
acc <- GetDeploymentAccuracy(deploymentId, end = ISOdate(2021, 01, 06, 1, 0, 0, tz = "UTC"))
df <- mutate(
       acc$metrics,
       "modelId" = acc$modelId,
       "startTime" = acc$period$start,
       "endTime" = acc$period$end,
       .before = everything()
   )

## End(Not run)

datarobot documentation built on Nov. 3, 2023, 1:07 a.m.