aboutsummaryrefslogtreecommitdiff
path: root/model
diff options
context:
space:
mode:
authorAdeB <adbrebs@gmail.com>2015-05-05 22:15:29 -0400
committerAdeB <adbrebs@gmail.com>2015-05-05 22:15:29 -0400
commitc29a0d3f22134a8d1f5d557b325f6779c5961546 (patch)
tree6fa431d9b3595b5d2d11089920aa07ea43172d90 /model
parentf4d3ee6449217535bdbe19ac9c5fdd825d71b0d3 (diff)
parent1f2ff96e6480a62089fcac35154a956c218ed678 (diff)
downloadtaxi-c29a0d3f22134a8d1f5d557b325f6779c5961546.tar.gz
taxi-c29a0d3f22134a8d1f5d557b325f6779c5961546.zip
Merge branch 'master' of github.com:adbrebs/taxi
Diffstat (limited to 'model')
-rw-r--r--model/dest_simple_mlp.py10
-rw-r--r--model/dest_simple_mlp_tgtcls.py8
2 files changed, 9 insertions, 9 deletions
diff --git a/model/dest_simple_mlp.py b/model/dest_simple_mlp.py
index 896f219..f422f11 100644
--- a/model/dest_simple_mlp.py
+++ b/model/dest_simple_mlp.py
@@ -11,11 +11,11 @@ import error
class Model(object):
def __init__(self, config):
# The input and the targets
- x_firstk_latitude = (tensor.matrix('first_k_latitude') - data.porto_center[0]) / data.data_std[0]
- x_firstk_longitude = (tensor.matrix('first_k_longitude') - data.porto_center[1]) / data.data_std[1]
+ x_firstk_latitude = (tensor.matrix('first_k_latitude') - data.train_gps_mean[0]) / data.train_gps_std[0]
+ x_firstk_longitude = (tensor.matrix('first_k_longitude') - data.train_gps_mean[1]) / data.train_gps_std[1]
- x_lastk_latitude = (tensor.matrix('last_k_latitude') - data.porto_center[0]) / data.data_std[0]
- x_lastk_longitude = (tensor.matrix('last_k_longitude') - data.porto_center[1]) / data.data_std[1]
+ x_lastk_latitude = (tensor.matrix('last_k_latitude') - data.train_gps_mean[0]) / data.train_gps_std[0]
+ x_lastk_longitude = (tensor.matrix('last_k_longitude') - data.train_gps_mean[1]) / data.train_gps_std[1]
input_list = [x_firstk_latitude, x_firstk_longitude, x_lastk_latitude, x_lastk_longitude]
embed_tables = []
@@ -43,7 +43,7 @@ class Model(object):
# Normalize & Center
# outputs = theano.printing.Print("normal_outputs")(outputs)
- outputs = data.data_std * outputs + data.porto_center
+ outputs = data.train_gps_std * outputs + data.train_gps_mean
# outputs = theano.printing.Print("outputs")(outputs)
# y = theano.printing.Print("y")(y)
diff --git a/model/dest_simple_mlp_tgtcls.py b/model/dest_simple_mlp_tgtcls.py
index d8fdeb3..a7b6f9b 100644
--- a/model/dest_simple_mlp_tgtcls.py
+++ b/model/dest_simple_mlp_tgtcls.py
@@ -14,11 +14,11 @@ import error
class Model(object):
def __init__(self, config):
# The input and the targets
- x_firstk_latitude = (tensor.matrix('first_k_latitude') - data.porto_center[0]) / data.data_std[0]
- x_firstk_longitude = (tensor.matrix('first_k_longitude') - data.porto_center[1]) / data.data_std[1]
+ x_firstk_latitude = (tensor.matrix('first_k_latitude') - data.train_gps_mean[0]) / data.train_gps_std[0]
+ x_firstk_longitude = (tensor.matrix('first_k_longitude') - data.train_gps_mean[1]) / data.train_gps_std[1]
- x_lastk_latitude = (tensor.matrix('last_k_latitude') - data.porto_center[0]) / data.data_std[0]
- x_lastk_longitude = (tensor.matrix('last_k_longitude') - data.porto_center[1]) / data.data_std[1]
+ x_lastk_latitude = (tensor.matrix('last_k_latitude') - data.train_gps_mean[0]) / data.train_gps_std[0]
+ x_lastk_longitude = (tensor.matrix('last_k_longitude') - data.train_gps_mean[1]) / data.train_gps_std[1]
input_list = [x_firstk_latitude, x_firstk_longitude, x_lastk_latitude, x_lastk_longitude]
embed_tables = []