Benjamin Trent
|
cf151b53fe
|
[ML] adds new change_point pipeline aggregation (#83428)
adds a new `change_point` sibling pipeline aggregation.
This aggregation detects a change_point in a multi-bucket aggregation.
Example:
```
POST kibana_sample_data_flights/_search
{
"size": 0,
"aggs": {
"histo": {
"date_histogram": {
"field": "timestamp",
"fixed_interval": "3h"
},
"aggs": {
"ticket_price": {
"max": {
"field": "AvgTicketPrice"
}
}
}
},
"changes": {
"change_point": {
"buckets_path": "histo>ticket_price"
}
}
}
}
```
Response
```
{
/*<snip>*/
"aggregations" : {
"histo" : {
"buckets" : [ /*<snip>*/ ]
},
"changes" : {
"bucket" : {
"key" : "2022-01-28T23:00:00.000Z",
"doc_count" : 48,
"ticket_price" : {
"value" : 1187.61083984375
}
},
"type" : {
"distribution_change" : {
"p_value" : 0.023753965139433175,
"change_point" : 40
}
}
}
}
}
```
|
2022-03-04 07:00:58 -05:00 |
|