Training Deep Time Series Classification/Anomaly Models

Training time series classification models is a relatively new feature in FF. It follows the same general approach as forecasting models but with a few subtle differences. See our full tutorial notebook on Kaggle here.

File Format

For our GeneralClassificationLoader class files should be pre-formated as follows. Future data-loaders may feature additional

Datetime

MeanMilkProduction (kg/lactation)

Temperature

cow_class

Datetime

MeanMilkProduction (kg/lactation)

Temperature

cow_class

12/24/20

95

55

 

12/25/20

190

45

 

12/26/20

165

42

 

12/27/20

 

8552

 

 

53

10529

 

 

54

9924

2

 

92

10533

 

 

115

9167

 

 

180

9289

 

 

97

8343

 

 

84

9005

 

 

82

8867

4

 

80

9352

 

 

77

8900

 

Required Parameters

In general parameters are similar to the parameters you would supply models for TS forecasting

sequence_length: The length of the time series sequence you wish to classify. At the moment GeneralClassificationLoader solely supports sequences if the same length. If you have sequences of varying lengths we recommended padding the sequences.

Example Notebook

You can find an end-to-end example at the link below.

Time Series Classification with Flow Forecast (FF)

Design and Implementation Notes

 

Check List

Implement and test GeneralClassification Data Loader
Add calculation of additional metrics
Precision
F1
Revised plotting to Weights and Biases
Logging of ROC plots
Refactoring and cleaning up plot functions in trainer.py
End to end integration test
Example classification Kaggle notebook

Questions?

Can existing plot functions work with classification tasks?

Is a test-loader really necessary? Why would we want to plot the results in this case…

Additional Changes

  • There has been some odd behavior with the ROC curves so we may want to look into that 12/21/22

  •