diff options
author | Étienne Simon <esimon@esimon.eu> | 2015-07-02 12:59:15 -0400 |
---|---|---|
committer | Étienne Simon <esimon@esimon.eu> | 2015-07-02 12:59:15 -0400 |
commit | 98139f573eb179c8f5a06ba6c8d8883376814ccf (patch) | |
tree | f27270d80cb91c19639227c921549f762eda2f72 /model/time_simple_mlp.py | |
parent | a4b190516d00428b1d8a81686a3291e5fa5f9865 (diff) | |
download | taxi-98139f573eb179c8f5a06ba6c8d8883376814ccf.tar.gz taxi-98139f573eb179c8f5a06ba6c8d8883376814ccf.zip |
Remove _simple
Diffstat (limited to 'model/time_simple_mlp.py')
-rw-r--r-- | model/time_simple_mlp.py | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/model/time_simple_mlp.py b/model/time_simple_mlp.py deleted file mode 100644 index a52590d..0000000 --- a/model/time_simple_mlp.py +++ /dev/null @@ -1,31 +0,0 @@ -from blocks.bricks import application, Identity - -import error -from model.mlp import FFMLP, Stream - - -class Model(FFMLP): - def __init__(self, config, **kwargs): - super(Model, self).__init__(config, output_layer=Identity, **kwargs) - self.inputs.append('input_time') - - @application(outputs=['duration']) - def predict(self, **kwargs): - outputs = super(Model, self).predict(**kwargs).flatten() - if hasattr(self.config, 'exp_base'): - outputs = self.config.exp_base ** outputs - return kwargs['input_time'] + outputs - - @predict.property('inputs') - def predict_inputs(self): - return self.inputs - - @application(outputs=['cost']) - def cost(self, **kwargs): - y_hat = self.predict(**kwargs) - y = kwargs['travel_time'] - return error.rmsle(y_hat, y) - - @cost.property('inputs') - def cost_inputs(self): - return self.inputs + ['travel_time'] |