This repository aims to implement TimeSeries classification/regression algorithms. It makes extensive use of fastai V2!
I recommend to use Ignacio's tsai for a more complete and robust timeseries fastai based library. It is well documented and implemetns way more models that me here.
You will need to install fastai V2 from here and then you can do from within the environment where you installed fastai V2:
pip install timeseries_fastai
and you are good to go.
TL;DR
git clone https://github.com/fastai/fastai
cd fastai
conda env create -f environment.yml
source activate fastai
pip install fastai timeseries_fastai
Time Series Classification from Scratch with Deep Neural Networks: A Strong Baseline
The original paper repo is here is implemented in Keras/Tf.
- Notebook 01: This is a basic notebook that implements the Deep Learning models proposed in Time Series Classification from Scratch with Deep Neural Networks: A Strong Baseline.
InceptionTime: Finding AlexNet for Time SeriesClassification
The original paper repo is here
- Notebook 02: Added InceptionTime architecture from InceptionTime: Finding AlexNet for Time SeriesClassification.
You can run the benchmark using:
$python ucr.py --arch='inception' --tasks='all' --filename='inception.csv' --mixup=0.2
results_inception = pd.read_csv(Path.cwd().parent/'inception.csv', index_col=0)
display_df(results_inception)
from timeseries_fastai.imports import *
from timeseries_fastai.core import *
from timeseries_fastai.data import *
from timeseries_fastai.models import *
PATH = Path.cwd().parent
df_train, df_test = load_df_ucr(PATH, 'Adiac')
x_cols = df_train.columns[0:-2].to_list()
dls = TSDataLoaders.from_dfs(df_train, df_test, x_cols=x_cols, label_col='target', bs=16)
dls.show_batch()
inception = create_inception(1, len(dls.vocab))
learn = Learner(dls, inception, metrics=[accuracy])
learn.fit_one_cycle(1, 1e-3)