Authors: Giovanni De Felice, Andrea Cini, Daniele Zambon, Vladimir Gusev, Cesare Alippi
Code and official repository for the paper "Graph-based Virtual Sensing from Sparse and Partial Multivariate Observations". In this paper, we propose a graph-based methodology for tackling virtual sensing in a sparse and multivariate setting. The present code implementation is based on Torch Spatiotemporal, a library built to accelerate research on neural spatiotemporal data processing methods.
Guidelines for executing the code. (Tested with Python 3.10 on Ubuntu 22.04.3 LTS)
- install dependencies:
conda update conda
conda env create -f conda_env_linux.yml
conda activate ggnet
- install torch spatiotemporal
open a terminal in the directory where the 'README.txt' is located
git clone https://github.com/TorchSpatiotemporal/tsl.git
cd tsl
pip install -e .
- create datasets:
-
climate: use the script
data/NASA_data/build_dataset.py
. This will download data from the API. Then save the output intodata/NASA_data/clmDaily.pkl
ordata/NASA_data/clmHourly.pkl
(may take some time to complete) -
photovoltaic: First, install install xarray:
pip install xarray
. Downloadcoordinates.nc
andmodule_00.tar.gz
(~86 Gb) from https://scholarsphere.psu.edu/resources/dacba268-d084-4e0e-a674-670217c59891 and place both into thedata/Photovoltaic
folder. Finally, modify and use the scriptdata/Photovoltaic/build_dataset.py
. One dataset with 50 nodes is provided in the code. -
feel free to contact me for support or requesting built datasets
-
choose model and dataset in
config.yaml
-
choose setting, e.g., number of epochs, in
default.yaml
(optional) to enable logging, uncomment and personalize the wandb configurations into default.yaml
- run the code:
python run.py config=config