aboutsummaryrefslogtreecommitdiff
path: root/make_valid.py
diff options
context:
space:
mode:
authorAlex Auvolat <alex.auvolat@ens.fr>2015-04-28 15:57:35 -0400
committerAlex Auvolat <alex.auvolat@ens.fr>2015-04-28 15:57:35 -0400
commitd58b121de641c0122652bc3d6096a9d0e1048391 (patch)
tree294e0e7bcf033c9c1c2bec9efdb5fcf6900c4ec1 /make_valid.py
parent902a8dcb40b3da9492093edd5bda356240f29eb0 (diff)
downloadtaxi-d58b121de641c0122652bc3d6096a9d0e1048391.tar.gz
taxi-d58b121de641c0122652bc3d6096a9d0e1048391.zip
Add function for applying model
Diffstat (limited to 'make_valid.py')
-rw-r--r--make_valid.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/make_valid.py b/make_valid.py
index 411d20d..ffaa352 100644
--- a/make_valid.py
+++ b/make_valid.py
@@ -13,7 +13,6 @@ with open("valid-full.csv") as f:
def make_valid_item(l):
polyline = ast.literal_eval(l[-1])
- print len(polyline)
last = polyline[-1]
cut_idx = random.randrange(len(polyline)-5)
cut = polyline[:cut_idx+6]
@@ -30,3 +29,8 @@ with open("valid.csv", "w") as f:
wr = csv.writer(f)
for r in vlines:
wr.writerow(r)
+
+with open("valid-solution.csv", "w") as f:
+ wr = csv.writer(f)
+ for r in vlines:
+ wr.writerow([r[0], r[-2], r[-3]])