View source: R/AnomalyAssessment.R
GetAnomalyAssessmentExplanations | R Documentation |
Explanations contain predictions along with shap explanations for the most anomalous records in the specified date range/for defined number of points. Two out of three parameters: startDate, endDate or pointsCount must be specified.
GetAnomalyAssessmentExplanations(
projectId,
recordId,
startDate = NULL,
endDate = NULL,
pointsCount = NULL
)
projectId |
character. The ID of the project. |
recordId |
character. The ID of the anomaly assessment record. |
startDate |
POSIXct. Optional. The start of the date range to get explanations in. |
endDate |
POSIXct. Optional. The end of the date range to get explanations in. |
pointsCount |
integer. Optional. The number of the rows to return. |
The anomaly assessment explanations:
recordId. character. The ID of the record.
projectId. character. The project ID of the record.
modelId. character. The model ID of the record.
backtest. character. The backtest of the record.
source. character. The source of the record.
seriesId. character. the series ID of the record.
startDate. POSIXct. First timestamp in the response. Will be NULL if there is no data in the specified range.
endDate. POSIXct. Last timestamp in the response. Will be NULL if there is no data in the specified range.
shapBaseValue. numeric. Shap base value.
count. integer. The number of points in the data
.
data. list. A list of DataPoint objects in the specified date range containing:
shapExplanation. NULL or an array of up to 10 ShapleyFeatureContribution objects. Only rows with the highest anomaly scores have Shapley explanations calculated.
timestamp POSIXct. Timestamp for the row.
prediction numeric. The output of the model for this row.
Each ShapleyFeatureContribution contains:
featureValue. character. The feature value for this row. First 50 characters are returned.
strength numeric. The shap value for this feature and row.
feature character. The feature name.
Other Anomaly Assessment functions:
DeleteAnomalyAssessmentRecord()
,
GetAnomalyAssessmentPredictionsPreview()
,
InitializeAnomalyAssessment()
,
ListAnomalyAssessmentRecords()
## Not run:
projectId <- "59a5af20c80891534e3c2bde"
recordId <- "59a5af20c80891534e3c2bdb"
explanations <- GetAnomalyAssessmentExplanations(projectId, recordId, pointsCount=100,
startDate=as.Date("2021-01-01"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.