readme: ---
  library_name: keras
  tags:
  - timeseries
  ---
  
  # Timeseries classification from scratch
  
  Based on the _Timeseries classification from scratch_ example on [keras.io](https://keras.io/examples/timeseries/timeseries_classification_from_scratch/) created by [hfawaz](https://github.com/hfawaz/).
  
  ## Model description
  
  The model is a Fully Convolutional Neural Network originally proposed in [this paper](https://arxiv.org/abs/1611.06455).
  The implementation is based on the TF 2 version provided [here](https://github.com/hfawaz/dl-4-tsc/).
  The hyperparameters (kernel_size, filters, the usage of BatchNorm) were found via random search using [KerasTuner](https://github.com/keras-team/keras-tuner).
  
  ## Intended uses & limitations
  
  Given a time series of 500 samples, the goal is to automatically detect the presence of a specific issue with the engine.
  
  The data used to train the model was already _z-normalized_: each timeseries sample has a mean equal to zero and a standard deviation equal to one.
  
  ## Training and evaluation data
  
  The dataset used here is called [FordA](http://www.j-wichard.de/publications/FordPaper.pdf). The data comes from the [UCR archive](https://www.cs.ucr.edu/%7Eeamonn/time_series_data_2018/). The dataset contains:
  
   - 3601 training instances
   - 1320 testing instances
   
   Each timeseries corresponds to a measurement of engine noise captured by a motor sensor.
   
  ## Training procedure
  
  ### Training hyperparameters
  
  The following hyperparameters were used during training:
  
  | name | learning_rate | decay | beta_1 | beta_2 | epsilon | amsgrad | training_precision |
  |----|-------------|-----|------|------|-------|-------|------------------|
  |Adam|9.999999747378752e-05|0.0|0.8999999761581421|0.9990000128746033|1e-07|False|float32|
  
   ## Model Plot
  
  <details>
  <summary>View Model Plot</summary>
  
  ![Model Image](./model.png)
  
  </details>
  
  
  <center>
  Model reproduced by <a href="https://github.com/EdAbati" target="_blank">Edoardo Abati</a>
  </center>
  