Param Types
When using params to configure your verses, each param is of a different type, which means it accepts different possible values, and those values should be written in a specific way.
Here you will find a list of all param types and the correct syntax for each.
TimePeriodType
Expected format is "<NUMBER><RESOLUTION>" where NUMBER can be any positive integer, and RESOLUTION options currently include: "h" (hours), "d" (days), or "w" (weeks). e.g, "1d" means 1 day period.{
"stanzas": {
"stanza_name": {
"verses": [
{
"type": "AverageDrift",
"target_set_period": "7d",
"benchmark_set_period": "3w"
}
]
}
}
}
CadenceType
Expected format is "<NUMBER><RESOLUTION>" where NUMBER is a positive integer, and RESOLUTION options currently include: "h" (hours), "d" (days), or "w" (weeks). e.g, "1d" means 1 day period. Only the following cadences are valid:
Minutes: 1m, 5m, 10m, 15m, 20m, 30m.
Hours: 1h, 2h, 3h, 4h, 6h, 8h, 12h.
Days: 1d, 2d, 3d, 4d, 5d, 6d.
Weeks: 1w, 2w, 3w, 4w, 5w.
{
"stanzas": {
"stanza_name": {
"verses": [
{
"type": "AverageDrift",
"cadence": "6h"
}
]
}
}
}
TimeResolution
Expected format is "<NUMBER><RESOLUTION>" where NUMBER can only be "1" (more options will be available at later releases), and RESOLUTION options currently include:"m" (minute), "h" (hour), "d" (day), "w" (week), "M" (month)
{
"stanzas": {
"stanza_name": {
"verses": [
{
"type": "AverageDrift",
"time_resolution": "1w"
}
]
}
}
}
MetricsListType
Expected format is a JSON array holding pre-existing numeric or boolean fields which you wish to track.{
"stanzas": {
"stanza_name": {
"verses": [
{
"type": "AverageDrift",
"metrics": [
"top_score",
"delta_top_to_second_score"
]
}
]
}
}
}
MetricsObjectListType
Expected format is a JSON array holding pre-existing numeric or boolean fields you wish to track, either as their field names or as objects that state the percentile filter to avoid outlier values. Note that the top percentile filter must be higher than the bottom filter.{
"stanzas": {
"stanza_name": {
"verses": [
{
"type": "AverageDrift",
"metrics": [
"top_score",
{
"field_name": "delta_top_to_second_score",
"top_percentile_filter": 95,
"bottom_percentile_filter": 5
}
]
}
]
}
}
}
SegmentationsListType
A list of dimensions to use to segment the data accordingly. This list must be a sublist of all arc class' dimensions. Accepts a list of pre-existing fields and objects which have a "name" key and an "avoid_values" key.{
"stanzas": {
"stanza_name": {
"verses": [
{
"type": "AverageDrift",
"segment_by": [
"city",
"bot_id",
{"name": "provider-code", "avoid_values": ["zoom"]},
{"name": "selected-language", "avoid_values": ["eng", "spa"]}
]
}
]
}
}
}
SegmentType
Expected format is a JSON object with keys corresponding to predefined fields - either boolean, string or numerical. The value for each field-key is an array of objects stating the possible values to include in the specific segment. For string or boolean fields, we use the "value" key with the actual field value to filter on as its value. For numerical fields, you can still use a "value" key to choose a specific numeric value, but also "min_value" and "max_value" to filter on a range of values (must have both min and max).{
"stanzas": {
"stanza_name": {
"verses": [
{
"type": "AverageDrift",
"target_baseline_segment": {
"country": [
{
"value": "France"
}
],
"age": [
{
"min_value": 18,
"max_value": 35
}
]
}
}
]
}
}
}
SegmentsListType
A list of different segments, each in the SegmentType format.{
"stanzas": {
"stanza_name": {
"verses": [
{
"type": "AverageDrift",
"exclude_segments": [
{
"text_length": [
{
"min_value": 0,
"max_value": 100
}
]
},
{
"sex": [
{
"value": "Male"
}
],
"age": [
{
"min_value": 20,
"max_value": 30
}
]
}
]
}
]
}
}
}
BenchmarkSetPeriodType
BenchmarkSetPeriodType is an enum with the following available values:"previous_to_target" (benchmark ends when target starts),
"latest" (both ends on the same date)
{
"stanzas": {
"stanza_name": {
"verses": [
{
"type": "AverageDrift",
"benchmark_set_period_type": "latest"
}
]
}
}
}
PositiveFloat
PositiveFloat type accepts any float above 0.{
"stanzas": {
"stanza_name": {
"verses": [
{
"type": "AverageDrift",
"baseline_min_segment_size": 100.0
}
]
}
}
}
NonNegativeFloat
NonNegativeFloat accepts floats equal to or above 0.{
"stanzas": {
"stanza_name": {
"verses": [
{
"type": "AverageDrift",
"epsilon": 0.5
}
]
}
}
}
NonNegativeOrMinusOneInt
NonNegativeOrMinusOneInt accepts -1 or integers higher then 0.{
"stanzas": {
"stanza_name": {
"verses": [
{
"type": "AverageDrift",
"no_std_mode_min_segment_size": 0
}
]
}
}
}
InclusiveFraction
InclusiveFraction accepts floats between 0 and 1 (inclusive).{
"stanzas": {
"stanza_name": {
"verses": [
{
"type": "AverageDrift",
"min_segment_size_fraction": 0.05
}
]
}
}
}
NonInclusiveFraction
NonInclusiveFraction accepts floats between 0 and 1 (non-inclusive).{
"stanzas": {
"stanza_name": {
"verses": [
{
"type": "AverageDrift",
"max_segment_size_fraction": 0.05
}
]
}
}
}
PositiveInt
PositiveInt accepts integers above 0.{
"stanzas": {
"stanza_name": {
"verses": [
{
"type": "AverageDrift",
"min_segment_size": 100
}
]
}
}
}
NonNegativeInt
NonNegativeInt accepts integers equal or above 0.{
"stanzas": {
"stanza_name": {
"verses": [
{
"type": "AverageDrift",
"min_segment_baseline_by_depth": 1
}
]
}
}
}
FieldVectorsList
Accepts either a string (in which case the string should correspond to a metric_vector name in the config) or an array (in which case the array should be treated as an ad-hoc metric vector defined specifically for this verse).{
"stanzas": {
"stanza_name": {
"verses": [
{
"type": "AverageDrift",
"field_vectors": [
"field_vector_group_1",
"field_vector_group_2",
"field_vector_group_3"
]
}
]
}
}
}
TrendDirectionsType
A list of allowed anomalies trends directions - either 'asc' for ascending or 'desc' for descending.{
"stanzas": {
"stanza_name": {
"verses": [
{
"type": "AverageDrift",
"trend_directions": [
"asc"
]
}
]
}
}
}
Updated over 1 year ago