-
Notifications
You must be signed in to change notification settings - Fork 5
/
setup.py
179 lines (143 loc) · 6.41 KB
/
setup.py
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
import os
import Cython
import numpy as np
from Cython.Build import cythonize
from setuptools import Extension, find_packages, setup
libs = []
if os.name == 'posix':
libs.append('m')
dirs = [np.get_include(), '.']
extensions = []
# ----------------------------- algorithms -----------------------------
# ----------------------------- base -----------------------------
dependencies = ['pystream/algorithms/nominal_counters/nominal_counter.pxd'
'pystream/algorithms/nominal_counters/nominal_counter.pxd']
E = Extension(name='pystream.algorithms.base.vfdt',
sources=['pystream/algorithms/base/vfdt.pyx'],
libraries=libs,
include_dirs=dirs,
depends=dependencies)
extensions.append(E)
E = Extension(name='pystream.algorithms.base.svfdt',
sources=['pystream/algorithms/base/svfdt.pyx'],
libraries=libs,
include_dirs=dirs,
depends=dependencies + ['pystream/algorithms/base/vfdt.pxd'])
extensions.append(E)
E = Extension(name='pystream.algorithms.base.svfdt_ii',
sources=['pystream/algorithms/base/svfdt_ii.pyx'],
libraries=libs,
include_dirs=dirs,
depends=dependencies + ['pystream/algorithms/base/vfdt.pxd',
'pystream/algorithms/base/svfdt.pxd'])
extensions.append(E)
E = Extension(name='pystream.algorithms.base.olboost_vfdt',
sources=['pystream/algorithms/base/olboost_vfdt.pyx'],
libraries=libs,
include_dirs=dirs,
depends=dependencies + ['pystream/algorithms/base/vfdt.pxd'])
extensions.append(E)
E = Extension(name='pystream.algorithms.base.olboost_svfdt',
sources=['pystream/algorithms/base/olboost_svfdt.pyx'],
libraries=libs,
include_dirs=dirs,
depends=dependencies + ['pystream/algorithms/base/vfdt.pxd'])
extensions.append(E)
E = Extension(name='pystream.algorithms.base.olboost_svfdt_ii',
sources=['pystream/algorithms/base/olboost_svfdt_ii.pyx'],
libraries=libs,
include_dirs=dirs,
depends=dependencies + ['pystream/algorithms/base/vfdt.pxd',
'pystream/algorithms/base/svfdt.pxd'])
extensions.append(E)
# ----------------------------- change_detectors -----------------------------
E = Extension(name='pystream.algorithms.change_detectors.adwin',
sources=['pystream/algorithms/change_detectors/adwin.pyx'],
libraries=libs,
include_dirs=dirs)
extensions.append(E)
# ----------------------------- ensembles -----------------------------
dependencies = ['pystream/algorithms/change_detectors/adwin.pxd']
E = Extension(name='pystream.algorithms.ensembles.arf',
sources=['pystream/algorithms/ensembles/arf.pyx'],
libraries=libs,
include_dirs=dirs,
depends=dependencies)
extensions.append(E)
E = Extension(name='pystream.algorithms.ensembles.leveraging_bagging',
sources=['pystream/algorithms/ensembles/leveraging_bagging.pyx'],
libraries=libs,
include_dirs=dirs,
depends=dependencies)
extensions.append(E)
E = Extension(name='pystream.algorithms.ensembles.oaue',
sources=['pystream/algorithms/ensembles/oaue.pyx'],
libraries=libs,
include_dirs=dirs)
extensions.append(E)
E = Extension(name='pystream.algorithms.ensembles.ozabagging',
sources=['pystream/algorithms/ensembles/ozabagging.pyx'],
libraries=libs,
include_dirs=dirs)
extensions.append(E)
E = Extension(name='pystream.algorithms.ensembles.ozaboosting',
sources=['pystream/algorithms/ensembles/ozaboosting.pyx'],
libraries=libs,
include_dirs=dirs)
extensions.append(E)
# ----------------------------- nominal_counters -----------------------------
E = Extension(name='pystream.algorithms.base.nominal_counters.nominal_counter',
sources=['pystream/algorithms/base/nominal_counters/nominal_counter.pyx'],
libraries=libs,
include_dirs=dirs)
extensions.append(E)
# ----------------------------- numeric_estimators -----------------------------
E = Extension(name='pystream.algorithms.base.numeric_estimators.gaussian_estimator',
sources=['pystream/algorithms/base/numeric_estimators/gaussian_estimator.pyx'],
libraries=libs,
include_dirs=dirs)
extensions.append(E)
# ----------------------------- statistics -----------------------------
E = Extension(name='pystream.algorithms.base.statistics.tree_stats',
sources=['pystream/algorithms/base/statistics/tree_stats.pyx'],
libraries=libs,
include_dirs=dirs)
extensions.append(E)
E = Extension(name='pystream.algorithms.base.statistics.value_stats',
sources=['pystream/algorithms/base/statistics/value_stats.pyx'],
libraries=libs,
include_dirs=dirs)
extensions.append(E)
# ----------------------------- evaluation -----------------------------
E = Extension(name='pystream.evaluation.evaluate_prequential',
sources=['pystream/evaluation/evaluate_prequential.pyx'],
libraries=libs,
include_dirs=dirs)
extensions.append(E)
E = Extension(name='pystream.evaluation.performance_statistics',
sources=['pystream/evaluation/performance_statistics.pyx'],
libraries=libs,
include_dirs=dirs)
extensions.append(E)
# ----------------------------- utils -----------------------------
E = Extension(name='pystream.utils.stream_gen',
sources=['pystream/utils/stream_gen.pyx'],
libraries=libs,
include_dirs=dirs)
extensions.append(E)
setup(name='pystream',
version='1.0',
description='Pystream',
url='http://github.com/vturrisi/pystream',
author='Victor Turrisi',
license='MIT',
packages=find_packages(exclude=['tests']),
quiet=True,
ignore_setup_xxx_py=True,
assume_default_configuration=True,
ext_modules=cythonize(extensions, nthreads=4, quiet=False),
cmdclass={'build_ext': Cython.Build.build_ext},
setup_requires=['cython>=0.x'],
install_requires=['numpy>=1.14.1', 'pandas>=0.20.0', 'cython>=0.x'],
include_package_data=True,
zip_safe=False)