1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 python,
6 pythonOlder,
7
8 setuptools,
9 wheel,
10 cython,
11
12 numpy,
13 scipy,
14 scikit-learn,
15}:
16
17buildPythonPackage rec {
18 pname = "quantile-forest";
19 version = "1.4.0";
20 pyproject = true;
21
22 disabled = pythonOlder "3.8";
23
24 src = fetchFromGitHub {
25 owner = "zillow";
26 repo = "quantile-forest";
27 tag = "v${version}";
28 hash = "sha256-VzHGjV2WWCebUh3UINFi4DbrXBnZXVK2GQtcJb0oKoM=";
29 };
30
31 build-system = [
32 setuptools
33 cython
34 wheel
35 numpy
36 scipy
37 scikit-learn
38 ];
39
40 dependencies = [
41 numpy
42 scipy
43 scikit-learn
44 ];
45
46 postInstall = ''
47 rm -rf $out/${python.sitePackages}/examples
48 '';
49
50 # need network connection
51 doCheck = false;
52
53 pythonImportsCheck = [ "quantile_forest" ];
54
55 meta = with lib; {
56 description = "Quantile Regression Forests compatible with scikit-learn";
57 homepage = "https://github.com/zillow/quantile-forest";
58 changelog = "https://github.com/zillow/quantile-forest/releases/tag/v${version}";
59 license = licenses.asl20;
60 maintainers = with maintainers; [ vizid ];
61 };
62}