taxi

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

commit 98139f573eb179c8f5a06ba6c8d8883376814ccf
parent a4b190516d00428b1d8a81686a3291e5fa5f9865
Author: Étienne Simon <esimon@esimon.eu>
Date:   Thu,  2 Jul 2015 12:59:15 -0400

Remove _simple

Diffstat:
Aconfig/dest_mlp_2_cs.py | 27+++++++++++++++++++++++++++
Aconfig/dest_mlp_2_cswdt.py | 31+++++++++++++++++++++++++++++++
Aconfig/dest_mlp_2_noembed.py | 24++++++++++++++++++++++++
Rconfig/dest_simple_mlp_emb_only.py -> config/dest_mlp_emb_only.py | 0
Aconfig/dest_mlp_tgtcls_0_cs.py | 32++++++++++++++++++++++++++++++++
Aconfig/dest_mlp_tgtcls_1_cs.py | 32++++++++++++++++++++++++++++++++
Aconfig/dest_mlp_tgtcls_1_cswdt.py | 36++++++++++++++++++++++++++++++++++++
Aconfig/dest_mlp_tgtcls_1_cswdtx.py | 40++++++++++++++++++++++++++++++++++++++++
Aconfig/dest_mlp_tgtcls_1_cswdtx_alexandre.py | 37+++++++++++++++++++++++++++++++++++++
Dconfig/dest_simple_mlp_2_cs.py | 27---------------------------
Dconfig/dest_simple_mlp_2_cswdt.py | 31-------------------------------
Dconfig/dest_simple_mlp_2_noembed.py | 24------------------------
Dconfig/dest_simple_mlp_tgtcls_0_cs.py | 32--------------------------------
Dconfig/dest_simple_mlp_tgtcls_1_cs.py | 32--------------------------------
Dconfig/dest_simple_mlp_tgtcls_1_cswdt.py | 36------------------------------------
Dconfig/dest_simple_mlp_tgtcls_1_cswdtx.py | 40----------------------------------------
Dconfig/dest_simple_mlp_tgtcls_1_cswdtx_alexandre.py | 37-------------------------------------
Aconfig/joint_mlp_tgtcls_111_cswdtx.py | 54++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aconfig/joint_mlp_tgtcls_111_cswdtx_bigger.py | 54++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aconfig/joint_mlp_tgtcls_111_cswdtx_bigger_dropout.py | 60++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aconfig/joint_mlp_tgtcls_111_cswdtx_noise_dout.py | 61+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aconfig/joint_mlp_tgtcls_1_cswdtx.py | 54++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aconfig/joint_mlp_tgtcls_1_cswdtx_bigger.py | 54++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dconfig/joint_simple_mlp_tgtcls_111_cswdtx.py | 54------------------------------------------------------
Dconfig/joint_simple_mlp_tgtcls_111_cswdtx_bigger.py | 54------------------------------------------------------
Dconfig/joint_simple_mlp_tgtcls_111_cswdtx_bigger_dropout.py | 60------------------------------------------------------------
Dconfig/joint_simple_mlp_tgtcls_111_cswdtx_noise_dout.py | 61-------------------------------------------------------------
Dconfig/joint_simple_mlp_tgtcls_1_cswdtx.py | 54------------------------------------------------------
Dconfig/joint_simple_mlp_tgtcls_1_cswdtx_bigger.py | 54------------------------------------------------------
Aconfig/time_mlp_1.py | 27+++++++++++++++++++++++++++
Aconfig/time_mlp_2_cswdtx.py | 34++++++++++++++++++++++++++++++++++
Aconfig/time_mlp_tgtcls_2_cswdtx.py | 37+++++++++++++++++++++++++++++++++++++
Dconfig/time_simple_mlp_1.py | 27---------------------------
Dconfig/time_simple_mlp_2_cswdtx.py | 34----------------------------------
Dconfig/time_simple_mlp_tgtcls_2_cswdtx.py | 37-------------------------------------
Rmodel/dest_simple_mlp.py -> model/dest_mlp.py | 0
Rmodel/dest_simple_mlp_tgtcls.py -> model/dest_mlp_tgtcls.py | 0
Rmodel/joint_simple_mlp_tgtcls.py -> model/joint_mlp_tgtcls.py | 0
Rmodel/time_simple_mlp.py -> model/time_mlp.py | 0
Rmodel/time_simple_mlp_tgtcls.py -> model/time_mlp_tgtcls.py | 0
40 files changed, 694 insertions(+), 694 deletions(-)

diff --git a/config/dest_mlp_2_cs.py b/config/dest_mlp_2_cs.py @@ -0,0 +1,27 @@ +from blocks.initialization import IsotropicGaussian, Constant + +import data +from model.dest_mlp import Model, Stream + + +n_begin_end_pts = 5 # how many points we consider at the beginning and end of the known trajectory + +dim_embeddings = [ + ('origin_call', data.origin_call_train_size, 10), + ('origin_stand', data.stands_size, 10) +] + +dim_input = n_begin_end_pts * 2 * 2 + sum(x for (_, _, x) in dim_embeddings) +dim_hidden = [200, 100] +dim_output = 2 + +embed_weights_init = IsotropicGaussian(0.001) +mlp_weights_init = IsotropicGaussian(0.01) +mlp_biases_init = Constant(0.001) + +learning_rate = 0.0001 +momentum = 0.99 +batch_size = 32 + +valid_set = 'cuts/test_times_0' +max_splits = 100 diff --git a/config/dest_mlp_2_cswdt.py b/config/dest_mlp_2_cswdt.py @@ -0,0 +1,31 @@ +from blocks.initialization import IsotropicGaussian, Constant + +import data +from model.dest_mlp import Model, Stream + + +n_begin_end_pts = 5 # how many points we consider at the beginning and end of the known trajectory + +dim_embeddings = [ + ('origin_call', data.origin_call_train_size, 10), + ('origin_stand', data.stands_size, 10), + ('week_of_year', 52, 10), + ('day_of_week', 7, 10), + ('qhour_of_day', 24 * 4, 10), + ('day_type', 3, 10), +] + +dim_input = n_begin_end_pts * 2 * 2 + sum(x for (_, _, x) in dim_embeddings) +dim_hidden = [200, 100] +dim_output = 2 + +embed_weights_init = IsotropicGaussian(0.001) +mlp_weights_init = IsotropicGaussian(0.01) +mlp_biases_init = Constant(0.001) + +learning_rate = 0.0001 +momentum = 0.99 +batch_size = 32 + +valid_set = 'cuts/test_times_0' +max_splits = 100 diff --git a/config/dest_mlp_2_noembed.py b/config/dest_mlp_2_noembed.py @@ -0,0 +1,24 @@ +from blocks.initialization import IsotropicGaussian, Constant + +import data +from model.dest_mlp import Model, Stream + + +n_begin_end_pts = 5 # how many points we consider at the beginning and end of the known trajectory + +dim_embeddings = [] # do not use embeddings + +dim_input = n_begin_end_pts * 2 * 2 + sum(x for (_, _, x) in dim_embeddings) +dim_hidden = [200, 100] +dim_output = 2 + +embed_weights_init = IsotropicGaussian(0.001) +mlp_weights_init = IsotropicGaussian(0.01) +mlp_biases_init = Constant(0.001) + +learning_rate = 0.0001 +momentum = 0.99 +batch_size = 32 + +valid_set = 'cuts/test_times_0' +max_splits = 100 diff --git a/config/dest_simple_mlp_emb_only.py b/config/dest_mlp_emb_only.py diff --git a/config/dest_mlp_tgtcls_0_cs.py b/config/dest_mlp_tgtcls_0_cs.py @@ -0,0 +1,32 @@ +import os +import cPickle + +from blocks.initialization import IsotropicGaussian, Constant + +import data +from model.dest_mlp_tgtcls import Model, Stream + + +n_begin_end_pts = 5 # how many points we consider at the beginning and end of the known trajectory + +with open(os.path.join(data.path, 'arrival-clusters.pkl')) as f: tgtcls = cPickle.load(f) + +dim_embeddings = [ + ('origin_call', data.origin_call_train_size, 10), + ('origin_stand', data.stands_size, 10) +] + +dim_input = n_begin_end_pts * 2 * 2 + sum(x for (_, _, x) in dim_embeddings) +dim_hidden = [] +dim_output = tgtcls.shape[0] + +embed_weights_init = IsotropicGaussian(0.001) +mlp_weights_init = IsotropicGaussian(0.01) +mlp_biases_init = Constant(0.001) + +learning_rate = 0.0001 +momentum = 0.99 +batch_size = 32 + +valid_set = 'cuts/test_times_0' +max_splits = 100 diff --git a/config/dest_mlp_tgtcls_1_cs.py b/config/dest_mlp_tgtcls_1_cs.py @@ -0,0 +1,32 @@ +import os +import cPickle + +from blocks.initialization import IsotropicGaussian, Constant + +import data +from model.dest_mlp_tgtcls import Model, Stream + + +n_begin_end_pts = 5 # how many points we consider at the beginning and end of the known trajectory + +with open(os.path.join(data.path, 'arrival-clusters.pkl')) as f: tgtcls = cPickle.load(f) + +dim_embeddings = [ + ('origin_call', data.origin_call_train_size, 10), + ('origin_stand', data.stands_size, 10) +] + +dim_input = n_begin_end_pts * 2 * 2 + sum(x for (_, _, x) in dim_embeddings) +dim_hidden = [500] +dim_output = tgtcls.shape[0] + +embed_weights_init = IsotropicGaussian(0.001) +mlp_weights_init = IsotropicGaussian(0.01) +mlp_biases_init = Constant(0.001) + +learning_rate = 0.0001 +momentum = 0.99 +batch_size = 32 + +valid_set = 'cuts/test_times_0' +max_splits = 100 diff --git a/config/dest_mlp_tgtcls_1_cswdt.py b/config/dest_mlp_tgtcls_1_cswdt.py @@ -0,0 +1,36 @@ +import os +import cPickle + +from blocks.initialization import IsotropicGaussian, Constant + +import data +from model.dest_mlp_tgtcls import Model, Stream + + +n_begin_end_pts = 5 # how many points we consider at the beginning and end of the known trajectory + +with open(os.path.join(data.path, 'arrival-clusters.pkl')) as f: tgtcls = cPickle.load(f) + +dim_embeddings = [ + ('origin_call', data.origin_call_train_size, 10), + ('origin_stand', data.stands_size, 10), + ('week_of_year', 52, 10), + ('day_of_week', 7, 10), + ('qhour_of_day', 24 * 4, 10), + ('day_type', 3, 10), +] + +dim_input = n_begin_end_pts * 2 * 2 + sum(x for (_, _, x) in dim_embeddings) +dim_hidden = [500] +dim_output = tgtcls.shape[0] + +embed_weights_init = IsotropicGaussian(0.001) +mlp_weights_init = IsotropicGaussian(0.01) +mlp_biases_init = Constant(0.001) + +learning_rate = 0.0001 +momentum = 0.99 +batch_size = 32 + +valid_set = 'cuts/test_times_0' +max_splits = 100 diff --git a/config/dest_mlp_tgtcls_1_cswdtx.py b/config/dest_mlp_tgtcls_1_cswdtx.py @@ -0,0 +1,40 @@ +import os +import cPickle + +from blocks.initialization import IsotropicGaussian, Constant + +import data +from model.dest_mlp_tgtcls import Model, Stream + + +n_begin_end_pts = 5 # how many points we consider at the beginning and end of the known trajectory + +with open(os.path.join(data.path, 'arrival-clusters.pkl')) as f: tgtcls = cPickle.load(f) + +dim_embeddings = [ + ('origin_call', data.origin_call_train_size, 10), + ('origin_stand', data.stands_size, 10), + ('week_of_year', 52, 10), + ('day_of_week', 7, 10), + ('qhour_of_day', 24 * 4, 10), + ('day_type', 3, 10), + ('taxi_id', 448, 10), +] + +dim_input = n_begin_end_pts * 2 * 2 + sum(x for (_, _, x) in dim_embeddings) +dim_hidden = [500] +dim_output = tgtcls.shape[0] + +embed_weights_init = IsotropicGaussian(0.001) +mlp_weights_init = IsotropicGaussian(0.01) +mlp_biases_init = Constant(0.001) + +learning_rate = 0.0001 +momentum = 0.99 +batch_size = 100 + +use_cuts_for_training = True +max_splits = 1 + +valid_set = 'cuts/test_times_0' + diff --git a/config/dest_mlp_tgtcls_1_cswdtx_alexandre.py b/config/dest_mlp_tgtcls_1_cswdtx_alexandre.py @@ -0,0 +1,37 @@ +import os +import cPickle + +from blocks.initialization import IsotropicGaussian, Constant + +import data +from model.dest_mlp_tgtcls import Model, Stream + + +n_begin_end_pts = 5 # how many points we consider at the beginning and end of the known trajectory + +with open(os.path.join(data.path, 'arrival-clusters.pkl')) as f: tgtcls = cPickle.load(f) + +dim_embeddings = [ + ('origin_call', data.origin_call_train_size, 10), + ('origin_stand', data.stands_size, 10), + ('week_of_year', 52, 10), + ('day_of_week', 7, 10), + ('qhour_of_day', 24 * 4, 10), + ('day_type', 3, 10), + ('taxi_id', 448, 10), +] + +dim_input = n_begin_end_pts * 2 * 2 + sum(x for (_, _, x) in dim_embeddings) +dim_hidden = [500] +dim_output = tgtcls.shape[0] + +embed_weights_init = IsotropicGaussian(0.01) +mlp_weights_init = IsotropicGaussian(0.1) +mlp_biases_init = Constant(0.01) + +learning_rate = 0.01 +momentum = 0.9 +batch_size = 200 + +valid_set = 'cuts/test_times_0' +max_splits = 100 diff --git a/config/dest_simple_mlp_2_cs.py b/config/dest_simple_mlp_2_cs.py @@ -1,27 +0,0 @@ -from blocks.initialization import IsotropicGaussian, Constant - -import data -from model.dest_simple_mlp import Model, Stream - - -n_begin_end_pts = 5 # how many points we consider at the beginning and end of the known trajectory - -dim_embeddings = [ - ('origin_call', data.origin_call_train_size, 10), - ('origin_stand', data.stands_size, 10) -] - -dim_input = n_begin_end_pts * 2 * 2 + sum(x for (_, _, x) in dim_embeddings) -dim_hidden = [200, 100] -dim_output = 2 - -embed_weights_init = IsotropicGaussian(0.001) -mlp_weights_init = IsotropicGaussian(0.01) -mlp_biases_init = Constant(0.001) - -learning_rate = 0.0001 -momentum = 0.99 -batch_size = 32 - -valid_set = 'cuts/test_times_0' -max_splits = 100 diff --git a/config/dest_simple_mlp_2_cswdt.py b/config/dest_simple_mlp_2_cswdt.py @@ -1,31 +0,0 @@ -from blocks.initialization import IsotropicGaussian, Constant - -import data -from model.dest_simple_mlp import Model, Stream - - -n_begin_end_pts = 5 # how many points we consider at the beginning and end of the known trajectory - -dim_embeddings = [ - ('origin_call', data.origin_call_train_size, 10), - ('origin_stand', data.stands_size, 10), - ('week_of_year', 52, 10), - ('day_of_week', 7, 10), - ('qhour_of_day', 24 * 4, 10), - ('day_type', 3, 10), -] - -dim_input = n_begin_end_pts * 2 * 2 + sum(x for (_, _, x) in dim_embeddings) -dim_hidden = [200, 100] -dim_output = 2 - -embed_weights_init = IsotropicGaussian(0.001) -mlp_weights_init = IsotropicGaussian(0.01) -mlp_biases_init = Constant(0.001) - -learning_rate = 0.0001 -momentum = 0.99 -batch_size = 32 - -valid_set = 'cuts/test_times_0' -max_splits = 100 diff --git a/config/dest_simple_mlp_2_noembed.py b/config/dest_simple_mlp_2_noembed.py @@ -1,24 +0,0 @@ -from blocks.initialization import IsotropicGaussian, Constant - -import data -from model.dest_simple_mlp import Model, Stream - - -n_begin_end_pts = 5 # how many points we consider at the beginning and end of the known trajectory - -dim_embeddings = [] # do not use embeddings - -dim_input = n_begin_end_pts * 2 * 2 + sum(x for (_, _, x) in dim_embeddings) -dim_hidden = [200, 100] -dim_output = 2 - -embed_weights_init = IsotropicGaussian(0.001) -mlp_weights_init = IsotropicGaussian(0.01) -mlp_biases_init = Constant(0.001) - -learning_rate = 0.0001 -momentum = 0.99 -batch_size = 32 - -valid_set = 'cuts/test_times_0' -max_splits = 100 diff --git a/config/dest_simple_mlp_tgtcls_0_cs.py b/config/dest_simple_mlp_tgtcls_0_cs.py @@ -1,32 +0,0 @@ -import os -import cPickle - -from blocks.initialization import IsotropicGaussian, Constant - -import data -from model.dest_simple_mlp_tgtcls import Model, Stream - - -n_begin_end_pts = 5 # how many points we consider at the beginning and end of the known trajectory - -with open(os.path.join(data.path, 'arrival-clusters.pkl')) as f: tgtcls = cPickle.load(f) - -dim_embeddings = [ - ('origin_call', data.origin_call_train_size, 10), - ('origin_stand', data.stands_size, 10) -] - -dim_input = n_begin_end_pts * 2 * 2 + sum(x for (_, _, x) in dim_embeddings) -dim_hidden = [] -dim_output = tgtcls.shape[0] - -embed_weights_init = IsotropicGaussian(0.001) -mlp_weights_init = IsotropicGaussian(0.01) -mlp_biases_init = Constant(0.001) - -learning_rate = 0.0001 -momentum = 0.99 -batch_size = 32 - -valid_set = 'cuts/test_times_0' -max_splits = 100 diff --git a/config/dest_simple_mlp_tgtcls_1_cs.py b/config/dest_simple_mlp_tgtcls_1_cs.py @@ -1,32 +0,0 @@ -import os -import cPickle - -from blocks.initialization import IsotropicGaussian, Constant - -import data -from model.dest_simple_mlp_tgtcls import Model, Stream - - -n_begin_end_pts = 5 # how many points we consider at the beginning and end of the known trajectory - -with open(os.path.join(data.path, 'arrival-clusters.pkl')) as f: tgtcls = cPickle.load(f) - -dim_embeddings = [ - ('origin_call', data.origin_call_train_size, 10), - ('origin_stand', data.stands_size, 10) -] - -dim_input = n_begin_end_pts * 2 * 2 + sum(x for (_, _, x) in dim_embeddings) -dim_hidden = [500] -dim_output = tgtcls.shape[0] - -embed_weights_init = IsotropicGaussian(0.001) -mlp_weights_init = IsotropicGaussian(0.01) -mlp_biases_init = Constant(0.001) - -learning_rate = 0.0001 -momentum = 0.99 -batch_size = 32 - -valid_set = 'cuts/test_times_0' -max_splits = 100 diff --git a/config/dest_simple_mlp_tgtcls_1_cswdt.py b/config/dest_simple_mlp_tgtcls_1_cswdt.py @@ -1,36 +0,0 @@ -import os -import cPickle - -from blocks.initialization import IsotropicGaussian, Constant - -import data -from model.dest_simple_mlp_tgtcls import Model, Stream - - -n_begin_end_pts = 5 # how many points we consider at the beginning and end of the known trajectory - -with open(os.path.join(data.path, 'arrival-clusters.pkl')) as f: tgtcls = cPickle.load(f) - -dim_embeddings = [ - ('origin_call', data.origin_call_train_size, 10), - ('origin_stand', data.stands_size, 10), - ('week_of_year', 52, 10), - ('day_of_week', 7, 10), - ('qhour_of_day', 24 * 4, 10), - ('day_type', 3, 10), -] - -dim_input = n_begin_end_pts * 2 * 2 + sum(x for (_, _, x) in dim_embeddings) -dim_hidden = [500] -dim_output = tgtcls.shape[0] - -embed_weights_init = IsotropicGaussian(0.001) -mlp_weights_init = IsotropicGaussian(0.01) -mlp_biases_init = Constant(0.001) - -learning_rate = 0.0001 -momentum = 0.99 -batch_size = 32 - -valid_set = 'cuts/test_times_0' -max_splits = 100 diff --git a/config/dest_simple_mlp_tgtcls_1_cswdtx.py b/config/dest_simple_mlp_tgtcls_1_cswdtx.py @@ -1,40 +0,0 @@ -import os -import cPickle - -from blocks.initialization import IsotropicGaussian, Constant - -import data -from model.dest_simple_mlp_tgtcls import Model, Stream - - -n_begin_end_pts = 5 # how many points we consider at the beginning and end of the known trajectory - -with open(os.path.join(data.path, 'arrival-clusters.pkl')) as f: tgtcls = cPickle.load(f) - -dim_embeddings = [ - ('origin_call', data.origin_call_train_size, 10), - ('origin_stand', data.stands_size, 10), - ('week_of_year', 52, 10), - ('day_of_week', 7, 10), - ('qhour_of_day', 24 * 4, 10), - ('day_type', 3, 10), - ('taxi_id', 448, 10), -] - -dim_input = n_begin_end_pts * 2 * 2 + sum(x for (_, _, x) in dim_embeddings) -dim_hidden = [500] -dim_output = tgtcls.shape[0] - -embed_weights_init = IsotropicGaussian(0.001) -mlp_weights_init = IsotropicGaussian(0.01) -mlp_biases_init = Constant(0.001) - -learning_rate = 0.0001 -momentum = 0.99 -batch_size = 100 - -use_cuts_for_training = True -max_splits = 1 - -valid_set = 'cuts/test_times_0' - diff --git a/config/dest_simple_mlp_tgtcls_1_cswdtx_alexandre.py b/config/dest_simple_mlp_tgtcls_1_cswdtx_alexandre.py @@ -1,37 +0,0 @@ -import os -import cPickle - -from blocks.initialization import IsotropicGaussian, Constant - -import data -from model.dest_simple_mlp_tgtcls import Model, Stream - - -n_begin_end_pts = 5 # how many points we consider at the beginning and end of the known trajectory - -with open(os.path.join(data.path, 'arrival-clusters.pkl')) as f: tgtcls = cPickle.load(f) - -dim_embeddings = [ - ('origin_call', data.origin_call_train_size, 10), - ('origin_stand', data.stands_size, 10), - ('week_of_year', 52, 10), - ('day_of_week', 7, 10), - ('qhour_of_day', 24 * 4, 10), - ('day_type', 3, 10), - ('taxi_id', 448, 10), -] - -dim_input = n_begin_end_pts * 2 * 2 + sum(x for (_, _, x) in dim_embeddings) -dim_hidden = [500] -dim_output = tgtcls.shape[0] - -embed_weights_init = IsotropicGaussian(0.01) -mlp_weights_init = IsotropicGaussian(0.1) -mlp_biases_init = Constant(0.01) - -learning_rate = 0.01 -momentum = 0.9 -batch_size = 200 - -valid_set = 'cuts/test_times_0' -max_splits = 100 diff --git a/config/joint_mlp_tgtcls_111_cswdtx.py b/config/joint_mlp_tgtcls_111_cswdtx.py @@ -0,0 +1,54 @@ +import os +import cPickle + +from blocks.initialization import IsotropicGaussian, Constant + +import data +from model.joint_mlp_tgtcls import Model, Stream + + +n_begin_end_pts = 5 # how many points we consider at the beginning and end of the known trajectory + +with open(os.path.join(data.path, 'arrival-clusters.pkl')) as f: + dest_tgtcls = cPickle.load(f) + +# generate target classes for time prediction as a Fibonacci sequence +time_tgtcls = [1, 2] +for i in range(22): + time_tgtcls.append(time_tgtcls[-1] + time_tgtcls[-2]) + +dim_embeddings = [ + ('origin_call', data.origin_call_size, 10), + ('origin_stand', data.stands_size, 10), + ('week_of_year', 52, 10), + ('day_of_week', 7, 10), + ('qhour_of_day', 24 * 4, 10), + ('day_type', 3, 10), + ('taxi_id', 448, 10), +] + +# Common network part +dim_input = n_begin_end_pts * 2 * 2 + sum(x for (_, _, x) in dim_embeddings) +dim_hidden = [500] + +# Destination prediction part +dim_hidden_dest = [100] +dim_output_dest = len(dest_tgtcls) + +# Time prediction part +dim_hidden_time = [100] +dim_output_time = len(time_tgtcls) + +# Cost ratio between distance cost and time cost +time_cost_factor = 4 + +embed_weights_init = IsotropicGaussian(0.001) +mlp_weights_init = IsotropicGaussian(0.01) +mlp_biases_init = Constant(0.001) + +learning_rate = 0.0001 +momentum = 0.99 +batch_size = 200 + +valid_set = 'cuts/test_times_0' +max_splits = 100 diff --git a/config/joint_mlp_tgtcls_111_cswdtx_bigger.py b/config/joint_mlp_tgtcls_111_cswdtx_bigger.py @@ -0,0 +1,54 @@ +import os +import cPickle + +from blocks.initialization import IsotropicGaussian, Constant + +import data +from model.joint_mlp_tgtcls import Model, Stream + + +n_begin_end_pts = 10 # how many points we consider at the beginning and end of the known trajectory + +with open(os.path.join(data.path, 'arrival-clusters.pkl')) as f: + dest_tgtcls = cPickle.load(f) + +# generate target classes for time prediction as a Fibonacci sequence +time_tgtcls = [1, 2] +for i in range(21): + time_tgtcls.append(time_tgtcls[-1] + time_tgtcls[-2]) + +dim_embeddings = [ + ('origin_call', data.origin_call_size, 15), + ('origin_stand', data.stands_size, 10), + ('week_of_year', 52, 10), + ('day_of_week', 7, 10), + ('qhour_of_day', 24 * 4, 10), + ('day_type', 3, 10), + ('taxi_id', 448, 10), +] + +# Common network part +dim_input = n_begin_end_pts * 2 * 2 + sum(x for (_, _, x) in dim_embeddings) +dim_hidden = [5000] + +# Destination prediction part +dim_hidden_dest = [1000] +dim_output_dest = dest_tgtcls.shape[0] + +# Time prediction part +dim_hidden_time = [500] +dim_output_time = len(time_tgtcls) + +# Cost ratio between distance cost and time cost +time_cost_factor = 4 + +embed_weights_init = IsotropicGaussian(0.01) +mlp_weights_init = IsotropicGaussian(0.1) +mlp_biases_init = Constant(0.01) + +# use adadelta, so no learning_rate or momentum +batch_size = 200 + +valid_set = 'cuts/test_times_0' + +max_splits = 100 diff --git a/config/joint_mlp_tgtcls_111_cswdtx_bigger_dropout.py b/config/joint_mlp_tgtcls_111_cswdtx_bigger_dropout.py @@ -0,0 +1,60 @@ +import os +import cPickle + +from blocks.initialization import IsotropicGaussian, Constant +from blocks.bricks import Rectifier, Tanh, Logistic +from blocks.filter import VariableFilter +from blocks import roles + +import data +from model.joint_mlp_tgtcls import Model, Stream + + +n_begin_end_pts = 10 # how many points we consider at the beginning and end of the known trajectory + +with open(os.path.join(data.path, 'arrival-clusters.pkl')) as f: + dest_tgtcls = cPickle.load(f) + +# generate target classes for time prediction as a Fibonacci sequence +time_tgtcls = [1, 2] +for i in range(21): + time_tgtcls.append(time_tgtcls[-1] + time_tgtcls[-2]) + +dim_embeddings = [ + ('origin_call', data.origin_call_size, 15), + ('origin_stand', data.stands_size, 10), + ('week_of_year', 52, 10), + ('day_of_week', 7, 10), + ('qhour_of_day', 24 * 4, 10), + ('day_type', 3, 10), + ('taxi_id', 448, 10), +] + +# Common network part +dim_input = n_begin_end_pts * 2 * 2 + sum(x for (_, _, x) in dim_embeddings) +dim_hidden = [5000] + +# Destination prediction part +dim_hidden_dest = [1000] +dim_output_dest = dest_tgtcls.shape[0] + +# Time prediction part +dim_hidden_time = [500] +dim_output_time = len(time_tgtcls) + +# Cost ratio between distance cost and time cost +time_cost_factor = 4 + +embed_weights_init = IsotropicGaussian(0.01) +mlp_weights_init = IsotropicGaussian(0.1) +mlp_biases_init = Constant(0.01) + +dropout = 0.5 +dropout_inputs = VariableFilter(bricks=[Rectifier], name='output') + +# use adadelta, so no learning_rate or momentum +batch_size = 200 + +valid_set = 'cuts/test_times_0' + +max_splits = 100 diff --git a/config/joint_mlp_tgtcls_111_cswdtx_noise_dout.py b/config/joint_mlp_tgtcls_111_cswdtx_noise_dout.py @@ -0,0 +1,61 @@ +import os +import cPickle + +from blocks import roles +from blocks.bricks import Rectifier +from blocks.filter import VariableFilter +from blocks.initialization import IsotropicGaussian, Constant + +import data +from model.joint_mlp_tgtcls import Model, Stream + + +n_begin_end_pts = 5 # how many points we consider at the beginning and end of the known trajectory + +with open(os.path.join(data.path, 'arrival-clusters.pkl')) as f: + dest_tgtcls = cPickle.load(f) + +# generate target classes for time prediction as a Fibonacci sequence +time_tgtcls = [1, 2] +for i in range(22): + time_tgtcls.append(time_tgtcls[-1] + time_tgtcls[-2]) + +dim_embeddings = [ + ('origin_call', data.origin_call_size, 10), + ('origin_stand', data.stands_size, 10), + ('week_of_year', 52, 10), + ('day_of_week', 7, 10), + ('qhour_of_day', 24 * 4, 10), + ('day_type', 3, 10), + ('taxi_id', 448, 10), +] + +# Common network part +dim_input = n_begin_end_pts * 2 * 2 + sum(x for (_, _, x) in dim_embeddings) +dim_hidden = [500] + +# Destination prediction part +dim_hidden_dest = [100] +dim_output_dest = len(dest_tgtcls) + +# Time prediction part +dim_hidden_time = [100] +dim_output_time = len(time_tgtcls) + +# Cost ratio between distance cost and time cost +time_cost_factor = 4 + +embed_weights_init = IsotropicGaussian(0.001) +mlp_weights_init = IsotropicGaussian(0.01) +mlp_biases_init = Constant(0.001) + +batch_size = 200 + +dropout = 0.5 +dropout_inputs = VariableFilter(bricks=[Rectifier], name='output') + +noise = 0.01 +noise_inputs = VariableFilter(roles=[roles.PARAMETER]) + +valid_set = 'cuts/test_times_0' +max_splits = 100 diff --git a/config/joint_mlp_tgtcls_1_cswdtx.py b/config/joint_mlp_tgtcls_1_cswdtx.py @@ -0,0 +1,54 @@ +import os +import cPickle + +from blocks.initialization import IsotropicGaussian, Constant + +import data +from model.joint_mlp_tgtcls import Model, Stream + + +n_begin_end_pts = 5 # how many points we consider at the beginning and end of the known trajectory + +with open(os.path.join(data.path, 'arrival-clusters.pkl')) as f: + dest_tgtcls = cPickle.load(f) + +# generate target classes for time prediction as a Fibonacci sequence +time_tgtcls = [1, 2] +for i in range(22): + time_tgtcls.append(time_tgtcls[-1] + time_tgtcls[-2]) + +dim_embeddings = [ + ('origin_call', data.origin_call_size, 10), + ('origin_stand', data.stands_size, 10), + ('week_of_year', 52, 10), + ('day_of_week', 7, 10), + ('qhour_of_day', 24 * 4, 10), + ('day_type', 3, 10), + ('taxi_id', 448, 10), +] + +# Common network part +dim_input = n_begin_end_pts * 2 * 2 + sum(x for (_, _, x) in dim_embeddings) +dim_hidden = [500] + +# Destination prediction part +dim_hidden_dest = [] +dim_output_dest = len(dest_tgtcls) + +# Time prediction part +dim_hidden_time = [] +dim_output_time = len(time_tgtcls) + +# Cost ratio between distance cost and time cost +time_cost_factor = 4 + +embed_weights_init = IsotropicGaussian(0.001) +mlp_weights_init = IsotropicGaussian(0.01) +mlp_biases_init = Constant(0.001) + +learning_rate = 0.0001 +momentum = 0.99 +batch_size = 200 + +valid_set = 'cuts/test_times_0' +max_splits = 100 diff --git a/config/joint_mlp_tgtcls_1_cswdtx_bigger.py b/config/joint_mlp_tgtcls_1_cswdtx_bigger.py @@ -0,0 +1,54 @@ +import os +import cPickle + +from blocks.initialization import IsotropicGaussian, Constant + +import data +from model.joint_mlp_tgtcls import Model, Stream + + +n_begin_end_pts = 7 # how many points we consider at the beginning and end of the known trajectory + +with open(os.path.join(data.path, 'arrival-clusters.pkl')) as f: + dest_tgtcls = cPickle.load(f) + +# generate target classes for time prediction as a Fibonacci sequence +time_tgtcls = [1, 2] +for i in range(21): + time_tgtcls.append(time_tgtcls[-1] + time_tgtcls[-2]) + +dim_embeddings = [ + ('origin_call', data.origin_call_size, 15), + ('origin_stand', data.stands_size, 10), + ('week_of_year', 52, 10), + ('day_of_week', 7, 10), + ('qhour_of_day', 24 * 4, 10), + ('day_type', 3, 10), + ('taxi_id', 448, 10), +] + +# Common network part +dim_input = n_begin_end_pts * 2 * 2 + sum(x for (_, _, x) in dim_embeddings) +dim_hidden = [5000] + +# Destination prediction part +dim_hidden_dest = [] +dim_output_dest = dest_tgtcls.shape[0] + +# Time prediction part +dim_hidden_time = [] +dim_output_time = len(time_tgtcls) + +# Cost ratio between distance cost and time cost +time_cost_factor = 4 + +embed_weights_init = IsotropicGaussian(0.01) +mlp_weights_init = IsotropicGaussian(0.1) +mlp_biases_init = Constant(0.01) + +learning_rate = 0.0001 +momentum = 0.99 +batch_size = 200 + +valid_set = 'cuts/test_times_0' +max_splits = 100 diff --git a/config/joint_simple_mlp_tgtcls_111_cswdtx.py b/config/joint_simple_mlp_tgtcls_111_cswdtx.py @@ -1,54 +0,0 @@ -import os -import cPickle - -from blocks.initialization import IsotropicGaussian, Constant - -import data -from model.joint_simple_mlp_tgtcls import Model, Stream - - -n_begin_end_pts = 5 # how many points we consider at the beginning and end of the known trajectory - -with open(os.path.join(data.path, 'arrival-clusters.pkl')) as f: - dest_tgtcls = cPickle.load(f) - -# generate target classes for time prediction as a Fibonacci sequence -time_tgtcls = [1, 2] -for i in range(22): - time_tgtcls.append(time_tgtcls[-1] + time_tgtcls[-2]) - -dim_embeddings = [ - ('origin_call', data.origin_call_size, 10), - ('origin_stand', data.stands_size, 10), - ('week_of_year', 52, 10), - ('day_of_week', 7, 10), - ('qhour_of_day', 24 * 4, 10), - ('day_type', 3, 10), - ('taxi_id', 448, 10), -] - -# Common network part -dim_input = n_begin_end_pts * 2 * 2 + sum(x for (_, _, x) in dim_embeddings) -dim_hidden = [500] - -# Destination prediction part -dim_hidden_dest = [100] -dim_output_dest = len(dest_tgtcls) - -# Time prediction part -dim_hidden_time = [100] -dim_output_time = len(time_tgtcls) - -# Cost ratio between distance cost and time cost -time_cost_factor = 4 - -embed_weights_init = IsotropicGaussian(0.001) -mlp_weights_init = IsotropicGaussian(0.01) -mlp_biases_init = Constant(0.001) - -learning_rate = 0.0001 -momentum = 0.99 -batch_size = 200 - -valid_set = 'cuts/test_times_0' -max_splits = 100 diff --git a/config/joint_simple_mlp_tgtcls_111_cswdtx_bigger.py b/config/joint_simple_mlp_tgtcls_111_cswdtx_bigger.py @@ -1,54 +0,0 @@ -import os -import cPickle - -from blocks.initialization import IsotropicGaussian, Constant - -import data -from model.joint_simple_mlp_tgtcls import Model, Stream - - -n_begin_end_pts = 10 # how many points we consider at the beginning and end of the known trajectory - -with open(os.path.join(data.path, 'arrival-clusters.pkl')) as f: - dest_tgtcls = cPickle.load(f) - -# generate target classes for time prediction as a Fibonacci sequence -time_tgtcls = [1, 2] -for i in range(21): - time_tgtcls.append(time_tgtcls[-1] + time_tgtcls[-2]) - -dim_embeddings = [ - ('origin_call', data.origin_call_size, 15), - ('origin_stand', data.stands_size, 10), - ('week_of_year', 52, 10), - ('day_of_week', 7, 10), - ('qhour_of_day', 24 * 4, 10), - ('day_type', 3, 10), - ('taxi_id', 448, 10), -] - -# Common network part -dim_input = n_begin_end_pts * 2 * 2 + sum(x for (_, _, x) in dim_embeddings) -dim_hidden = [5000] - -# Destination prediction part -dim_hidden_dest = [1000] -dim_output_dest = dest_tgtcls.shape[0] - -# Time prediction part -dim_hidden_time = [500] -dim_output_time = len(time_tgtcls) - -# Cost ratio between distance cost and time cost -time_cost_factor = 4 - -embed_weights_init = IsotropicGaussian(0.01) -mlp_weights_init = IsotropicGaussian(0.1) -mlp_biases_init = Constant(0.01) - -# use adadelta, so no learning_rate or momentum -batch_size = 200 - -valid_set = 'cuts/test_times_0' - -max_splits = 100 diff --git a/config/joint_simple_mlp_tgtcls_111_cswdtx_bigger_dropout.py b/config/joint_simple_mlp_tgtcls_111_cswdtx_bigger_dropout.py @@ -1,60 +0,0 @@ -import os -import cPickle - -from blocks.initialization import IsotropicGaussian, Constant -from blocks.bricks import Rectifier, Tanh, Logistic -from blocks.filter import VariableFilter -from blocks import roles - -import data -from model.joint_simple_mlp_tgtcls import Model, Stream - - -n_begin_end_pts = 10 # how many points we consider at the beginning and end of the known trajectory - -with open(os.path.join(data.path, 'arrival-clusters.pkl')) as f: - dest_tgtcls = cPickle.load(f) - -# generate target classes for time prediction as a Fibonacci sequence -time_tgtcls = [1, 2] -for i in range(21): - time_tgtcls.append(time_tgtcls[-1] + time_tgtcls[-2]) - -dim_embeddings = [ - ('origin_call', data.origin_call_size, 15), - ('origin_stand', data.stands_size, 10), - ('week_of_year', 52, 10), - ('day_of_week', 7, 10), - ('qhour_of_day', 24 * 4, 10), - ('day_type', 3, 10), - ('taxi_id', 448, 10), -] - -# Common network part -dim_input = n_begin_end_pts * 2 * 2 + sum(x for (_, _, x) in dim_embeddings) -dim_hidden = [5000] - -# Destination prediction part -dim_hidden_dest = [1000] -dim_output_dest = dest_tgtcls.shape[0] - -# Time prediction part -dim_hidden_time = [500] -dim_output_time = len(time_tgtcls) - -# Cost ratio between distance cost and time cost -time_cost_factor = 4 - -embed_weights_init = IsotropicGaussian(0.01) -mlp_weights_init = IsotropicGaussian(0.1) -mlp_biases_init = Constant(0.01) - -dropout = 0.5 -dropout_inputs = VariableFilter(bricks=[Rectifier], name='output') - -# use adadelta, so no learning_rate or momentum -batch_size = 200 - -valid_set = 'cuts/test_times_0' - -max_splits = 100 diff --git a/config/joint_simple_mlp_tgtcls_111_cswdtx_noise_dout.py b/config/joint_simple_mlp_tgtcls_111_cswdtx_noise_dout.py @@ -1,61 +0,0 @@ -import os -import cPickle - -from blocks import roles -from blocks.bricks import Rectifier -from blocks.filter import VariableFilter -from blocks.initialization import IsotropicGaussian, Constant - -import data -from model.joint_simple_mlp_tgtcls import Model, Stream - - -n_begin_end_pts = 5 # how many points we consider at the beginning and end of the known trajectory - -with open(os.path.join(data.path, 'arrival-clusters.pkl')) as f: - dest_tgtcls = cPickle.load(f) - -# generate target classes for time prediction as a Fibonacci sequence -time_tgtcls = [1, 2] -for i in range(22): - time_tgtcls.append(time_tgtcls[-1] + time_tgtcls[-2]) - -dim_embeddings = [ - ('origin_call', data.origin_call_size, 10), - ('origin_stand', data.stands_size, 10), - ('week_of_year', 52, 10), - ('day_of_week', 7, 10), - ('qhour_of_day', 24 * 4, 10), - ('day_type', 3, 10), - ('taxi_id', 448, 10), -] - -# Common network part -dim_input = n_begin_end_pts * 2 * 2 + sum(x for (_, _, x) in dim_embeddings) -dim_hidden = [500] - -# Destination prediction part -dim_hidden_dest = [100] -dim_output_dest = len(dest_tgtcls) - -# Time prediction part -dim_hidden_time = [100] -dim_output_time = len(time_tgtcls) - -# Cost ratio between distance cost and time cost -time_cost_factor = 4 - -embed_weights_init = IsotropicGaussian(0.001) -mlp_weights_init = IsotropicGaussian(0.01) -mlp_biases_init = Constant(0.001) - -batch_size = 200 - -dropout = 0.5 -dropout_inputs = VariableFilter(bricks=[Rectifier], name='output') - -noise = 0.01 -noise_inputs = VariableFilter(roles=[roles.PARAMETER]) - -valid_set = 'cuts/test_times_0' -max_splits = 100 diff --git a/config/joint_simple_mlp_tgtcls_1_cswdtx.py b/config/joint_simple_mlp_tgtcls_1_cswdtx.py @@ -1,54 +0,0 @@ -import os -import cPickle - -from blocks.initialization import IsotropicGaussian, Constant - -import data -from model.joint_simple_mlp_tgtcls import Model, Stream - - -n_begin_end_pts = 5 # how many points we consider at the beginning and end of the known trajectory - -with open(os.path.join(data.path, 'arrival-clusters.pkl')) as f: - dest_tgtcls = cPickle.load(f) - -# generate target classes for time prediction as a Fibonacci sequence -time_tgtcls = [1, 2] -for i in range(22): - time_tgtcls.append(time_tgtcls[-1] + time_tgtcls[-2]) - -dim_embeddings = [ - ('origin_call', data.origin_call_size, 10), - ('origin_stand', data.stands_size, 10), - ('week_of_year', 52, 10), - ('day_of_week', 7, 10), - ('qhour_of_day', 24 * 4, 10), - ('day_type', 3, 10), - ('taxi_id', 448, 10), -] - -# Common network part -dim_input = n_begin_end_pts * 2 * 2 + sum(x for (_, _, x) in dim_embeddings) -dim_hidden = [500] - -# Destination prediction part -dim_hidden_dest = [] -dim_output_dest = len(dest_tgtcls) - -# Time prediction part -dim_hidden_time = [] -dim_output_time = len(time_tgtcls) - -# Cost ratio between distance cost and time cost -time_cost_factor = 4 - -embed_weights_init = IsotropicGaussian(0.001) -mlp_weights_init = IsotropicGaussian(0.01) -mlp_biases_init = Constant(0.001) - -learning_rate = 0.0001 -momentum = 0.99 -batch_size = 200 - -valid_set = 'cuts/test_times_0' -max_splits = 100 diff --git a/config/joint_simple_mlp_tgtcls_1_cswdtx_bigger.py b/config/joint_simple_mlp_tgtcls_1_cswdtx_bigger.py @@ -1,54 +0,0 @@ -import os -import cPickle - -from blocks.initialization import IsotropicGaussian, Constant - -import data -from model.joint_simple_mlp_tgtcls import Model, Stream - - -n_begin_end_pts = 7 # how many points we consider at the beginning and end of the known trajectory - -with open(os.path.join(data.path, 'arrival-clusters.pkl')) as f: - dest_tgtcls = cPickle.load(f) - -# generate target classes for time prediction as a Fibonacci sequence -time_tgtcls = [1, 2] -for i in range(21): - time_tgtcls.append(time_tgtcls[-1] + time_tgtcls[-2]) - -dim_embeddings = [ - ('origin_call', data.origin_call_size, 15), - ('origin_stand', data.stands_size, 10), - ('week_of_year', 52, 10), - ('day_of_week', 7, 10), - ('qhour_of_day', 24 * 4, 10), - ('day_type', 3, 10), - ('taxi_id', 448, 10), -] - -# Common network part -dim_input = n_begin_end_pts * 2 * 2 + sum(x for (_, _, x) in dim_embeddings) -dim_hidden = [5000] - -# Destination prediction part -dim_hidden_dest = [] -dim_output_dest = dest_tgtcls.shape[0] - -# Time prediction part -dim_hidden_time = [] -dim_output_time = len(time_tgtcls) - -# Cost ratio between distance cost and time cost -time_cost_factor = 4 - -embed_weights_init = IsotropicGaussian(0.01) -mlp_weights_init = IsotropicGaussian(0.1) -mlp_biases_init = Constant(0.01) - -learning_rate = 0.0001 -momentum = 0.99 -batch_size = 200 - -valid_set = 'cuts/test_times_0' -max_splits = 100 diff --git a/config/time_mlp_1.py b/config/time_mlp_1.py @@ -0,0 +1,27 @@ +from blocks.initialization import IsotropicGaussian, Constant + +import data +from model.time_mlp import Model, Stream + + +n_begin_end_pts = 5 # how many points we consider at the beginning and end of the known trajectory + +dim_embeddings = [ +] + +dim_input = n_begin_end_pts * 2 * 2 + sum(x for (_, _, x) in dim_embeddings) +dim_hidden = [200] +dim_output = 1 + +embed_weights_init = IsotropicGaussian(0.001) +mlp_weights_init = IsotropicGaussian(0.01) +mlp_biases_init = Constant(0.001) + +exp_base = 1.5 + +learning_rate = 0.00001 +momentum = 0.99 +batch_size = 32 + +valid_set = 'cuts/test_times_0' +max_splits = 100 diff --git a/config/time_mlp_2_cswdtx.py b/config/time_mlp_2_cswdtx.py @@ -0,0 +1,34 @@ +from blocks.initialization import IsotropicGaussian, Constant + +import data +from model.time_mlp import Model, Stream + + +n_begin_end_pts = 5 # how many points we consider at the beginning and end of the known trajectory + +dim_embeddings = [ + ('origin_call', data.origin_call_train_size, 10), + ('origin_stand', data.stands_size, 10), + ('week_of_year', 52, 10), + ('day_of_week', 7, 10), + ('qhour_of_day', 24 * 4, 10), + ('day_type', 3, 10), + ('taxi_id', 448, 10), +] + +dim_input = n_begin_end_pts * 2 * 2 + sum(x for (_, _, x) in dim_embeddings) +dim_hidden = [500, 100] +dim_output = 1 + +embed_weights_init = IsotropicGaussian(0.001) +mlp_weights_init = IsotropicGaussian(0.01) +mlp_biases_init = Constant(0.001) + +exp_base = 1.5 + +learning_rate = 0.00001 +momentum = 0.99 +batch_size = 32 + +valid_set = 'cuts/test_times_0' +max_splits = 100 diff --git a/config/time_mlp_tgtcls_2_cswdtx.py b/config/time_mlp_tgtcls_2_cswdtx.py @@ -0,0 +1,37 @@ +from blocks.initialization import IsotropicGaussian, Constant + +import data +from model.time_mlp_tgtcls import Model, Stream + + +n_begin_end_pts = 5 # how many points we consider at the beginning and end of the known trajectory + +# generate target classes as a Fibonacci sequence +tgtcls = [1, 2] +for i in range(22): + tgtcls.append(tgtcls[-1] + tgtcls[-2]) + +dim_embeddings = [ + ('origin_call', data.origin_call_size, 10), + ('origin_stand', data.stands_size, 10), + ('week_of_year', 52, 10), + ('day_of_week', 7, 10), + ('qhour_of_day', 24 * 4, 10), + ('day_type', 3, 10), + ('taxi_id', 448, 10), +] + +dim_input = n_begin_end_pts * 2 * 2 + sum(x for (_, _, x) in dim_embeddings) +dim_hidden = [500, 100] +dim_output = len(tgtcls) + +embed_weights_init = IsotropicGaussian(0.001) +mlp_weights_init = IsotropicGaussian(0.01) +mlp_biases_init = Constant(0.001) + +learning_rate = 0.0001 +momentum = 0.99 +batch_size = 32 + +valid_set = 'cuts/test_times_0' +max_splits = 100 diff --git a/config/time_simple_mlp_1.py b/config/time_simple_mlp_1.py @@ -1,27 +0,0 @@ -from blocks.initialization import IsotropicGaussian, Constant - -import data -from model.time_simple_mlp import Model, Stream - - -n_begin_end_pts = 5 # how many points we consider at the beginning and end of the known trajectory - -dim_embeddings = [ -] - -dim_input = n_begin_end_pts * 2 * 2 + sum(x for (_, _, x) in dim_embeddings) -dim_hidden = [200] -dim_output = 1 - -embed_weights_init = IsotropicGaussian(0.001) -mlp_weights_init = IsotropicGaussian(0.01) -mlp_biases_init = Constant(0.001) - -exp_base = 1.5 - -learning_rate = 0.00001 -momentum = 0.99 -batch_size = 32 - -valid_set = 'cuts/test_times_0' -max_splits = 100 diff --git a/config/time_simple_mlp_2_cswdtx.py b/config/time_simple_mlp_2_cswdtx.py @@ -1,34 +0,0 @@ -from blocks.initialization import IsotropicGaussian, Constant - -import data -from model.time_simple_mlp import Model, Stream - - -n_begin_end_pts = 5 # how many points we consider at the beginning and end of the known trajectory - -dim_embeddings = [ - ('origin_call', data.origin_call_train_size, 10), - ('origin_stand', data.stands_size, 10), - ('week_of_year', 52, 10), - ('day_of_week', 7, 10), - ('qhour_of_day', 24 * 4, 10), - ('day_type', 3, 10), - ('taxi_id', 448, 10), -] - -dim_input = n_begin_end_pts * 2 * 2 + sum(x for (_, _, x) in dim_embeddings) -dim_hidden = [500, 100] -dim_output = 1 - -embed_weights_init = IsotropicGaussian(0.001) -mlp_weights_init = IsotropicGaussian(0.01) -mlp_biases_init = Constant(0.001) - -exp_base = 1.5 - -learning_rate = 0.00001 -momentum = 0.99 -batch_size = 32 - -valid_set = 'cuts/test_times_0' -max_splits = 100 diff --git a/config/time_simple_mlp_tgtcls_2_cswdtx.py b/config/time_simple_mlp_tgtcls_2_cswdtx.py @@ -1,37 +0,0 @@ -from blocks.initialization import IsotropicGaussian, Constant - -import data -from model.time_simple_mlp_tgtcls import Model, Stream - - -n_begin_end_pts = 5 # how many points we consider at the beginning and end of the known trajectory - -# generate target classes as a Fibonacci sequence -tgtcls = [1, 2] -for i in range(22): - tgtcls.append(tgtcls[-1] + tgtcls[-2]) - -dim_embeddings = [ - ('origin_call', data.origin_call_size, 10), - ('origin_stand', data.stands_size, 10), - ('week_of_year', 52, 10), - ('day_of_week', 7, 10), - ('qhour_of_day', 24 * 4, 10), - ('day_type', 3, 10), - ('taxi_id', 448, 10), -] - -dim_input = n_begin_end_pts * 2 * 2 + sum(x for (_, _, x) in dim_embeddings) -dim_hidden = [500, 100] -dim_output = len(tgtcls) - -embed_weights_init = IsotropicGaussian(0.001) -mlp_weights_init = IsotropicGaussian(0.01) -mlp_biases_init = Constant(0.001) - -learning_rate = 0.0001 -momentum = 0.99 -batch_size = 32 - -valid_set = 'cuts/test_times_0' -max_splits = 100 diff --git a/model/dest_simple_mlp.py b/model/dest_mlp.py diff --git a/model/dest_simple_mlp_tgtcls.py b/model/dest_mlp_tgtcls.py diff --git a/model/joint_simple_mlp_tgtcls.py b/model/joint_mlp_tgtcls.py diff --git a/model/time_simple_mlp.py b/model/time_mlp.py diff --git a/model/time_simple_mlp_tgtcls.py b/model/time_mlp_tgtcls.py