-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
58 lines (46 loc) · 2.07 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
53
54
55
56
57
58
# Makefile
# DSCI GROUP 11, Mar 2023
# This script generates data, models, graphs and tables required for the
# report of wine quality analysis, and also generates the report in html
# format.
# example usage:
# make all - running this command in the terminal will generate everything needed for the report
# make clean - running this will remove everything that generated by the makefile
all: load cleansplit eda cor scores html
#load the data
load: src/load.py
python src/load.py data/raw_data.csv
# clean and split the data
cleansplit: load src/cleansplit.py
python src/cleansplit.py data/raw_data.csv
# conduct eda
eda: src/eda.py cleansplit
mkdir results
python src/eda.py data/train.csv results/eda_
# generate graphs for hyperparameter tuning process of different models
# hpfigures: src/hpfigures.py cleansplit
# python src/hpfigures.py data/train.csv lr results/
# python src/hpfigures.py data/train.csv svm results/
# python src/hpfigures.py data/train.csv dtc results/
# generate coffeicent graphs of logistic regression model
# coefficient: src/coefficients.py cleansplit
# python src/coefficients.py data/train.csv results/coeftable
# generate graphs for performance of different model
cor: src/cor_ratio.py data/train.csv cleansplit
python src/cor_ratio.py data/train.csv data/test.csv lr results/
python src/cor_ratio.py data/train.csv data/test.csv svm results/
python src/cor_ratio.py data/train.csv data/test.csv dtc results/
python src/cor_ratio.py data/train.csv data/test.csv dummy results/
python src/cor_ratio.py data/train.csv data/test.csv bayes results/
# generate graphs for model comparison
scores: src/scores.py cleansplit
python src/scores.py data/train.csv data/test.csv results/
# generate the report in html format
html:
# jupyter nbconvert --to html --no-input --execute wineclassification.ipynb --output report.html --ExecutePreprocessor.timeout=-1
quarto render wineclassification.ipynb --to html
# clean all generated data, graphs, table and the report
clean:
rm -rf results/
rm -rf data/raw_data.csv data/test.csv data/train.csv
rm -rf report.html