This repository was archived by the owner on Oct 17, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
38 lines (34 loc) · 1.51 KB
/
Copy pathsetup.py
File metadata and controls
38 lines (34 loc) · 1.51 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
from setuptools import setup
from Cython.Build import cythonize
from distutils.extension import Extension
import numpy as np
extra_compile_args = ['-O3', '-ffast-math', '-march=native', '-fopenmp']
exts = [
Extension('fastcrf.main', ['fastcrf/main.pyx'], extra_compile_args=extra_compile_args),
Extension('fastcrf.extraction_problem', ['fastcrf/extraction_problem.pyx'], extra_compile_args=extra_compile_args),
Extension('fastcrf.extractor', ['fastcrf/extractor.pyx'],
extra_compile_args=extra_compile_args),
Extension('fastcrf.observations', ['fastcrf/observations.pyx'], extra_compile_args=extra_compile_args),
Extension('fastcrf.splitter', ['fastcrf/splitter.pyx'], extra_compile_args=extra_compile_args),
Extension('fastcrf.math_utils', ['fastcrf/math_utils.pyx'], extra_compile_args=extra_compile_args, include_dirs=[np.get_include()])
]
compiler_directives = {
'boundscheck': False,
'wraparound': False,
'nonecheck': False,
'cdivision': True,
'profile': True
}
setup(
name='fastcrf',
version="0.1alpha",
ext_modules=cythonize(exts, annotate=True, compiler_directives=compiler_directives),
include_dirs=[np.get_include()],
packages=['fastcrf'],
install_requires=['numpy>=1.11.0', 'scikit-learn>=0.21.0', 'ttictoc>=0.4.1', 'Cython>=0.29.14'],
author="rrunix",
author_email="ruben.rrf93@gmail.com",
license="BSD",
description="Extract counterfactual from Random Forest using model internals",
keywords="Counterfactual Random_Forest"
)