How to Run
Execute
process1.py
to convert thecsv
file into apkl
file.Run one of the
process2
scripts based on your requirements:Note: We use
-1000
to represent the position of package loss. You can apply various interpolation methods to fill these gaps. We highly encourage you to try our CSI-BERT model to recover the lost packages. (CSI-BERT, CSI-BERT2)(1) If you want to process each record into a long sequence, run
process2.py
. You can refer todataset.py
in CSI-BERT2 for guidance.(2) If you prefer to split each record into multiple fixed-length samples, run
process2-split.py
and modify thelength
parameter in the code to your desired length. You can refer todataset.py
in CSI-BERT, CrossFi, KNN-MMD, and LoFi for usage instructions.(3)
process2-squeeze-split.py
functions similarly toprocess2-split.py
, but it excludes all lost packages.