So Far Yet So Near: Time series data augmentation with exploring non-semantic boundaries based on reinforcement learning (ICASSP2025)
This is the Official PyTorch implementation of our ICASSP2025 paper "So Far Yet So Near: Time series data augmentation with exploring non-semantic boundaries based on reinforcement learning".
# build with python3.10
conda create --name FreqSYNenv python=3.10e
conda activate FreqSYNenv
pip install -r requirments.txt
- We provide a data loading API in our code, which can be customized to suit the characteristics of specific datasets.
- The detailed loading functions are available in
Code/Utils/Func.py
.
- The downstream task classifier should be integrated into our reinforcement learning framework, and must be provided prior to the reinforcement learning training process.
- We provide a basic training script for MMCNN, a well-known classifier in the EEG signal domain, which can be used by
python Code/Train/Classifier_train.py --dataset your_dataset
- Tips: the path of your dataset should be set in the script before training
-
Before training the augmentation agent within the RL framework, the RL training configuration must be set. We provide an example in
Config/train_config_2a.json
, which should be adjusted to fit specific datasets. -
For training the RL Agent, you can use the following command:
python Code/train.py --train_name=your_train_name --train_cfg=/path/to/your/train/config.json # for more arguments setting, you can use: python Code/train.py --help
- For getting the Augmentated data which generated by the agent, the following command should be used:
python3 Code/Test/Get_Aug_data.py --train_cfg /same/as/the/config/in/train --agent_path /the/best/agent/saved/in/train
- After getting the augmented data, the classifier should be trained again with augmented data by using:
# Tips: the augmented data path should be setting before python Code/Train/Classifier_train.py --dataset your_dataset --train_mode aug