-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (34 loc) · 1.21 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
# Driver script
# Avinash Prabhakaran, Nov 2017
# Script automates reading, processing and visualising data
#
# usage: make all
train_link = http://archive.ics.uci.edu/ml/machine-learning-databases/adult/adult.data
test_link = http://archive.ics.uci.edu/ml/machine-learning-databases/adult/adult.test
data_path = doc
all: report
#To read the data in from the URL. The arguments are optional and have been stored as variables in the makefile.
read_data:
Rscript src/data_read.R --train=$(train_link) --test=$(test_link)
#To process the raw data.
data_processing: read_data
Rscript src/data_processing.R --write=$(data_path)
#To generate a summary of all the continuous variable
data_summary:
Rscript src/data_summary.R --read=$(data_path) --write=$(data_path)
#To generate various plots of the dataset.
data_viz: data_processing
Rscript src/data_viz.R --read=$(data_path) --write=$(data_path)
#To create confusion matrix
matrix:
python3 src/model.py
#To create the report.
report: data_viz data_summary matrix
Rscript -e 'rmarkdown::render("src/report.Rmd", output_dir = "results")'
#To delete all the files created.
remove: clean
rm data/*
#To delete all the files created for analysis
clean:
rm results/*
rm doc/*