This is the implementation code for "Quantifying Point Contributions: A Lightweight Framework for Efficient and Effective Query-Driven Trajectory Simplification".
- Python >= 3.10
- Recommended: Latest versions of PyTorch and PyTorch Geometric
- Other dependencies: tqdm, path, rtree
- Download the GeoLife dataset from here and extract it to the
./TrajDatafolder. - Preprocess the database using
python Utils.preprocessing_trajs.py. - Generate training and testing sets using
python Utils.dataset.py.
- Run
BertPretrain.pyto perform pretraining. - Every 100 epochs, the model will be saved in the
./ModelSave/{dataset}/pretrainfolder.
- Run
MLTrain.pyto train GNN-TS and Diff-TS. - Trained models will be saved in
./ModelSave/{dataset}/.
- Run
validation.pyfor testing. - The compressed results will be saved in
./SimpTraj. - Query-related files will be saved in
./Val.