Here I have dataset import from csv file. I want to predict the next value with the time series. Can we use nonlinear regression model to predict the value for next time period or Is there any regression model can we use to predict the value?

Here I upload the subset of my original dataset.

 Time     x     x1   x2     y
0:06:00  63    NaN   NaN   63
0:07:00  63    NaN   20    104
0:08:00  104   11     0     93
0:09:00  93    0      0     ?

enter image description here


closed as unclear what you're asking by Stephen Rauch, oW_, Siong Thye Goh, Sean Owen Sep 16 '18 at 2:30

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.


If your data is time series data then you should analyze it accordingly, with a time series model. Alternatively, you could build a regression model with polynomials or splines, depending on your data and how "curvy" it is. Another option would be a GAM model (Generalized Additive Model), which works very well with curves of various shapes.

  • $\begingroup$ @ user2974951 Here I upload the graph for refer. Can I use these models which were u described to predict the model according to the graph? $\endgroup$ – user59020 Sep 14 '18 at 9:36
  • $\begingroup$ Your graph is very curvy, so you could use splines or GAM's but not polynomials, that is if you do not want to do time series analysis. $\endgroup$ – user2974951 Sep 14 '18 at 9:37
  • $\begingroup$ @ user2974951 Can I use tensorflow or sklearn to predict my next value in python? $\endgroup$ – user59020 Sep 14 '18 at 9:44
  • $\begingroup$ If they include these models then sure. $\endgroup$ – user2974951 Sep 14 '18 at 9:45
  • $\begingroup$ @ user2974951 Okay I will try this method. Thank you. According to my dataset I want to predict the values after one hour one hour (t, t+1, t+2...) , then how to write the code for that while doing prediction. I tried it and I stuck with this procedure. Do you have any idea to solve this problem? $\endgroup$ – user59020 Sep 14 '18 at 10:00