How to create linear prediction

Hello,

I would like to create a linear prediction out of a measurement.
I know the holtWinters() function, here I am looking for a simple linear predictiion.

Especially I cannot imagine how to create datapoints with a timestamp in the future. holtWinters() can do it, only I would like to have a simple linear prediction.

What is the best approach?

Thanks!

1 Like

Hello @giorgio,
Welcome!
There are several ways to create points in the future.
you could take existing data and use timeshift() to project the values into the future.
Then you could replace the values with map() or reduce()
You could also initialize some empty data with array.from() or csv.from().

This contrib package might be of interest to you.

Let me know if you need more help. I’m happy to spend time extending this to make future points.

Thank you very much for the reply!
I will try to make it run, thimeshift() looks the most direct approach at first sight.