Predict prices with tensorflow

This is a sample of my dataset:

            dolar   selic       barril  diesel  ipca
data                    
2012-01-02  1.7376  0.039270    193.79  2.040   0.47
2012-01-03  1.7152  0.039270    210.87  2.042   0.26
2012-01-04  1.7152  0.039270    210.87  2.042   0.26
2012-01-05  1.7152  0.039270    210.87  2.042   0.26
2012-01-06  2.0350  0.031976    185.79  2.045   0.07

I need to predict the diesel variable for the next 30, 60 and 90 days. My dataset has values from 2012-01-02 to 2022-03-16.

        dolar       selic       barril       diesel     ipca
count   3727.000000 3727.000000 3727.000000 3727.000000 3727.000000
mean    3.500505    0.032195    224.446305  3.124171    0.447105
std     1.151149    0.013411    69.854573   0.775228    0.209740
min     1.702400    0.007469    112.040000  2.038000    -0.060000
25%     2.367550    0.024620    175.970000  2.501000    0.250000
50%     3.310300    0.030177    210.930000  3.024000    0.460000
75%     4.077150    0.041957    247.625000  3.530000    0.600000
max     5.937200    0.052531    454.660000  5.359000    0.920000

I know that I should use tensorflow but Which approach should I use and how can I implement it?

Topic forecasting tensorflow time-series machine-learning

Category Data Science


First of all, start with shifting your data with 30 or 60 or 90 days. Each one is a different model meaning that you can't use the trained model of 30 to predict 90. Start with 30 and you can just change the parameters.

Since you have different features, this is more of a regression problem. Or you can forget your features and use timeseries (LSTM models).

The other part will be just googling and finding ressources. If you are not familiar with machine learning, I would suggest to learn the basic before. Learn what does it mean train, test split especially on time indexed dataset. If you are already familiar with this, learn about tensorflow and how it is different from sklearn. The learning curve is a little bit more difficult. If you master this you can easily decode every avalaible notebook out there.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.