|
| 1 | +[role="xpack"] |
| 2 | +[[ml-model-snapshots]] |
| 3 | +=== Model snapshots |
| 4 | + |
| 5 | +As described in <<ml-analyzing>>, {stack} {ml-features} can calculate baselines |
| 6 | +of normal behavior then extrapolate anomalous events. These baselines are |
| 7 | +accomplished by generating models of your data. |
| 8 | + |
| 9 | +To ensure resilience in the event of a system failure, snapshots of the {ml} |
| 10 | +model for each {anomaly-job} are saved to an internal index within the {es} |
| 11 | +cluster. By default, snapshots are captured approximately every 3 to 4 hours and |
| 12 | +retained for one day (twenty-four hours). The amount of time necessary to |
| 13 | +save these snapshots is proportional to the size of the model in memory. |
| 14 | + |
| 15 | +You can use the {ref}/ml-update-job.html[update {anomaly-jobs} API] to change |
| 16 | +the interval (`background_persist_interval`) and retention |
| 17 | +(`model_snapshot_retention_days`) of these snapshots. |
| 18 | + |
| 19 | +There are also situations where you might want to |
| 20 | +{ref}/ml-revert-snapshot.html[revert] to using a specific model snapshot. The |
| 21 | +{ml-features} react quickly to anomalous input and new behaviors in data. Highly |
| 22 | +anomalous input increases the variance in the models and {ml} analytics must |
| 23 | +determine whether it is a new step-change in behavior or a one-off event. In the |
| 24 | +case where you know this anomalous input is a one-off, it might be appropriate |
| 25 | +to reset the model state to a time before this event. For example, you might |
| 26 | +consider reverting to a saved snapshot after Black Friday or a critical system |
| 27 | +failure. If you know about such events in advance, you can use |
| 28 | +<<ml-calendars,calendars and scheduled events>> to avoid impacting your model. |
0 commit comments