FluxML/FastAI.jl

Timeseries learning usecase

Opened this issue ยท 3 comments

Hi,

https://github.com/timeseriesAI/tsai is a TS package on top of FastAI python.

Just adding this to the wishlist. I might have some time to work on it (hopefully) for an upcoming project (or maybe will have to use the python package depending on cycles).

The salient question now is, are the mid-level abstractions sufficiently generic for the TS usecase and if not what needs to change to support that?

And how would this fit into the higher high level FasterAI stuff? Just musing out loud

I'll try to dig into that package this week to see what sort of functionality it needs.

I think the mid-level abstractions are sufficiently generic ๐Ÿ‘

I'm not familiar with the SOTA in time series, but here's a list of things that I think would need to be implemented for supervised time-series learning tasks:

  • a TimeSeries Block type. Used for visualization creating models automatically, data validation, BlockMethod creation, dataset discovery and more...
  • time-series datasets that can be downloaded using datasetpath
  • Dataset recipes that load those datasets into data containers usable for learning
  • if needed, Encodings that transform/augment the time series data

To make things work with the FasterAI stuff, you'd need to register some concrete recipes for datasets and provide some high-level BlockMethod constructors. In the end, training a model could look like this:

data, blocks = loaddataset("UCR", (TimeSeries, Label))
method = TimeSeriesClassification(blocks)
learner = methodlearner(method, data)
fitonecycle!(learner)
showpredictions(method, learner)

Would be great to have time series as an application in FastAI.jl, so let me know if you'd like more info on some of these points. See block.jl and encoding.jl for a bit more info on what implementing a Block entails.

Last I checked, TSAI integration with fastai proper was kind of tenuous, so we could definitely do better here. My big caveat is that time series is just as wide of a domain as images/computer vision, but less explored and nit nearly as well documented. i.e. something that would take at least a GSoC project's worth of work to get a satisfactory start on.

Hey @lorenzoh, So i was working on this issue.
For starting i was creating a TimeSeries Block type, According to me each struct should just contain an array of values, does that sound good ?
For e.g. If we this dataset (http://www.timeseriesclassification.com/description.php?Dataset=Adiac), each row is an instance, with class in first column and then the rest of columns contain the time series which can fit in a Array.