https://github.com/h-iaac/ml-har
Meta-Learning HAR
https://github.com/h-iaac/ml-har
Last synced: 3 months ago
JSON representation
Meta-Learning HAR
- Host: GitHub
- URL: https://github.com/h-iaac/ml-har
- Owner: H-IAAC
- Created: 2024-06-28T00:28:29.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-11-03T23:32:24.000Z (8 months ago)
- Last Synced: 2024-11-04T00:22:01.367Z (8 months ago)
- Language: Python
- Size: 275 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Meta-training for Human-Activity Recogniton (HAR)
These codes implements OML (Online aware Meta-Learning) and MAML-Rep approaches to HAR datasests (PAMAP2, HAPT, UCIHAR, and DSADS)
This approach is based on the paper:
Meta-Learning Representations for Continual Learning by Khurram Javed and Martha White
Paper : https://arxiv.org/abs/1905.12588
The original OML code can be found at
https://github.com/khurramjaved96/mrclThe code provided by the authors were used as a base to support:
1) new scenarios of continual learning: nc (new classes)
2) HAR/time series datasets
3) pipeline to experiment execution, configurable to different combination of parameteres
4) set of plots, including stats per class, iteration, average, etc.# Main files:
|File |Description |
|-------------------------------|----------------------------------------|
|meta-training.py | RLN training |
|meta-testing.py | meta-testing |
|run_meta-testing.py | runs meta-testing |
|run_encoders_nc.sh | runs encoders training |
|run_meta-testing_batch.sh | runs meta-testing in batch |# Main directories
|Folder |Description |
|-------------------------------|-------------------------------------|
|configs |parametrization files |
|datasets | classes and codes for dataset and benchmark preprocessing |
|model| classes for model setting and meta-learning |
|oml|oml model setting |
|utils |main experiments' common classes with various purposes |# Execution examples
**meta-training - encoder training - RLN**
python meta-training.py --dataset=pamap2 --scenario=nc --steps=25000 --plot --reset --new_seed --runs=5 --random --model 'oml'
**meta-testing**
python meta-testing.py --model 'maml' --path --plot --plot_file plot_meta-testing.py --runs 20 --classes_schedule 2 --new_seed --reset_weights --iid
**batch **
python meta-testing_batch.py --dataset=pamap2 --steps=50 --runs=5 --lr=0.001 --plot --scenario nc --new_seed --augmentation [Jitter,Scale,Perm,TimeW,MagW]
**notes**
- Parametrization description can be found in ../configs/classification/class_parser* files
- Examples of sh file to run meta-training in run_encoders_nc.sh
- Examples of sh file to run batch baseline in run_meta-testing_batch.sh