tomoyoshki / focal

Pytorch Implementation of FOCAL: Contrastive Learning for Multimodal Time-Series Sensing Signals in Factorized Orthogonal Latent Space
MIT License
20 stars 3 forks source link

How to run FOCAL and other models on our own dataset? #2

Closed shahaamirbader closed 1 month ago

shahaamirbader commented 2 months ago

Hi,

I was wondering how can I run FOCAL and the other models you have provided on my own time series dataset that contain signals related to ECG, EEG of participants?

tomoyoshki commented 2 months ago

Hi there,

Running FOCAL on Other Datasets

Once your data is prepared, you can:

  1. Update the task_default_task in params/params_util.py.
  2. Create a YAML file similar to data/MOD.yaml. This YAML file should include all the dataset and model configurations.
    • Key fields to update:
      • location_names (currently, we only support one location)
      • modality_names
      • num_segments
      • loc_mod_in_freq_channels
      • loc_mod_in_time_channels
      • loc_mod_in_spectrum_len
      • seq_len
    • You can also check out our paper for more details on these configurations.
  3. Ensure the model configuration in your YAML file matches the shape of your data.

Then, simply specify the dataset you would like to use in your command line: python train.py -model=[MODEL] -dataset=TestDataset -learn_framework=FOCAL.

I hope this helps! Please let me know if you have any other questions.