---
# System prepended metadata

title: Challenge 2 - Time series classification

---

# Challenge 2 - Time series classification

## Dataset
- normalization
    - Standard scaler: schifo
    - Robust scaler: ok
- split in train e test
- balance it: class weights. oversample or: FOCAL LOSS
https://focal-loss.readthedocs.io/en/latest/
- noise reduction -> serie di fourier

Classe 0:    34 
Classe 1:    123
Classe 2:    270
Classe 3:    381
Classe 4:     62
Classe 5:    153
Classe 6:    313
Classe 7:     68
Classe 8:    120
Classe 9:    777
Classe 10:    77
Classe 11:    51
    
## Parameters
- Batch size: per ora 128
- Epochs: 200
- Use tuner search ? --> vorrei provarlo

## Models
- LSTM
- BiLSTM
- CNN
- Autoencoder ?


## Lomurno said:
What is the best strategy for preprocessing time series? Normalise in the range [0,1]? Standardise to mean 0 and variance 1? And with respect to which dimensions should these transformations be applied?

What if the current window size is not optimal? How to break up or aggregate different samples? How can the same preprocessing be applied during testing?

Is it possible, and does it make sense to build a ResNet-style model with Conv1Ds? And with recurrent layers?

What would be a good idea to do data augmentation with time series? What if new samples were generated automatically, e.g. from noise?


## PROVE Giulia
### First:
- LSTM
- Robust scaler

Locale:
- train: 0.9496 
- val: 0.6337 
C'è un cincinnino di overfitting :(((

Codalab: 0.6239419589

### Second:
- BiLSTM
- Robust scaler

Locale:
- train: 0.9352
- val: 0.6399

Notes:
- provare a mettere conv + LSTM
- 

## New strategies (14/12/2022)

1) ResNet sytle for 1D-CNN
2) Ensemble models with diff acc in diff classes
3) Try data augmentation:
    a) Duplicating
    b) With autoencoder
4) Try Focal loss



