From 5afaa055b3c5a6d41cf9577513c80235c0f0fa79 Mon Sep 17 00:00:00 2001 From: Manos Date: Wed, 29 Sep 2021 02:20:35 +0200 Subject: [PATCH] lmdk_bgt: Added mae_cont --- code/lib/lmdk_bgt.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/code/lib/lmdk_bgt.py b/code/lib/lmdk_bgt.py index b51465e..10d6b20 100644 --- a/code/lib/lmdk_bgt.py +++ b/code/lib/lmdk_bgt.py @@ -594,3 +594,13 @@ def mae(seq, o): for i, p in enumerate(seq): mae += distance((p[1], p[2]), (o[i][1], o[i][2])).km*1000/len(seq) return mae + + +def mae_cont(o): + mae = 0 + for i, p in enumerate(o): + # Check if original differs from final + if p[0] != p[1]: + mae += 1/len(o) + print(mae) + return mae