forked from ogrisel/lightning
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
150 lines (120 loc) · 4.86 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
PYTHON ?= python
CYTHON ?= cython
NOSETESTS ?= nosetests
DATADIR=$(HOME)/lightning_data
# Compilation...
CYTHONSRC= $(wildcard lightning/*.pyx)
CSRC= $(CYTHONSRC:.pyx=.cpp)
inplace: $(CSRC)
$(PYTHON) setup.py build_ext -i
clean:
rm -f lightning/*.c lightning/*.cpp lightning/*.so lightning/*.html lightning/*.pyc
%.cpp: %.pyx
$(CYTHON) --cplus $<
# Tests...
#
test-code: in
$(NOSETESTS) -s lightning
test-coverage:
$(NOSETESTS) -s --with-coverage --cover-html --cover-html-dir=coverage \
--cover-package=lightning lightning
test: test-code test-doc
# Datasets...
#
datadir:
mkdir -p $(DATADIR)
# regression
download-abalone:
./download.sh http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/regression/abalone_scale
mv abalone_scale $(DATADIR)
download-cadata:
./download.sh http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/regression/cadata
mv cadata $(DATADIR)
download-cpusmall:
./download.sh http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/regression/cpusmall_scale
mv cpusmall_scale $(DATADIR)
download-space_ga:
./download.sh http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/regression/space_ga_scale
mv space_ga_scale $(DATADIR)
download-YearPredictionMSD:
./download.sh http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/regression/YearPredictionMSD.bz2
bunzip2 YearPredictionMSD.bz2
mv YearPredictionMSD $(DATADIR)
./download.sh http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/regression/YearPredictionMSD.t.bz2
bunzip2 YearPredictionMSD.t.bz2
mv YearPredictionMSD.t $(DATADIR)
# binary classification
download-adult: datadir
./download.sh http://leon.bottou.org/_media/papers/lasvm-adult.tar.bz2
tar xvfj lasvm-adult.tar.bz2
mv adult $(DATADIR)
rm lasvm-adult.tar.bz2
download-banana: datadir
./download.sh http://leon.bottou.org/_media/papers/lasvm-banana.tar.bz2
tar xvfj lasvm-banana.tar.bz2
mv banana $(DATADIR)
rm lasvm-banana.tar.bz2
download-covtype:
./download.sh http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/binary/covtype.libsvm.binary.scale.bz2
bunzip2 covtype.libsvm.binary.scale.bz2
mv covtype.libsvm.binary.scale $(DATADIR)
download-ijcnn:
./download.sh http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/binary/ijcnn1.tr.bz2
./download.sh http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/binary/ijcnn1.t.bz2
bunzip2 ijcnn1.tr.bz2
bunzip2 ijcnn1.t.bz2
mv ijcnn1* $(DATADIR)
download-reuters: datadir
./download.sh http://leon.bottou.org/_media/papers/lasvm-reuters.tar.bz2
tar xvfj lasvm-reuters.tar.bz2
mv reuters $(DATADIR)
rm lasvm-reuters.tar.bz2
download-waveform: datadir
./download.sh http://leon.bottou.org/_media/papers/lasvm-waveform.tar.bz2
tar xvfj lasvm-waveform.tar.bz2
mv waveform $(DATADIR)
rm lasvm-waveform.tar.bz2
# multi-class
download-dna: datadir
./download.sh http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multiclass/dna.scale.tr
./download.sh http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multiclass/dna.scale.t
mv dna* $(DATADIR)
download-letter: datadir
./download.sh http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multiclass/letter.scale.tr
./download.sh http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multiclass/letter.scale.t
mv letter* $(DATADIR)
download-mnist: datadir
./download.sh http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multiclass/mnist.scale.bz2
bunzip2 mnist.scale.bz2
mv mnist.scale $(DATADIR)
./download.sh http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multiclass/mnist.scale.t.bz2
bunzip2 mnist.scale.t.bz2
mv mnist.scale.t $(DATADIR)
download-news20: datadir
./download.sh http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multiclass/news20.scale.bz2
bunzip2 news20.scale.bz2
mv news20.scale $(DATADIR)
./download.sh http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multiclass/news20.t.scale.bz2
bunzip2 news20.t.scale.bz2
mv news20.t.scale $(DATADIR)
download-pendigits:
./download.sh http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multiclass/pendigits
./download.sh http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multiclass/pendigits.t
mv pendigits* $(DATADIR)
download-protein:
./download.sh http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multiclass/protein.tr.bz2
./download.sh http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multiclass/protein.t.bz2
bunzip2 protein.tr.bz2
bunzip2 protein.t.bz2
mv protein* $(DATADIR)
download-satimage: datadir
./download.sh http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multiclass/satimage.scale.tr
./download.sh http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multiclass/satimage.scale.t
mv satimage* $(DATADIR)
download-usps: datadir
./download.sh http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multiclass/usps.bz2
bunzip2 usps.bz2
mv usps $(DATADIR)
./download.sh http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multiclass/usps.t.bz2
bunzip2 usps.t.bz2
mv usps.t $(DATADIR)