From c195fd437b76d00ee780cef49903266165f001a7 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Tue, 28 Apr 2015 16:41:46 -0400 Subject: Support polylines with <5 points --- model.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'model.py') diff --git a/model.py b/model.py index b9cc1a8..405ad47 100644 --- a/model.py +++ b/model.py @@ -140,8 +140,8 @@ def main(): extensions=[DataStreamMonitoring([cost, hcost], valid_stream, prefix='valid', - every_n_batches=1), - Printing(every_n_batches=1), + every_n_batches=1000), + Printing(every_n_batches=1000), # Dump('taxi_model', every_n_batches=100), # LoadFromDump('taxi_model'), ] @@ -163,6 +163,7 @@ def main(): outfile = open("test-output.csv", "w") outcsv = csv.writer(outfile) + outcsv.writerow(["TRIP_ID", "LATITUDE", "LONGITUDE"]) for out in apply_model.Apply(outputs=outputs, stream=test_stream, return_vars=['trip_id', 'outputs']): dest = out['outputs'] for i, trip in enumerate(out['trip_id']): -- cgit v1.2.3