First attempt Predicting temp/humidity using tabular data

Hi everyone,
this is my first post here - so please be patient!

I am starting playing with fastai. I need some help if you please.

I have a time series with date-time, temperature and Humidity from 2015 to 2023. The time step its every 20 min. It looks like:
date-Time Temperature Humidity
16/9/2018 4:30 15.9 100
16/9/2018 4:50 15.8 100

I made this quick code reading the book.

import pandas as pd
from fastai.tabular.all import *

df = pd.read_csv(‘AgSpiridon_short.csv’)

dls = TabularDataLoaders.from_csv(‘AgSpiridon_short.csv’,
cat_names = [‘date-Time’],
cont_names = [‘Humidity’],
procs = [Categorify, FillMissing, Normalize] )

learn = tabular_learner(dls, metrics=accuracy)


my questions.

  1. Is it proper to deal time-date values with this format as cat_names ?
  2. My model its a failure - accuracy 0.00065
  3. Do i have to make a train dataframe ? or fastai can train the model with this simple code?


Welcome Chris. I’m still learning fastai, so don’t have a direct answer to your question,
but just curious, how far through have you got? I vaguely remember a mention of time series in there. Also you might try…

I’d be interested in hearing what ends up working for you.

Hi Ben,

I have taken a fast look in almost every course of fastai. Soon I have understood that my problem fits into the tabular category but the closer to time series analysis with fastAI is from Zachary Mueller at

The next days from your email I have found a ton of information about Time Series Analysis.

According to your problem I can send you some information if you like. There are so many details about LSTM, RNN and so on.

Best Regards

Did you check GitHub - timeseriesAI/tsai: Time series Timeseries Deep Learning Machine Learning Pytorch fastai | State-of-the-art Deep Learning library for Time Series and Sequences in Pytorch / fastai
there are also a lot of examples and well documented with state of art models.