Revert to a snapshot
- POST /_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_revert
The machine learning features react quickly to anomalous input, learning new behaviors in data. Highly anomalous input increases the variance in the models whilst the system learns whether this is a new step-change in behavior or a one-off event. In the case where this anomalous input is known to be a one-off, then it might be appropriate to reset the model state to a time before this event. For example, you might consider reverting to a saved snapshot after Black Friday or a critical system failure.
Required authorization
- Cluster privileges manage_ml
Query parameters
-
delete_intervening_resultsboolean · default: false -
If true, deletes the results in the time period between the latest results and the time of the reverted snapshot. It also resets the model to accept records for this time period. If you choose not to delete intervening results when reverting a snapshot, the job will not accept input data that is older than the current time. If you want to resend data, then delete the intervening results.
Response
-
modelobjectrequired -
job_idstringrequired -
A numerical character string that uniquely identifies the job that the snapshot was created for.
-
retainbooleanrequired -
If true, this snapshot will not be deleted during automatic cleanup of snapshots older than model_snapshot_retention_days. However, this snapshot will be deleted when the job is deleted. The default value is false.