taxi

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

bidirectional_tgtcls_2.py (712B)


      1 import os
      2 import cPickle
      3 
      4 from blocks.initialization import IsotropicGaussian, Constant
      5 
      6 import data
      7 from model.bidirectional_tgtcls import Model, Stream
      8 
      9 
     10 with open(os.path.join(data.path, 'arrival-clusters.pkl')) as f: tgtcls = cPickle.load(f)
     11 
     12 dim_embeddings = [
     13     ('origin_call', data.origin_call_train_size, 10),
     14     ('origin_stand', data.stands_size, 10),
     15     ('week_of_year', 52, 10),
     16     ('day_of_week', 7, 10),
     17     ('qhour_of_day', 24 * 4, 10),
     18     ('taxi_id', data.taxi_id_size, 10),
     19 ]
     20 
     21 hidden_state_dim = 20
     22 
     23 dim_hidden = [100]
     24 
     25 embed_weights_init = IsotropicGaussian(0.01)
     26 weights_init = IsotropicGaussian(0.1) 
     27 biases_init = Constant(0.01)
     28 
     29 batch_size = 50
     30 batch_sort_size = 40
     31 
     32 max_splits = 200
     33