# How to predict N days using data frame regression model and streaming data?

**URL:** <https://discuss.elastic.co/t/how-to-predict-n-days-using-data-frame-regression-model-and-streaming-data/272666>\
**Category:** Kibana\
**Tags:** elastic-stack-machine-learning\
**Created:** [May 11, 2021, 10:03am UTC](https://discuss.elastic.co/t/how-to-predict-n-days-using-data-frame-regression-model-and-streaming-data/272666 "2021-05-11T10:03:19Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![inhinyera16](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/inhinyera16/32/61625_2.png) [@inhinyera16](https://discuss.elastic.co/u/inhinyera16)\
**Post date:** [May 11, 2021, 10:03am UTC](https://discuss.elastic.co/t/how-to-predict-n-days-using-data-frame-regression-model-and-streaming-data/272666/1 "2021-05-11T10:03:19Z")

</div>

We have given system metrics dataset and the requirement is to predict when do we need to upgrade our servers. Basically what were trying to do is capacity planning using regression analysis. Were done with creating the model, but how do we implement this in a streaming dataset? and be able to predict/forecast the next N days?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 11, 2021, 11:09pm UTC](https://discuss.elastic.co/t/how-to-predict-n-days-using-data-frame-regression-model-and-streaming-data/272666/2 "2021-05-11T23:09:23Z")

</div>

Is this in reference to Machine Learning?

---

<div class="post-metadata">

**Author:** ![inhinyera16](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/inhinyera16/32/61625_2.png) [@inhinyera16](https://discuss.elastic.co/u/inhinyera16)\
**Post date:** [May 12, 2021, 7:02am UTC](https://discuss.elastic.co/t/how-to-predict-n-days-using-data-frame-regression-model-and-streaming-data/272666/3 "2021-05-12T07:02:00Z")

</div>

yes 🙂

---

<div class="post-metadata">

**Author:** ![inhinyera16](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/inhinyera16/32/61625_2.png) [@inhinyera16](https://discuss.elastic.co/u/inhinyera16)\
**Post date:** [May 12, 2021, 10:29am UTC](https://discuss.elastic.co/t/how-to-predict-n-days-using-data-frame-regression-model-and-streaming-data/272666/4 "2021-05-12T10:29:45Z")

</div>

Lets say were done preparing the model (through data frame), how can we implement this in our streaming data, that whenever we wanted to predict the future value for N days, we can easily visualize it in the dashboard?

---

<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:** [May 12, 2021, 9:57pm UTC](https://discuss.elastic.co/t/how-to-predict-n-days-using-data-frame-regression-model-and-streaming-data/272666/5 "2021-05-12T21:57:13Z")

</div>

Why not use [forecasting](https://www.elastic.co/guide/en/elasticsearch/reference/7.12/ml-forecast.html) instead of regression? Forecasting is much more appropriate for a streaming , near real-time use case. It leverages the unsupervised models built by the anomaly detection jobs, but you certainly don't have to pay attention to any of the anomalies raised by the jobs - just merely benefit from the [forecasts](https://www.elastic.co/guide/en/machine-learning/7.12/ml-overview.html#ml-forecasting).

---

<div class="post-metadata">

**Author:** ![inhinyera16](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/inhinyera16/32/61625_2.png) [@inhinyera16](https://discuss.elastic.co/u/inhinyera16)\
**Post date:** [May 20, 2021, 9:11am UTC](https://discuss.elastic.co/t/how-to-predict-n-days-using-data-frame-regression-model-and-streaming-data/272666/6 "2021-05-20T09:11:51Z")

</div>

For the purpose of capacity planning, yes anomaly detection can do that for sure. Thanks! But how about in the near future, if we want to use dat frame analytics, is there any way we can use the elastic forecast?

---

<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:** [June 17, 2021, 9:12am UTC](https://discuss.elastic.co/t/how-to-predict-n-days-using-data-frame-regression-model-and-streaming-data/272666/7 "2021-06-17T09:12:01Z")

</div>

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