{
"dataset": {
"startTime": "2024-06-25T06:00:00.000Z", #target start time
"endTime": "2024-07-26T05:59:59.999Z", #target end time
"externalModelVersionIds": [],
"externalBatchIds": [],
"environmentName": "production",
"filters": []
},
"performanceMetric": "TargetMetric",
"predictionValueClass": "positiveClassValue",
"timeZone": "time/zone", #The timezone of the request, used to determine the localized offset from UTC.
"id": "model_id"
}
{
"dataset": {
"startTime": "2024-06-25T06:00:00.000Z", #target start time
"endTime": "2024-07-26T05:59:59.999Z", #target end time
"externalModelVersionIds": [],
"externalBatchIds": [],
"environmentName": "production",
"filters": []
},
"customMetricConfig": "select count(*) from model", #udf in SQL syntax
"timeZone": "time/zone", #The timezone of the request, used to determine the localized offset from UTC.
"id": "model_id"
}
Metric Over Time
To analyze metric values over time or plot reconstruction, use the following query
{
"performanceMetric": "metric",
"positiveClass": "positive_class_value",
"timeZone": "time/zome", #The timezone of the request, used to determine the localized offset from UTC.
"id": "model_id",
"startTime": "2024-06-25T06:00:00.000Z",
"endTime": "2024-07-26T05:59:59.999Z",
"environmentName": "production",
"timeSeriesDataGranularity": "month", #desired granularity
}
{
"timeZone": "time/zone",
"id": "model_id",
"startTime": "2024-06-25T06:00:00.000Z", #target start time
"endTime": "2024-07-26T05:59:59.999Z", #target end time
"environmentName": "production", #The timezone of the request, used to determine the localized offset from UTC.
"timeSeriesDataGranularity": "month", #target granularity for points
"customMetricConfig": "select count(*) from model" #udf in SQL syntax
}
Drift Over Time
This endpoint allows you to query drift data points for a specific model within a given time interval. You can use it to monitor feature drift using metrics like PSI (Population Stability Index), KL (Kullback-Leibler divergence), or JS (Jensen-Shannon divergence). Your model baseline is defaulted as the baseline in this query but you can optionally specify a referenceDataset.
query GetDriftOverTime {
node(id: "MODEL ID") {
... on Model {
dimension(
startTime: "2024-08-20T00:00:00Z"
endTime: "2024-08-30T00:00:00Z"
category: featureLabel
name: "annual_income"
environmentName: production
) {
name
driftHistory(
startTime: "2024-08-20T00:00:00Z"
endTime: "2024-08-30T00:00:00Z"
driftMetric: psi
timeSeriesDataGranularity: day
timeZone: "UTC"
) {
... on TimeSeriesWithThresholdDataType {
dataPoints {
x
y
}
}
}
}
}
}
}query
query GetDriftWithCustomBaseline {
node(id: "model_id") {
... on Model {
dimension(
startTime: "2024-08-20T00:00:00Z"
endTime: "2024-08-30T00:00:00Z"
category: featureLabel
name: "state"
environmentName: production
) {
name
driftHistory(
referenceDataset:{
startTime: "2024-08-01T00:00:00Z"
endTime: "2024-08-15T00:00:00Z"
environmentName:production
externalBatchIds: []
externalModelVersionIds:[]
filters:[]
}
startTime: "2024-08-20T00:00:00Z"
endTime: "2024-08-30T00:00:00Z"
driftMetric: psi
timeSeriesDataGranularity: hour
timeZone: "UTC"
) {
... on TimeSeriesWithThresholdDataType {
dataPoints {
x
y
}
}
}
}
}
}
}
Parameters
"MODEL ID": The unique identifier for your model.
dimension: Specifies the feature or dimension you want to analyze.
startTime: The start of the interval for querying data (in UTC).
endTime: The end of the interval for querying data (in UTC).
category: The type of data you are querying. Options include:
featureLabel
prediction
actuals
actualScore
actualClass
predictionClass
predictionScore
tag
name: The specific feature or dimension name you want to query.
environmentName: The environment for which the data is being queried, such as 'production'.
driftHistory: Retrieves the drift data over the specified time period.
driftMetric: The metric used to measure drift. Options include:
psi (Population Stability Index)
kl (Kullback-Leibler divergence)
js (Jensen-Shannon divergence)
timeSeriesDataGranularity: The granularity of the data points in the time series. Options include:
day
hour
week
month
timeZone: The time zone for the data points, e.g., "UTC".
Global Feature Importance
This endpoint allows you to query the global feature importance for all your feautres.
You can query the model schema to gather key statistics such as cardinality, percent empty, and drift. The query below retrieves data on features and predictions, including percentEmpty, cardinality, and drift metrics.