-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
52 lines (45 loc) · 1.89 KB
/
Makefile
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
# Run the scripts
all: docs/index.html
# Target for getting train/test data
data/raw/train_data.csv data/raw/test_data.csv data/raw/sampled_data.zip:
python src/scripts/english_score_get_data.py \
--url="https://osf.io/download/g72pq/" \
--output_folder_path="./data/raw"
# Target for performing EDA
results/models/preprocessor/preprocessor.pkl: data/raw/train_data.csv
python src/scripts/english_score_eda.py -v \
--training-data="data/raw/train_data.csv" \
--plot-to="results/figures/" \
--pickle-to="results/models/preprocessor/" \
--tables-to="results/tables/"
# Target for tuning models
results/models/ridge_best_model.pkl: data/raw/train_data.csv data/raw/test_data.csv results/models/preprocessor/preprocessor.pkl
python src/scripts/english_score_tuning.py -v \
--train="data/raw/train_data.csv" \
--test="data/raw/test_data.csv" \
--output_dir="results/" \
--preprocessor_path="results/models/preprocessor/preprocessor.pkl"
# Target for getting optimal model results
results/figures/act-vs-pred.png results/tables/test-score.csv: data/raw/train_data.csv data/raw/test_data.csv results/models/ridge_best_model.pkl
python src/scripts/english_score_results.py -v \
--train="data/raw/train_data.csv" \
--test="data/raw/test_data.csv" \
--plot_to="results/figures/" \
--tables_to="results/tables/" \
--preprocessor_path="results/models/preprocessor/preprocessor.pkl" \
--best_model_path="results/models/ridge_best_model.pkl"
notebooks/_build/html: results/figures/act-vs-pred.png results/tables/test-score.csv
jupyter-book build notebooks
docs/index.html: notebooks/_build/html
cp -r notebooks/_build/html/ docs
if [ ! -f ".nojekyll" ]; then touch docs/.nojekyll; fi
# Clean up everything
clean:
rm -r data/raw/*.csv
rm -r data/raw/*.zip
rm -r results/figures/*.png
rm -r results/tables/*.csv
rm -r results/models/*.pkl
rm -r results/models/preprocessor/*.pkl
rm -rf notebooks/_build
rm -rf docs