From 98139f573eb179c8f5a06ba6c8d8883376814ccf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Simon?= Date: Thu, 2 Jul 2015 12:59:15 -0400 Subject: Remove _simple --- config/dest_mlp_2_cs.py | 27 ++++++++++ config/dest_mlp_2_cswdt.py | 31 +++++++++++ config/dest_mlp_2_noembed.py | 24 +++++++++ config/dest_mlp_emb_only.py | 31 +++++++++++ config/dest_mlp_tgtcls_0_cs.py | 32 ++++++++++++ config/dest_mlp_tgtcls_1_cs.py | 32 ++++++++++++ config/dest_mlp_tgtcls_1_cswdt.py | 36 +++++++++++++ config/dest_mlp_tgtcls_1_cswdtx.py | 40 ++++++++++++++ config/dest_mlp_tgtcls_1_cswdtx_alexandre.py | 37 +++++++++++++ config/dest_simple_mlp_2_cs.py | 27 ---------- config/dest_simple_mlp_2_cswdt.py | 31 ----------- config/dest_simple_mlp_2_noembed.py | 24 --------- config/dest_simple_mlp_emb_only.py | 31 ----------- config/dest_simple_mlp_tgtcls_0_cs.py | 32 ------------ config/dest_simple_mlp_tgtcls_1_cs.py | 32 ------------ config/dest_simple_mlp_tgtcls_1_cswdt.py | 36 ------------- config/dest_simple_mlp_tgtcls_1_cswdtx.py | 40 -------------- .../dest_simple_mlp_tgtcls_1_cswdtx_alexandre.py | 37 ------------- config/joint_mlp_tgtcls_111_cswdtx.py | 54 +++++++++++++++++++ config/joint_mlp_tgtcls_111_cswdtx_bigger.py | 54 +++++++++++++++++++ .../joint_mlp_tgtcls_111_cswdtx_bigger_dropout.py | 60 +++++++++++++++++++++ config/joint_mlp_tgtcls_111_cswdtx_noise_dout.py | 61 ++++++++++++++++++++++ config/joint_mlp_tgtcls_1_cswdtx.py | 54 +++++++++++++++++++ config/joint_mlp_tgtcls_1_cswdtx_bigger.py | 54 +++++++++++++++++++ config/joint_simple_mlp_tgtcls_111_cswdtx.py | 54 ------------------- .../joint_simple_mlp_tgtcls_111_cswdtx_bigger.py | 54 ------------------- ..._simple_mlp_tgtcls_111_cswdtx_bigger_dropout.py | 60 --------------------- ...oint_simple_mlp_tgtcls_111_cswdtx_noise_dout.py | 61 ---------------------- config/joint_simple_mlp_tgtcls_1_cswdtx.py | 54 ------------------- config/joint_simple_mlp_tgtcls_1_cswdtx_bigger.py | 54 ------------------- config/time_mlp_1.py | 27 ++++++++++ config/time_mlp_2_cswdtx.py | 34 ++++++++++++ config/time_mlp_tgtcls_2_cswdtx.py | 37 +++++++++++++ config/time_simple_mlp_1.py | 27 ---------- config/time_simple_mlp_2_cswdtx.py | 34 ------------ config/time_simple_mlp_tgtcls_2_cswdtx.py | 37 ------------- 36 files changed, 725 insertions(+), 725 deletions(-) create mode 100644 config/dest_mlp_2_cs.py create mode 100644 config/dest_mlp_2_cswdt.py create mode 100644 config/dest_mlp_2_noembed.py create mode 100644 config/dest_mlp_emb_only.py create mode 100644 config/dest_mlp_tgtcls_0_cs.py create mode 100644 config/dest_mlp_tgtcls_1_cs.py create mode 100644 config/dest_mlp_tgtcls_1_cswdt.py create mode 100644 config/dest_mlp_tgtcls_1_cswdtx.py create mode 100644 config/dest_mlp_tgtcls_1_cswdtx_alexandre.py delete mode 100644 config/dest_simple_mlp_2_cs.py delete mode 100644 config/dest_simple_mlp_2_cswdt.py delete mode 100644 config/dest_simple_mlp_2_noembed.py delete mode 100644 config/dest_simple_mlp_emb_only.py delete mode 100644 config/dest_simple_mlp_tgtcls_0_cs.py delete mode 100644 config/dest_simple_mlp_tgtcls_1_cs.py delete mode 100644 config/dest_simple_mlp_tgtcls_1_cswdt.py delete mode 100644 config/dest_simple_mlp_tgtcls_1_cswdtx.py delete mode 100644 config/dest_simple_mlp_tgtcls_1_cswdtx_alexandre.py create mode 100644 config/joint_mlp_tgtcls_111_cswdtx.py create mode 100644 config/joint_mlp_tgtcls_111_cswdtx_bigger.py create mode 100644 config/joint_mlp_tgtcls_111_cswdtx_bigger_dropout.py create mode 100644 config/joint_mlp_tgtcls_111_cswdtx_noise_dout.py create mode 100644 config/joint_mlp_tgtcls_1_cswdtx.py create mode 100644 config/joint_mlp_tgtcls_1_cswdtx_bigger.py delete mode 100644 config/joint_simple_mlp_tgtcls_111_cswdtx.py delete mode 100644 config/joint_simple_mlp_tgtcls_111_cswdtx_bigger.py delete mode 100644 config/joint_simple_mlp_tgtcls_111_cswdtx_bigger_dropout.py delete mode 100644 config/joint_simple_mlp_tgtcls_111_cswdtx_noise_dout.py delete mode 100644 config/joint_simple_mlp_tgtcls_1_cswdtx.py delete mode 100644 config/joint_simple_mlp_tgtcls_1_cswdtx_bigger.py create mode 100644 config/time_mlp_1.py create mode 100644 config/time_mlp_2_cswdtx.py create mode 100644 config/time_mlp_tgtcls_2_cswdtx.py delete mode 100644 config/time_simple_mlp_1.py delete mode 100644 config/time_simple_mlp_2_cswdtx.py delete mode 100644 config/time_simple_mlp_tgtcls_2_cswdtx.py (limited to 'config') diff --git a/config/dest_mlp_2_cs.py b/config/dest_mlp_2_cs.py new file mode 100644 index 0000000..ca1ee39 --- /dev/null +++ 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 new file mode 100644 index 0000000..592378a --- /dev/null +++ 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 new file mode 100644 index 0000000..d7582fe --- /dev/null +++ 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_mlp_emb_only.py b/config/dest_mlp_emb_only.py new file mode 100644 index 0000000..76acdfa --- /dev/null +++ b/config/dest_mlp_emb_only.py @@ -0,0 +1,31 @@ +from blocks.initialization import IsotropicGaussian, Constant + +import data +from model.mlp_emb import Model, Stream + +use_cuts_for_training = True + +dim_embeddings = [ + # ('origin_call', data.origin_call_train_size, 100), + # ('origin_stand', data.stands_size, 100), + # ('week_of_year', 52, 100), + # ('day_of_week', 7, 100), + ('qhour_of_day', 24 * 4, 10), + ('day_type', 3, 1), +] + +dim_input = sum(x for (_, _, x) in dim_embeddings) +dim_hidden = [10, 10] +output_mode = "destination" +dim_output = 2 + +embed_weights_init = IsotropicGaussian(0.01) +mlp_weights_init = IsotropicGaussian(0.01) +mlp_biases_init = IsotropicGaussian(0.001) + +learning_rate = 0.001 +momentum = 0.9 +batch_size = 100 + +valid_set = 'cuts/test_times_0' +max_splits = 100 diff --git a/config/dest_mlp_tgtcls_0_cs.py b/config/dest_mlp_tgtcls_0_cs.py new file mode 100644 index 0000000..684e653 --- /dev/null +++ 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 new file mode 100644 index 0000000..1d28c1a --- /dev/null +++ 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 new file mode 100644 index 0000000..13abd90 --- /dev/null +++ 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 new file mode 100644 index 0000000..1a39dfd --- /dev/null +++ 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 new file mode 100644 index 0000000..d75810a --- /dev/null +++ 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 deleted file mode 100644 index abb7bfc..0000000 --- a/config/dest_simple_mlp_2_cs.py +++ /dev/null @@ -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 deleted file mode 100644 index c5eae6b..0000000 --- a/config/dest_simple_mlp_2_cswdt.py +++ /dev/null @@ -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 deleted file mode 100644 index 9a9a158..0000000 --- a/config/dest_simple_mlp_2_noembed.py +++ /dev/null @@ -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_emb_only.py b/config/dest_simple_mlp_emb_only.py deleted file mode 100644 index 76acdfa..0000000 --- a/config/dest_simple_mlp_emb_only.py +++ /dev/null @@ -1,31 +0,0 @@ -from blocks.initialization import IsotropicGaussian, Constant - -import data -from model.mlp_emb import Model, Stream - -use_cuts_for_training = True - -dim_embeddings = [ - # ('origin_call', data.origin_call_train_size, 100), - # ('origin_stand', data.stands_size, 100), - # ('week_of_year', 52, 100), - # ('day_of_week', 7, 100), - ('qhour_of_day', 24 * 4, 10), - ('day_type', 3, 1), -] - -dim_input = sum(x for (_, _, x) in dim_embeddings) -dim_hidden = [10, 10] -output_mode = "destination" -dim_output = 2 - -embed_weights_init = IsotropicGaussian(0.01) -mlp_weights_init = IsotropicGaussian(0.01) -mlp_biases_init = IsotropicGaussian(0.001) - -learning_rate = 0.001 -momentum = 0.9 -batch_size = 100 - -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 deleted file mode 100644 index 6f55013..0000000 --- a/config/dest_simple_mlp_tgtcls_0_cs.py +++ /dev/null @@ -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 deleted file mode 100644 index cdd8673..0000000 --- a/config/dest_simple_mlp_tgtcls_1_cs.py +++ /dev/null @@ -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 deleted file mode 100644 index 066a14a..0000000 --- a/config/dest_simple_mlp_tgtcls_1_cswdt.py +++ /dev/null @@ -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 deleted file mode 100644 index 3ae25c2..0000000 --- a/config/dest_simple_mlp_tgtcls_1_cswdtx.py +++ /dev/null @@ -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 deleted file mode 100644 index a067111..0000000 --- a/config/dest_simple_mlp_tgtcls_1_cswdtx_alexandre.py +++ /dev/null @@ -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 new file mode 100644 index 0000000..83d3d11 --- /dev/null +++ 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 new file mode 100644 index 0000000..7ebe864 --- /dev/null +++ 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 new file mode 100644 index 0000000..e0448cc --- /dev/null +++ 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 new file mode 100644 index 0000000..fbc88a1 --- /dev/null +++ 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 new file mode 100644 index 0000000..f53e41c --- /dev/null +++ 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 new file mode 100644 index 0000000..72d3c83 --- /dev/null +++ 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 deleted file mode 100644 index 99bee8f..0000000 --- a/config/joint_simple_mlp_tgtcls_111_cswdtx.py +++ /dev/null @@ -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 deleted file mode 100644 index 8e991a1..0000000 --- a/config/joint_simple_mlp_tgtcls_111_cswdtx_bigger.py +++ /dev/null @@ -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 deleted file mode 100644 index 4476879..0000000 --- a/config/joint_simple_mlp_tgtcls_111_cswdtx_bigger_dropout.py +++ /dev/null @@ -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 deleted file mode 100644 index bfc3ac8..0000000 --- a/config/joint_simple_mlp_tgtcls_111_cswdtx_noise_dout.py +++ /dev/null @@ -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 deleted file mode 100644 index a66c98b..0000000 --- a/config/joint_simple_mlp_tgtcls_1_cswdtx.py +++ /dev/null @@ -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 deleted file mode 100644 index ad323f8..0000000 --- a/config/joint_simple_mlp_tgtcls_1_cswdtx_bigger.py +++ /dev/null @@ -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 new file mode 100644 index 0000000..4c2bffb --- /dev/null +++ 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 new file mode 100644 index 0000000..30dda87 --- /dev/null +++ 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 new file mode 100644 index 0000000..809a808 --- /dev/null +++ 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 deleted file mode 100644 index 35f60b1..0000000 --- a/config/time_simple_mlp_1.py +++ /dev/null @@ -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 deleted file mode 100644 index 26cb5c6..0000000 --- a/config/time_simple_mlp_2_cswdtx.py +++ /dev/null @@ -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 deleted file mode 100644 index 1bfbac7..0000000 --- a/config/time_simple_mlp_tgtcls_2_cswdtx.py +++ /dev/null @@ -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 -- cgit v1.2.3