
# HOURGLASS

## Requirements

If you use conda as package manager you can use to create a virtual environment:
```bash
  conda create -n hourglass 
  conda activate hourglass
```
or if use venv
```
  python -m venv env 
  source env/bin/activate         #If you use Linux or Mac
  .\venv\Scripts\Activate.ps1     #If you use Windows
```
you can install dependencies in ```requirements.txt```

```
  pip install -r requirements.txt

```
If you prefer to install manually

```
  pip install torch-scatter torch-sparse torch-cluster torch-spline-conv torch-geometric
  pip install ogb
  pip install dgl
  pip install networkx
  pip install h5py
```
After that, you have to install the necessary dependencies that computes persistence diagrams

```
  cd torch_ph
  python setup_rephine.py install 
  python setup_std_ph.py install
  python setup_forward_backward.py install
```


### Run Commands

For the main experiments, we run the ```main.py``` with the arguments in ```cli_main.py```. For instance, to run RePHINE
and Standard on NCI109 combined with a GCN model, we run:
```
python main.py --dataset NCI109  --diagram_type forward_backward --gnn gcn   
python main.py --dataset NCI109  --diagram_type rephine --gnn gcn   
python main.py --dataset NCI109  --diagram_type standard --gnn gcn   
```



## Acknowledgments
Some of the routines in this repo were modified from [REPHINE](https://github.com/Aalto-QuML/RePHINE) 

