# \[6.1.1\] Machine Learning Job: "Rolling" Datafeed Period

**URL:** <https://discuss.elastic.co/t/6-1-1-machine-learning-job-rolling-datafeed-period/118711>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-machine-learning\
**Created:** [February 6, 2018, 8:12pm UTC](https://discuss.elastic.co/t/6-1-1-machine-learning-job-rolling-datafeed-period/118711 "2018-02-06T20:12:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gmatheus](https://avatars.discourse-cdn.com/v4/letter/g/bb73d2/32.png) [@gmatheus](https://discuss.elastic.co/u/gmatheus)\
**Post date:** [February 6, 2018, 8:12pm UTC](https://discuss.elastic.co/t/6-1-1-machine-learning-job-rolling-datafeed-period/118711/1 "2018-02-06T20:12:26Z")

</div>

Hello!

I'm testing some ML Jobs with daily bucket span over my Elasticsearch data for different datafeed periods and I've noticed different anomaly points as I changed the datafeed start time. For example, the job below is configured to query all data (`Start at beginning of data` option) until now (`No end time` option):

 ![11](https://us1.discourse-cdn.com/elastic/original/3X/2/4/2454ca5f0aef19bd96cb0ccabb11de187ee2064f.png)

This second example's datafeed started at the end of January (24/01) until now:

 ![47](https://us1.discourse-cdn.com/elastic/original/3X/1/2/1239c63fda2f1e5a8e2161a7569074d694464c65.png)

Probably the first one wasn't an anomaly because of the past metric value (since datafeed is querying all data), but it should have been an anomaly compared to the last 10 days.

Is there a way to configure the start/end time of my ML Job datafeed in order to consider only **"Last x days"** in analysis (something like a "rolling" period: `now-10d`)?

Thanks!

---

<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:** [February 10, 2018, 12:27pm UTC](https://discuss.elastic.co/t/6-1-1-machine-learning-job-rolling-datafeed-period/118711/2 "2018-02-10T12:27:30Z")

</div>

Hello Gustavo,

Yes, you will obviously get different results depending on when you start your analysis and the characteristics of the data during that period of time.

ML is designed to be constantly evaluating your data, understanding and modeling its behaviors over all of the time it has seen your data. The main benefit is near-real-time alerting without having to set a static threshold alert.

If you're only interested in a visual analysis over a window of time, I'd encourage you to look at the features of timelion ([https://www.elastic.co/blog/timelion-tutorial-from-zero-to-hero](https://www.elastic.co/blog/timelion-tutorial-from-zero-to-hero))

Hope that helps!

---

<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:** [March 10, 2018, 12:28pm UTC](https://discuss.elastic.co/t/6-1-1-machine-learning-job-rolling-datafeed-period/118711/3 "2018-03-10T12:28:07Z")

</div>

Closed on March 10, 2018, 12:28pm UTC

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