Retrieve all prediction explanations rows
1 2 3 4 5 6
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.
character. Id of the prediction explanations.
integer. Optional. Maximum number of prediction explanations rows to retrieve per request
logical. Optional. Set to FALSE to include adjusted predictions, which are predictions adjusted by an exposure column. This is only relevant for projects that use an exposure column.
list of raw prediction explanations, each element corresponds to a row of the prediction dataset and has following components.
rowId. Character string row Id.
prediction. prediction for the row.
predictionValues. list containing
label. describes what this model output corresponds to. For regression projects, it is the name of the target feature. For classification projects, it is a level from the target feature.
value. the output of the prediction. For regression projects, it is the predicted value of the target. For classification projects, it is the predicted probability the row belongs to the class identified by the label.
adjustedPrediction. adjusted predictions, if they are not excluded.
adjustedPredictionValues. Similar to predictionValues, but for adjusted predictions, if they are not excluded.
predictionExplanations. list containing
label. described what output was driven by this prediction explanation. For regression projects, it is the name of the target feature. For classification projects, it is the class whose probability increasing would correspond to a positive strength of this prediction explanation.
feature. the name of the feature contributing to the prediction.
featureValue. the value the feature took on for this row
strength. the amount this feature's value affected the prediction
qualitativeStrength. a human-readable description of how strongly the feature affected the prediction (e.g. '+++', '–', '+').
1 2 3 4 5 6 7 8 9 10 11 12
## Not run: projectId <- "59a5af20c80891534e3c2bde" modelId <- "5996f820af07fc605e81ead4" datasets <- ListPredictionDatasets(projectId) dataset <- datasets[] datasetId <- dataset$id model <- GetModel(projectId, modelId) jobId <- RequestPredictionExplanations(model, datasetId) predictionExplanationId <- GetPredictionExplanationsMetadataFromJobId(projectId, jobId)$id GetPredictionExplanationsRows(projectId, predictionExplanationId) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.