Custom Metric Syntax Overview
Custom metrics use an Arize SQL-like query language.SELECT
Every query starts with a SELECT statement.
FROM
The FROM statement should beFROM model, where model refers to the model that the custom metric was created under.
Constants
A constant can be a number or string. Strings use single quotes like this:'this is a string'. Numbers can be floats or integers.
Expressions
Dimensions
A dimension is any feature, tag, prediction, actual, or span property of a model. A dimension can either be of type string or of type numeric.| Type | Invocation | Description |
|---|---|---|
| Feature | feature_name or "feature name" | Features can be referenced directly or use double quotes.Note: if there are spaces in your feature name, you must use double quotes. |
| Tag | tag_name or "tag name" | Tags can be referenced directly or use double quotes.Note: if there are spaces in your tag name, you must use double quotes. |
| Prediction | categoricalPredictionLabel scorePredictionLabel numericPredictionLabel | For scored categorical models, there is categoricalPredictionLabel and scorePredictionLabel For numeric models, there is only numericPredictionLabel |
| Actual | categoricalActualLabel scoreActualLabel numericActualLabel | For scored categorical models, there is categoricalActualLabel and scoreActualLabelFor numeric models, there is only numericActualLabel |
| Span Property | span_property or "span property" or "span. property" | Span properties can be referenced directly or use double quotes.Note: if there are spaces or periods in your span property name, you must use double quotes. |
Comments
Comments can be added to your query in one of two ways: Single line comment (shortcut isCMD + /)