-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_all.sh
More file actions
27 lines (22 loc) · 1002 Bytes
/
Copy pathrun_all.sh
File metadata and controls
27 lines (22 loc) · 1002 Bytes
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
#!/usr/bin/env bash
# Full research pipeline. ~15 min wall clock. Logs every stage to outputs/.
#
# This regenerates every number in fraud-decisioning-findings.md from the raw
# data. It is the reproducibility guarantee behind the findings, so it stays
# runnable as a single command.
set -euo pipefail
cd "$(dirname "$0")"
# The stages moved to research/ (ADR-0001) but config.py stays at the root,
# because it resolves data/ and outputs/ relative to its own location. Keeping
# it there means artifact paths are identical whether a stage runs via this
# script or directly — and the published logs were produced the second way.
export PYTHONPATH="${PWD}:${PYTHONPATH:-}"
mkdir -p outputs
bash 00_download_data.sh
for s in 01_profile 02_features 03_model 03b_calibrate 04b_ltv 05_economics 06_full; do
echo "=== $s"
python3 "research/$s.py" 2>&1 | tee "outputs/$s.log"
done
echo "=== figures"
python3 "research/figures.py" 2>&1 | tee "outputs/figures.log"
echo "done -- see outputs/*.log"