# Simple baselines

The main content of this project lies in the `simple_run_scripts`.

## Run

To run the scripts, you can `run_experiments.py` for the TGB workloads and `run_benchtemp_exp_with_sampled_metrics.py` for BenchTemp. 


## Create your own (stacked) heuristic!

If you wish to create your own heuristic, make sure that it: 
- Implements all the functions of the abstract base class `Tracker` in `trackers/base.py`. 
- Gives a score which is an integer (a natural number) with a max value (assuming you wish to utilize the `FenwickTree` ranking technique). 

To create your own stacked heuristic, you can do: 


```python3 

from simple_run_scripts.trackers.global_tracker import GlobalRecencyTracker
from simple_run_scripts.trackers.popularity_tracker import GlobalPopularityTracker
from simple_run_scripts.trackers.combination_ranker import CombinationTracker

# Create [GR, GP] ranker
class CustomTracker(CombinationTracker):
    def __init__(self, all_timestamps, num_nodes, num_edges):
        trackers = [
            GlobalRecencyTracker(all_timestamps, num_nodes, num_edges),
            GlobalPopularityTracker(all_timestamps, num_nodes, num_edges),
        ]
        super().__init__(
            all_timestamps, 
            num_nodes, 
            num_edges, 
            trackers_list=trackers
        )
```