From 10b72785babe16460c71979c829f47dd9578b591 Mon Sep 17 00:00:00 2001 From: Patrick Brosi Date: Thu, 9 Aug 2018 18:41:52 +0200 Subject: [PATCH] evaluate our approach at the end in eval --- README.md | 12 +++++++++++- eval/Makefile | 8 ++++---- src/util/Misc.h | 2 ++ src/util/Nullable.h | 2 ++ 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a9f8f46..9ab4556 100644 --- a/README.md +++ b/README.md @@ -107,8 +107,18 @@ make -j make eval ``` -*Note:* this will download, and filter, the entire OSM files for Spain and the +*Notes:* + * this will download, and filter, the entire OSM files for Spain, the Stuttgart region. Make sure you have enough space left on your hard drive. + * in evaluation mode, pfaedle needs significantly more time, because the + calculation of the similarity measurements between shapes are expensive + * if you are only interested in the end results of a single dataset, run + `make .lighteval` in `/eval`. For example, `make paris.lighteval` + generates a shaped version of the paris dataset, without doing extensive + comparisons to the ground truth. + * similarily, if you want to run the extensive evaluation for a single dataset, + run `make .eval` in `/eval`. + ## Evaluation requirements diff --git a/eval/Makefile b/eval/Makefile index 19b290c..6a4ebe0 100644 --- a/eval/Makefile +++ b/eval/Makefile @@ -29,10 +29,6 @@ osmconvert: ../build/pfaedle -x $< -i gtfs/$* -c eval.cfg --eval-path evalout/$*/hmm+osm -o gtfs/$*/shaped -D -m all --eval --eval-df-bins $(EVAL_DF_BINS) 2>&1 | tee $@ find evalout/$*/hmm+osm/ -name "*.json" -print0 | xargs -0 rm - mkdir -p evalout/$*/hmm - ../build/pfaedle -x $< -i gtfs/$* -c eval-wo-osm.cfg --eval-path evalout/$*/hmm -o gtfs/$*/shaped -D -m all --eval --eval-df-bins $(EVAL_DF_BINS) 2>&1 | tee $@ - find evalout/$*/hmm/ -name "*.json" -print0 | xargs -0 rm - mkdir -p evalout/$*/greedy ../build/pfaedle -x $< -i gtfs/$* -c eval.cfg --method greedy --eval-path evalout/$*/greedy -o gtfs/$*/shaped -D -m all --eval --eval-df-bins $(EVAL_DF_BINS) 2>&1 | tee $@ find evalout/$*/greedy/ -name "*.json" -print0 | xargs -0 rm @@ -41,6 +37,10 @@ osmconvert: ../build/pfaedle -x $< -i gtfs/$* -c eval.cfg --method greedy2 --eval-path evalout/$*/greedy2 -o gtfs/$*/shaped -D -m all --eval --eval-df-bins $(EVAL_DF_BINS) 2>&1 | tee $@ find evalout/$*/greedy2/ -name "*.json" -print0 | xargs -0 rm + mkdir -p evalout/$*/hmm + ../build/pfaedle -x $< -i gtfs/$* -c eval-wo-osm.cfg --eval-path evalout/$*/hmm -o gtfs/$*/shaped -D -m all --eval --eval-df-bins $(EVAL_DF_BINS) 2>&1 | tee $@ + find evalout/$*/hmm/ -name "*.json" -print0 | xargs -0 rm + osm/spain-latest.osm.pbf: mkdir -p osm wget http://download.geofabrik.de/europe/spain-latest.osm.pbf -O $@ diff --git a/src/util/Misc.h b/src/util/Misc.h index eecde29..75cb6f9 100644 --- a/src/util/Misc.h +++ b/src/util/Misc.h @@ -11,6 +11,8 @@ #define UNUSED(expr) do { (void)(expr); } while (0) #define TIME() std::chrono::high_resolution_clock::now() #define TOOK(t1, t2) (std::chrono::duration_cast(t2 - t1).count() / 1000.0) +#define T_START(n) auto _tstart_##n = std::chrono::high_resolution_clock::now() +#define T_STOP(n) (std::chrono::duration_cast(std::chrono::high_resolution_clock::now() - _tstart_##n).count() / 1000.0) namespace util { diff --git a/src/util/Nullable.h b/src/util/Nullable.h index 892fd8c..e993aaa 100644 --- a/src/util/Nullable.h +++ b/src/util/Nullable.h @@ -2,6 +2,8 @@ // Chair of Algorithms and Data Structures. // Authors: Patrick Brosi +#include + #ifndef UTIL_NULLABLE_H_ #define UTIL_NULLABLE_H_