Skip to content

Commit

Permalink
Merge branch 'update'
Browse files Browse the repository at this point in the history
  • Loading branch information
GjjvdBurg committed May 26, 2020
2 parents 692632b + e0f485f commit b349ffe
Show file tree
Hide file tree
Showing 184 changed files with 15,407 additions and 11,430 deletions.
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## Version 1.0.0
## Version 2.0

* Added the "zero" baseline method
* Added a script to compute summary statistics
* Added rank plots for multivariate datasets
* Corrected an error in the computation of the F1 score and updated the
results. This correction had no major effect on the conclusions of the
paper.

## Version 1.0

* Initial release
107 changes: 94 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ best_tables: \
$(TABLE_DIR)/best_cover_uni_avg.json \
$(TABLE_DIR)/best_cover_multi_avg.json \
$(TABLE_DIR)/best_f1_uni_full.json \
$(TABLE_DIR)/best_cover_uni_full.json
$(TABLE_DIR)/best_cover_uni_full.json \
$(TABLE_DIR)/best_f1_multi_full.json \
$(TABLE_DIR)/best_cover_multi_full.json

$(TABLE_DIR)/best_f1_combined_full.tex: $(SCRIPT_DIR)/make_table.py summaries | table-dir
python $< -s $(SUMMARY_DIR) -e best -m f1 -d combined -f tex -t full > $@
Expand All @@ -104,6 +106,12 @@ $(TABLE_DIR)/best_cover_uni_full.json: $(SCRIPT_DIR)/make_table.py summaries | t
$(TABLE_DIR)/best_f1_uni_full.json: $(SCRIPT_DIR)/make_table.py summaries | table-dir
python $< -s $(SUMMARY_DIR) -e best -m f1 -d uni -f json -t full > $@

$(TABLE_DIR)/best_f1_multi_full.json: $(SCRIPT_DIR)/make_table.py summaries
python $< -s $(SUMMARY_DIR) -e best -m f1 -d multi -f json -t full > $@

$(TABLE_DIR)/best_cover_multi_full.json: $(SCRIPT_DIR)/make_table.py summaries
python $< -s $(SUMMARY_DIR) -e best -m cover -d multi -f json -t full > $@

default_tables: \
$(TABLE_DIR)/default_f1_combined_full.tex \
$(TABLE_DIR)/default_cover_combined_full.tex \
Expand All @@ -112,7 +120,9 @@ default_tables: \
$(TABLE_DIR)/default_cover_uni_avg.json \
$(TABLE_DIR)/default_cover_multi_avg.json \
$(TABLE_DIR)/default_cover_uni_full.json \
$(TABLE_DIR)/default_f1_uni_full.json
$(TABLE_DIR)/default_f1_uni_full.json \
$(TABLE_DIR)/default_cover_multi_full.json \
$(TABLE_DIR)/default_f1_multi_full.json

$(TABLE_DIR)/default_f1_combined_full.tex: $(SCRIPT_DIR)/make_table.py summaries | table-dir
python $< -s $(SUMMARY_DIR) -e default -m f1 -d combined -f tex -t full > $@
Expand All @@ -138,6 +148,11 @@ $(TABLE_DIR)/default_cover_uni_full.json: $(SCRIPT_DIR)/make_table.py summaries
$(TABLE_DIR)/default_f1_uni_full.json: $(SCRIPT_DIR)/make_table.py summaries | table-dir
python $< -s $(SUMMARY_DIR) -e default -m f1 -d uni -f json -t full > $@

$(TABLE_DIR)/default_cover_multi_full.json: $(SCRIPT_DIR)/make_table.py summaries | table-dir
python $< -s $(SUMMARY_DIR) -e default -m cover -d multi -f json -t full > $@

$(TABLE_DIR)/default_f1_multi_full.json: $(SCRIPT_DIR)/make_table.py summaries | table-dir
python $< -s $(SUMMARY_DIR) -e default -m f1 -d multi -f json -t full > $@

aggregate_wide: $(TABLE_DIR)/aggregate_table_wide.tex

Expand Down Expand Up @@ -193,27 +208,56 @@ rank-dir:
mkdir -p $(RANK_DIR)

rankplots: \
$(RANK_DIR)/rankplot_best_cover_uni.tex \
$(RANK_DIR)/rankplot_best_f1_uni.tex \
$(RANK_DIR)/rankplot_default_cover_uni.tex \
$(RANK_DIR)/rankplot_default_f1_uni.tex \
$(RANK_DIR)/rankplot_best_cover_uni.pdf \
$(RANK_DIR)/rankplot_best_f1_uni.pdf \
$(RANK_DIR)/rankplot_default_cover_uni.pdf \
$(RANK_DIR)/rankplot_default_f1_uni.pdf
$(RANK_DIR)/rankplot_default_f1_uni.pdf \
$(RANK_DIR)/rankplot_best_cover_multi.pdf \
$(RANK_DIR)/rankplot_best_f1_multi.pdf \
$(RANK_DIR)/rankplot_default_cover_multi.pdf \
$(RANK_DIR)/rankplot_default_f1_multi.pdf

#######
# UNI #
#######

$(RANK_DIR)/rankplot_best_cover_uni.tex: $(TABLE_DIR)/best_cover_uni_full.json \
$(SCRIPT_DIR)/rank_plots.py | rank-dir
python $(SCRIPT_DIR)/rank_plots.py -i $< -o $@ -b max --type best

$(RANK_DIR)/rankplot_best_f1_uni.tex: $(TABLE_DIR)/best_f1_uni_full.json \
$(SCRIPT_DIR)/rank_plots.py | rank-dir
python $(SCRIPT_DIR)/rank_plots.py -i $< -o $@ -b max --type best

$(RANK_DIR)/rankplot_default_cover_uni.tex: $(TABLE_DIR)/default_cover_uni_full.json \
$(SCRIPT_DIR)/rank_plots.py | rank-dir
python $(SCRIPT_DIR)/rank_plots.py -i $< -o $@ -b max --type default

$(RANK_DIR)/rankplot_default_f1_uni.tex: $(TABLE_DIR)/default_f1_uni_full.json \
$(SCRIPT_DIR)/rank_plots.py | rank-dir
python $(SCRIPT_DIR)/rank_plots.py -i $< -o $@ -b max --type default

$(RANK_DIR)/rankplot_best_cover_uni.tex: $(TABLE_DIR)/best_cover_uni_full.json $(SCRIPT_DIR)/rank_plots.py | rank-dir
#########
# MULTI #
#########

$(RANK_DIR)/rankplot_best_cover_multi.tex: $(TABLE_DIR)/best_cover_multi_full.json \
$(SCRIPT_DIR)/rank_plots.py | rank-dir
python $(SCRIPT_DIR)/rank_plots.py -i $< -o $@ -b max --type best

$(RANK_DIR)/rankplot_best_f1_uni.tex: $(TABLE_DIR)/best_f1_uni_full.json $(SCRIPT_DIR)/rank_plots.py | rank-dir
$(RANK_DIR)/rankplot_best_f1_multi.tex: $(TABLE_DIR)/best_f1_multi_full.json \
$(SCRIPT_DIR)/rank_plots.py | rank-dir
python $(SCRIPT_DIR)/rank_plots.py -i $< -o $@ -b max --type best

$(RANK_DIR)/rankplot_default_cover_uni.tex: $(TABLE_DIR)/default_cover_uni_full.json $(SCRIPT_DIR)/rank_plots.py | rank-dir
$(RANK_DIR)/rankplot_default_cover_multi.tex: $(TABLE_DIR)/default_cover_multi_full.json \
$(SCRIPT_DIR)/rank_plots.py | rank-dir
python $(SCRIPT_DIR)/rank_plots.py -i $< -o $@ -b max --type default

$(RANK_DIR)/rankplot_default_f1_uni.tex: $(TABLE_DIR)/default_f1_uni_full.json $(SCRIPT_DIR)/rank_plots.py | rank-dir
$(RANK_DIR)/rankplot_default_f1_multi.tex: $(TABLE_DIR)/default_f1_multi_full.json \
$(SCRIPT_DIR)/rank_plots.py | rank-dir
python $(SCRIPT_DIR)/rank_plots.py -i $< -o $@ -b max --type default


$(RANK_DIR)/rankplot_%.pdf: $(RANK_DIR)/rankplot_%.tex | rank-dir
latexmk -pdf -pdflatex="pdflatex -interaction=nonstopmode --shell-escape" \
-outdir=$(RANK_DIR) $<
Expand All @@ -237,7 +281,14 @@ clean_rankplots:
CONSTANT_TARGETS = $(CONST_DIR)/sigtest_global_best_cover_uni.tex \
$(CONST_DIR)/sigtest_global_best_f1_uni.tex \
$(CONST_DIR)/sigtest_global_default_cover_uni.tex \
$(CONST_DIR)/sigtest_global_default_f1_uni.tex
$(CONST_DIR)/sigtest_global_default_f1_uni.tex \
$(CONST_DIR)/SeriesLengthMin.tex \
$(CONST_DIR)/SeriesLengthMax.tex \
$(CONST_DIR)/SeriesLengthMean.tex \
$(CONST_DIR)/UniqueAnnotationsMin.tex \
$(CONST_DIR)/UniqueAnnotationsMax.tex \
$(CONST_DIR)/UniqueAnnotationsMean.tex \
$(CONST_DIR)/UniqueAnnotationsStd.tex

const-dir:
mkdir -p $(CONST_DIR)
Expand All @@ -260,6 +311,34 @@ $(CONST_DIR)/sigtest_global_default_f1_uni.tex: $(TABLE_DIR)/default_f1_uni_full
$(SCRIPT_DIR)/significance.py | const-dir
python $(SCRIPT_DIR)/significance.py -i $< -o $@ --type best --mode global

$(CONST_DIR)/SeriesLengthMin.tex: $(SCRIPT_DIR)/descriptive_length.py \
$(DATASET_SUMMARIES) | const-dir
python $< -s $(SUMMARY_DIR) -t min > $@

$(CONST_DIR)/SeriesLengthMax.tex: $(SCRIPT_DIR)/descriptive_length.py \
$(DATASET_SUMMARIES) | const-dir
python $< -s $(SUMMARY_DIR) -t max > $@

$(CONST_DIR)/SeriesLengthMean.tex: $(SCRIPT_DIR)/descriptive_length.py \
$(DATASET_SUMMARIES) | const-dir
python $< -s $(SUMMARY_DIR) -t mean > $@

$(CONST_DIR)/UniqueAnnotationsMin.tex: $(SCRIPT_DIR)/descriptive_annotations.py \
$(DATASET_SUMMARIES) | const-dir
python $< -s $(SUMMARY_DIR) -t min > $@

$(CONST_DIR)/UniqueAnnotationsMax.tex: $(SCRIPT_DIR)/descriptive_annotations.py \
$(DATASET_SUMMARIES) | const-dir
python $< -s $(SUMMARY_DIR) -t max > $@

$(CONST_DIR)/UniqueAnnotationsMean.tex: $(SCRIPT_DIR)/descriptive_annotations.py \
$(DATASET_SUMMARIES) | const-dir
python $< -s $(SUMMARY_DIR) -t mean > $@

$(CONST_DIR)/UniqueAnnotationsStd.tex: $(SCRIPT_DIR)/descriptive_annotations.py \
$(DATASET_SUMMARIES) | const-dir
python $< -s $(SUMMARY_DIR) -t std > $@

clean_constants:
rm -f $(CONSTANT_TARGETS)

Expand Down Expand Up @@ -312,4 +391,6 @@ validate: ./utils/validate_schema.py ./schema.json
# #
###########

clean: clean_summaries clean_tables clean_rankplots clean_venvs
clean: clean_results clean_venvs

clean_results: clean_summaries clean_tables clean_rankplots clean_constants
6 changes: 6 additions & 0 deletions abed_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@
"best_kcpa",
"best_wbs",
"best_prophet",
"best_zero",
"default_bocpd",
"default_bocpdms",
"default_rbocpdms",
Expand All @@ -138,6 +139,7 @@
"default_kcpa",
"default_wbs",
"default_prophet",
"default_zero",
]

# many of these combinations will be invalid for the changepoint package, but
Expand Down Expand Up @@ -210,6 +212,7 @@
"integrated": ["true", "false"],
},
"best_prophet": {"Nmax": ["max", "default"]},
"best_zero": {"no_param": [0]},
"default_bocpd": {"no_param": [0]},
"default_bocpdms": {"no_param": [0]},
"default_rbocpdms": {"no_param": [0]},
Expand All @@ -223,6 +226,7 @@
"default_kcpa": {"no_param": [0]},
"default_wbs": {"no_param": [0]},
"default_prophet": {"no_param": [0]},
"default_zero": {"no_param": [0]}
}

COMMANDS = {
Expand All @@ -243,6 +247,7 @@
"best_rbocpdms": (
"source {execdir}/python/rbocpdms/venv/bin/activate && python {execdir}/python/cpdbench_rbocpdms.py -i {datadir}/{dataset}.json --intensity {intensity} --prior-a {prior_a} --prior-b {prior_b} --threshold 100 --alpha-param {alpha_param} --alpha-rld {alpha_rld} --use-timeout"
),
"best_zero": "python {execdir}/python/cpdbench_zero.py -i {datadir}/{dataset}.json",
"default_amoc": "Rscript --no-save --slave {execdir}/R/cpdbench_changepoint.R -i {datadir}/{dataset}.json -p MBIC -f mean -t Normal -m AMOC",
"default_binseg": "Rscript --no-save --slave {execdir}/R/cpdbench_changepoint.R -i {datadir}/{dataset}.json -p MBIC -f mean -t Normal -m BinSeg -Q default",
"default_cpnp": "Rscript --no-save --slave {execdir}/R/cpdbench_changepointnp.R -i {datadir}/{dataset}.json -p MBIC -q 10",
Expand All @@ -256,6 +261,7 @@
"default_bocpd": "Rscript --no-save --slave {execdir}/R/cpdbench_ocp.R -i {datadir}/{dataset}.json -l 100 --prior-a 1.0 --prior-b 1.0 --prior-k 1.0",
"default_bocpdms": "source {execdir}/python/bocpdms/venv/bin/activate && python {execdir}/python/cpdbench_bocpdms.py -i {datadir}/{dataset}.json --intensity 100 --prior-a 1.0 --prior-b 1.0 --threshold 0",
"default_rbocpdms": "source {execdir}/python/rbocpdms/venv/bin/activate && python {execdir}/python/cpdbench_rbocpdms.py -i {datadir}/{dataset}.json --intensity 100 --prior-a 1.0 --prior-b 1.0 --threshold 100 --alpha-param 0.5 --alpha-rld 0.5 --timeout 240",
"default_zero": "python {execdir}/python/cpdbench_zero.py -i {datadir}/{dataset}.json",
}

METRICS = {}
Expand Down
15 changes: 15 additions & 0 deletions abed_results/apple/best_zero/ce6f534a7a0632dd.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"command": "/home/gertjan/share/work/turing/aida/research/projects/changepoint/experiments/cpdbench/execs/python/cpdbench_zero.py -i /home/gertjan/share/work/turing/aida/research/projects/changepoint/experiments/cpdbench/datasets/apple.json",
"dataset": "apple",
"dataset_md5": "22edb48471bd3711f7a6e15de6413643",
"error": null,
"hostname": "nyx",
"parameters": {},
"result": {
"cplocations": [],
"runtime": 2.384185791015625e-07
},
"script": "/home/gertjan/share/work/turing/aida/research/projects/changepoint/experiments/cpdbench/execs/python/cpdbench_zero.py",
"script_md5": "95b65ddd5669b41385966a4aad387118",
"status": "SUCCESS"
}
15 changes: 15 additions & 0 deletions abed_results/apple/default_zero/6ce2dbdc33d50375.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"command": "/home/gertjan/share/work/turing/aida/research/projects/changepoint/experiments/cpdbench/execs/python/cpdbench_zero.py -i /home/gertjan/share/work/turing/aida/research/projects/changepoint/experiments/cpdbench/datasets/apple.json",
"dataset": "apple",
"dataset_md5": "22edb48471bd3711f7a6e15de6413643",
"error": null,
"hostname": "nyx",
"parameters": {},
"result": {
"cplocations": [],
"runtime": 2.384185791015625e-07
},
"script": "/home/gertjan/share/work/turing/aida/research/projects/changepoint/experiments/cpdbench/execs/python/cpdbench_zero.py",
"script_md5": "95b65ddd5669b41385966a4aad387118",
"status": "SUCCESS"
}
15 changes: 15 additions & 0 deletions abed_results/bank/best_zero/6ced213582b692f2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"command": "/home/gertjan/share/work/turing/aida/research/projects/changepoint/experiments/cpdbench/execs/python/cpdbench_zero.py -i /home/gertjan/share/work/turing/aida/research/projects/changepoint/experiments/cpdbench/datasets/bank.json",
"dataset": "bank",
"dataset_md5": "5207135ea53fc6fa2a8119908da73abf",
"error": null,
"hostname": "nyx",
"parameters": {},
"result": {
"cplocations": [],
"runtime": 2.384185791015625e-07
},
"script": "/home/gertjan/share/work/turing/aida/research/projects/changepoint/experiments/cpdbench/execs/python/cpdbench_zero.py",
"script_md5": "95b65ddd5669b41385966a4aad387118",
"status": "SUCCESS"
}
15 changes: 15 additions & 0 deletions abed_results/bank/default_zero/bab9216b61d1d3c0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"command": "/home/gertjan/share/work/turing/aida/research/projects/changepoint/experiments/cpdbench/execs/python/cpdbench_zero.py -i /home/gertjan/share/work/turing/aida/research/projects/changepoint/experiments/cpdbench/datasets/bank.json",
"dataset": "bank",
"dataset_md5": "5207135ea53fc6fa2a8119908da73abf",
"error": null,
"hostname": "nyx",
"parameters": {},
"result": {
"cplocations": [],
"runtime": 4.76837158203125e-07
},
"script": "/home/gertjan/share/work/turing/aida/research/projects/changepoint/experiments/cpdbench/execs/python/cpdbench_zero.py",
"script_md5": "95b65ddd5669b41385966a4aad387118",
"status": "SUCCESS"
}
15 changes: 15 additions & 0 deletions abed_results/bee_waggle_6/best_zero/6fec83c31881a45d.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"command": "/home/gertjan/share/work/turing/aida/research/projects/changepoint/experiments/cpdbench/execs/python/cpdbench_zero.py -i /home/gertjan/share/work/turing/aida/research/projects/changepoint/experiments/cpdbench/datasets/bee_waggle_6.json",
"dataset": "bee_waggle_6",
"dataset_md5": "4f03feafecb3be0b069b3cb0d6b17d4f",
"error": null,
"hostname": "nyx",
"parameters": {},
"result": {
"cplocations": [],
"runtime": 4.76837158203125e-07
},
"script": "/home/gertjan/share/work/turing/aida/research/projects/changepoint/experiments/cpdbench/execs/python/cpdbench_zero.py",
"script_md5": "95b65ddd5669b41385966a4aad387118",
"status": "SUCCESS"
}
15 changes: 15 additions & 0 deletions abed_results/bee_waggle_6/default_zero/ae18dda4acb23ea7.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"command": "/home/gertjan/share/work/turing/aida/research/projects/changepoint/experiments/cpdbench/execs/python/cpdbench_zero.py -i /home/gertjan/share/work/turing/aida/research/projects/changepoint/experiments/cpdbench/datasets/bee_waggle_6.json",
"dataset": "bee_waggle_6",
"dataset_md5": "4f03feafecb3be0b069b3cb0d6b17d4f",
"error": null,
"hostname": "nyx",
"parameters": {},
"result": {
"cplocations": [],
"runtime": 2.384185791015625e-07
},
"script": "/home/gertjan/share/work/turing/aida/research/projects/changepoint/experiments/cpdbench/execs/python/cpdbench_zero.py",
"script_md5": "95b65ddd5669b41385966a4aad387118",
"status": "SUCCESS"
}
15 changes: 15 additions & 0 deletions abed_results/bitcoin/best_zero/c0865595ee43be76.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"command": "/home/gertjan/share/work/turing/aida/research/projects/changepoint/experiments/cpdbench/execs/python/cpdbench_zero.py -i /home/gertjan/share/work/turing/aida/research/projects/changepoint/experiments/cpdbench/datasets/bitcoin.json",
"dataset": "bitcoin",
"dataset_md5": "f90ff14ed1fc0c3d47d4394d25cbce93",
"error": null,
"hostname": "nyx",
"parameters": {},
"result": {
"cplocations": [],
"runtime": 0.0
},
"script": "/home/gertjan/share/work/turing/aida/research/projects/changepoint/experiments/cpdbench/execs/python/cpdbench_zero.py",
"script_md5": "95b65ddd5669b41385966a4aad387118",
"status": "SUCCESS"
}
15 changes: 15 additions & 0 deletions abed_results/bitcoin/default_zero/90ab4f9319badc7a.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"command": "/home/gertjan/share/work/turing/aida/research/projects/changepoint/experiments/cpdbench/execs/python/cpdbench_zero.py -i /home/gertjan/share/work/turing/aida/research/projects/changepoint/experiments/cpdbench/datasets/bitcoin.json",
"dataset": "bitcoin",
"dataset_md5": "f90ff14ed1fc0c3d47d4394d25cbce93",
"error": null,
"hostname": "nyx",
"parameters": {},
"result": {
"cplocations": [],
"runtime": 2.384185791015625e-07
},
"script": "/home/gertjan/share/work/turing/aida/research/projects/changepoint/experiments/cpdbench/execs/python/cpdbench_zero.py",
"script_md5": "95b65ddd5669b41385966a4aad387118",
"status": "SUCCESS"
}
15 changes: 15 additions & 0 deletions abed_results/brent_spot/best_zero/237554a8f4105f72.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"command": "/home/gertjan/share/work/turing/aida/research/projects/changepoint/experiments/cpdbench/execs/python/cpdbench_zero.py -i /home/gertjan/share/work/turing/aida/research/projects/changepoint/experiments/cpdbench/datasets/brent_spot.json",
"dataset": "brent_spot",
"dataset_md5": "79892116ef8a0aa16e2450123655b31d",
"error": null,
"hostname": "nyx",
"parameters": {},
"result": {
"cplocations": [],
"runtime": 2.384185791015625e-07
},
"script": "/home/gertjan/share/work/turing/aida/research/projects/changepoint/experiments/cpdbench/execs/python/cpdbench_zero.py",
"script_md5": "95b65ddd5669b41385966a4aad387118",
"status": "SUCCESS"
}
15 changes: 15 additions & 0 deletions abed_results/brent_spot/default_zero/5d01091d87a3b8ac.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"command": "/home/gertjan/share/work/turing/aida/research/projects/changepoint/experiments/cpdbench/execs/python/cpdbench_zero.py -i /home/gertjan/share/work/turing/aida/research/projects/changepoint/experiments/cpdbench/datasets/brent_spot.json",
"dataset": "brent_spot",
"dataset_md5": "79892116ef8a0aa16e2450123655b31d",
"error": null,
"hostname": "nyx",
"parameters": {},
"result": {
"cplocations": [],
"runtime": 2.384185791015625e-07
},
"script": "/home/gertjan/share/work/turing/aida/research/projects/changepoint/experiments/cpdbench/execs/python/cpdbench_zero.py",
"script_md5": "95b65ddd5669b41385966a4aad387118",
"status": "SUCCESS"
}
Loading

0 comments on commit b349ffe

Please sign in to comment.