taxi

Winning entry to the Kaggle taxi competition
git clone https://esimon.eu/repos/taxi.git
Log | Files | Refs | README

train_poi.py (417B)


      1 #!/usr/bin/env python
      2 
      3 import os
      4 
      5 import data
      6 from data.hdf5 import TaxiDataset
      7 from visualizer import Path
      8 
      9 
     10 poi = {
     11     'longest': 1492417
     12 }
     13 
     14 if __name__ == '__main__':
     15     prefix = os.path.join(data.path, 'visualizer', 'Train POI')
     16     if not os.path.isdir(prefix):
     17         os.mkdir(prefix)
     18 
     19     d = TaxiDataset('train')
     20     for (k, v) in poi.items():
     21         Path(d.extract(v)).save(os.path.join('Train POI', k))