-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
75 lines (64 loc) · 3.39 KB
/
Copy pathMakefile
File metadata and controls
75 lines (64 loc) · 3.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Single entrypoint for regenerating every derived artifact.
#
# make generate — everything below, in dependency order
# make sweeps — the two parameter sweeps -> utils/*.csv (sage)
# make derived — thresholds + extremes from the sweep CSVs (python)
# make data — site/data.json for both site pages (sage)
# make figures — report figures from the generated data (python)
# make test — regression suite (validates artifacts <-> model)
# make clean-generated
SAGE ?= sage
PYTHON ?= python3
UTILS := utils
IMAGES := document/content/images
CSV_CAPPED := $(UTILS)/all_size_capped_candidates.csv
CSV_UNBOUND := $(UTILS)/all_unbound_candidates.csv
.PHONY: generate sweeps derived data figures test clean-generated
generate: sweeps derived data figures test
sweeps:
$(SAGE) slhdsa-2to40.sage --max-size 7856 > /dev/null
mv candidates.csv $(CSV_CAPPED)
$(SAGE) slhdsa-2to40.sage --max-size 99999999 > /dev/null
mv candidates.csv $(CSV_UNBOUND)
derived:
cd $(UTILS) && $(PYTHON) min_mult_search.py
$(PYTHON) $(UTILS)/extremes_summary.py
data:
$(SAGE) export_site_data.sage
figures:
mkdir -p $(IMAGES) # holds only generated files, so fresh checkouts lack it
cd $(IMAGES) && $(PYTHON) ../../../$(UTILS)/sieve_search_draw.py \
--input ../../../$(CSV_UNBOUND) --weights 1,1,1,1,1 --suffix _1
cd $(IMAGES) && $(PYTHON) ../../../$(UTILS)/sieve_search_draw.py \
--input ../../../$(CSV_UNBOUND) --weights 5,1,1.5,2,1 --suffix _2
cd $(UTILS) && $(PYTHON) venn_diagram_draw.py
mv $(UTILS)/euler_custom_minimax.png $(IMAGES)/concentric_diagram.png
cd $(IMAGES) && $(PYTHON) ../../../$(UTILS)/plot_concept_scatter.py
mv $(IMAGES)/conceptual_bounded_zones_origin_vector.png $(IMAGES)/scatter_plot.png
# Report Sec. "Metric-Normalized Weighted Distance": method comparison
cd $(IMAGES) && $(PYTHON) ../../../$(UTILS)/sieve_search_draw.py \
--input ../../../$(CSV_UNBOUND) --figure focus --distance regular \
--x-size 0.75 --x-kg 5 --x-sg 5 --x-sv 1.5 --x-cb 1 \
--weights 5,1.5,1.5,2,1 --out comparison_regular.png
cd $(IMAGES) && $(PYTHON) ../../../$(UTILS)/sieve_search_draw.py \
--input ../../../$(CSV_UNBOUND) --figure focus --distance normalized \
--x-size 0.75 --x-kg 5 --x-sg 5 --x-sv 1.5 --x-cb 1 \
--weights 5,1.5,1.5,2,1 --out comparison_normalized.png
# Report Sec. "Recommended Candidate Tuple": the two surviving candidates
cd $(IMAGES) && $(PYTHON) ../../../$(UTILS)/sieve_search_draw.py \
--input ../../../$(CSV_UNBOUND) --figure focus --distance regular --annotate \
--x-size 0.74 --x-kg 2 --x-sg 2 --x-sv 0.8 --x-cb 1 \
--weights 5,1,1,2,1 --out ideal_candidate_balanced.png
cd $(IMAGES) && $(PYTHON) ../../../$(UTILS)/sieve_search_draw.py \
--input ../../../$(CSV_UNBOUND) --figure focus --distance normalized --annotate \
--x-size 0.74 --x-kg 2 --x-sg 2 --x-sv 0.8 --x-cb 1 \
--weights 5,1,1,2,1 --out ideal_candidate_best.png
test:
$(PYTHON) tests/test_regression.py
clean-generated:
rm -f $(CSV_CAPPED) $(CSV_UNBOUND)
rm -f $(UTILS)/global_X_thresholds.csv $(UTILS)/master_extremes_summary.csv
rm -f site/data.json site/report.pdf
rm -f $(IMAGES)/sieve_step*.png $(IMAGES)/concentric_diagram.png $(IMAGES)/scatter_plot.png
rm -f $(IMAGES)/comparison_regular.png $(IMAGES)/comparison_normalized.png
rm -f $(IMAGES)/ideal_candidate_balanced.png $(IMAGES)/ideal_candidate_best.png