# Anomaly detection: minimum amount base data requirement?

**URL:** <https://discuss.elastic.co/t/anomaly-detection-minimum-amount-base-data-requirement/172706>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-machine-learning\
**Created:** [March 18, 2019, 4:51am UTC](https://discuss.elastic.co/t/anomaly-detection-minimum-amount-base-data-requirement/172706 "2019-03-18T04:51:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jasony](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@jasony](https://discuss.elastic.co/u/jasony)\
**Post date:** [March 18, 2019, 4:51am UTC](https://discuss.elastic.co/t/anomaly-detection-minimum-amount-base-data-requirement/172706/1 "2019-03-18T04:51:03Z")

</div>

hello,

i am planning to subscribe x-pack platinum license for a cluster which I am currently managing. i will use anomaly detection feature, and have a couple questions about minimum requirement of source data.

is there minimum source data time period for pattern analysis / forecast?

i tested myself with only one week sample data. it looked okay for me but still need some advices. if there are any guidance about minimum source data requirement for better / more accurate result, please advise.

thank you!

---

<div class="post-metadata">

**Author:** ![richcollier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/richcollier/32/115035_2.png) [@richcollier](https://discuss.elastic.co/u/richcollier)\
**Post date:** [March 18, 2019, 3:23pm UTC](https://discuss.elastic.co/t/anomaly-detection-minimum-amount-base-data-requirement/172706/2 "2019-03-18T15:23:57Z")

</div>

It depends on the data set, the volume (events per unit time) and the overall periodicity of the data set. In general, as little as a day’s worth of data can be enough to get a sufficient baseline, but this will get better when more data is seen. Often, a “sweet spot” is 3+ weeks worth of data if the data has time-of-day and day-of-week cycles. The cool thing, however, is that historical data can be batch-executed through as fast as possible so that, even if you were to start analyzing the data today, you could start the analysis on data from a month ago. Within a couple of minutes or hours, that historical data would be analyzed and now you’re running in real-time as if you started ML a month ago!

---

<div class="post-metadata">

**Author:** ![jasony](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@jasony](https://discuss.elastic.co/u/jasony)\
**Post date:** [March 18, 2019, 11:55pm UTC](https://discuss.elastic.co/t/anomaly-detection-minimum-amount-base-data-requirement/172706/3 "2019-03-18T23:55:40Z")

</div>

Thank you for your explainations in detail.

My data volume is about a couple tera bytes per day, and weekdays and weekend show different trends.

I assume 1month data is okay for anomaly detection and forecase purposes; last 1week data analyze based on older 3weeks data.

Thank you!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 15, 2019, 11:55pm UTC](https://discuss.elastic.co/t/anomaly-detection-minimum-amount-base-data-requirement/172706/4 "2019-04-15T23:55:43Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
