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

View source: R/ConfusionChart.R

GetConfusionChartR Documentation

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
)

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.

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.

Examples

## Not run: 
  projectId <- "59a5af20c80891534e3c2bde"
  modelId <- "5996f820af07fc605e81ead4"
  GetModel(projectId, modelId)
  GetConfusionChart(modelId, source = DataPartition$VALIDATION)

## End(Not run)

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