Learn R Programming

datarobot (version 2.18.6)

GetConfusionChart: Retrieve a model's confusion chart for a specified source.

Description

Retrieve a model's confusion chart for a specified source.

Usage

GetConfusionChart(
  model,
  source = DataPartition$VALIDATION,
  fallbackToParentInsights = FALSE
)

Value

data.frame with the following components:

  • source character. The name of the source of the confusion chart. Will be a member of DataPartition.

  • data list. The data for the confusion chart, containing:

    • classes character. A vector containing the names of all the classes.

    • confusionMatrix matrix. A matrix showing the actual versus the predicted class values.

    • classMetrics list. A list detailing further metrics for each class:

      • wasActualPercentages data.frame. A dataframe detailing the actual percentage distribution of the classes.

      • wasPredictedPercentages data.frame. A dataframe detailing the predicted distribution of the classes.

      • f1 numeric. The F1 score for the predictions of the class.

      • recall numeric. The recall score for the predictions of the class.

      • precision numeric. The precision score for the predictions of the class.

      • actualCount integer. The actual count of values for the class.

      • predictedCount integer. The predicted count of values for the class.

      • className character. A vector containing the name of the class.

Arguments

model

dataRobotModel. A DataRobot model object like that returned by GetModel.

source

character. The data partition for which data would be returned. Default is DataPartition$VALIDATION. See DataPartition for details.

fallbackToParentInsights

logical. If TRUE, this will return the lift chart data for the model's parent if the lift chart is not available for the model and the model has a parent model.

Examples

Run this code
if (FALSE) {
  projectId <- "59a5af20c80891534e3c2bde"
  modelId <- "5996f820af07fc605e81ead4"
  GetModel(projectId, modelId)
  GetConfusionChart(modelId, source = DataPartition$VALIDATION)
}

Run the code above in your browser using DataLab