-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
50 lines (42 loc) · 1.13 KB
/
Makefile
File metadata and controls
50 lines (42 loc) · 1.13 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
########################################################################
#
# Makefile for pre-built ML model
#
# Copyright (c) Graham.Williams@togaware.com
#
# License: Creative Commons Attribution-ShareAlike 4.0 International.
#
########################################################################
# Include standard Makefile templates.
INC_BASE = $(HOME)/.local/share/make
INC_PANDOC = $(INC_BASE)/pandoc.mk
INC_GIT = $(INC_BASE)/git.mk
INC_MLHUB = $(INC_BASE)/mlhub.mk
INC_CLEAN = $(INC_BASE)/clean.mk
ifneq ("$(wildcard $(INC_PANDOC))","")
include $(INC_PANDOC)
endif
ifneq ("$(wildcard $(INC_GIT))","")
include $(INC_GIT)
endif
ifneq ("$(wildcard $(INC_MLHUB))","")
include $(INC_MLHUB)
endif
ifneq ("$(wildcard $(INC_CLEAN))","")
include $(INC_CLEAN)
endif
$(MODEL)_rpart_model.RData: train.R $(MODEL).csv
Rscript $<
%.png: %.pdf
pdftoppm $^ $(@:.png=) -png
mv $(@:.png=-1.png) $@
mogrify -resize 50% $@
data.csv: train.R audit.csv
Rscript $<
clean::
rm -rf README.txt output
realclean:: clean
rm -f $(MODEL)_*.mlm
rm -f $(MODEL)_rpart_model.pdf \
$(MODEL)_rpart_varimp.pdf \
$(MODEL)_rpart_riskchart.pdf \