Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ PUT _ml/anomaly_detectors/example1
"analysis_config": {
"detectors": [{
"function" : "lat_long",
"field_name" : "transactionCoordinates",
"by_field_name" : "creditCardNumber"
"field_name" : "transaction_coordinates",
"by_field_name" : "credit_card_number"
}]
},
"data_description": {
Expand All @@ -49,22 +49,23 @@ PUT _ml/anomaly_detectors/example1

If you use this `lat_long` function in a detector in your {anomaly-job}, it
detects anomalies where the geographic location of a credit card transaction is
unusual for a particular customer’s credit card. An anomaly might indicate fraud.
unusual for a particular customer’s credit card. An anomaly might indicate
fraud.

IMPORTANT: The `field_name` that you supply must be a single string that contains
two comma-separated numbers of the form `latitude,longitude`, a `geo_point` field,
a `geo_shape` field that contains point values, or a `geo_centroid` aggregation.
The `latitude` and `longitude` must be in the range -180 to 180 and represent a
point on the surface of the Earth.
IMPORTANT: The `field_name` that you supply must be a single string that
contains two comma-separated numbers of the form `latitude,longitude`, a
`geo_point` field, a `geo_shape` field that contains point values, or a
`geo_centroid` aggregation. The `latitude` and `longitude` must be in the range
-180 to 180 and represent a point on the surface of the Earth.

For example, JSON data might contain the following transaction coordinates:

[source,js]
--------------------------------------------------
{
"time": 1460464275,
"transactionCoordinates": "40.7,-74.0",
"creditCardNumber": "1234123412341234"
"transaction_coordinates": "40.7,-74.0",
"credit_card_number": "1234123412341234"
}
--------------------------------------------------
// NOTCONSOLE
Expand Down