From d58b121de641c0122652bc3d6096a9d0e1048391 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Tue, 28 Apr 2015 15:57:35 -0400 Subject: Add function for applying model --- make_valid.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'make_valid.py') 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]]) -- cgit v1.2.3