summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/py-imbalanced-learn/package.py
blob: 9a2861ce5952011c72dc8088f3a1305b29cb47aa (plain) (blame)
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
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack.package import *


class PyImbalancedLearn(PythonPackage):
    """imbalanced-learn is a python package offering a number of re-sampling
    techniques commonly used in datasets showing strong between-class imbalance.
    It is compatible with scikit-learn and is part of scikit-learn-contrib
    projects."""

    homepage = "https://github.com/scikit-learn-contrib/imbalanced-learn"
    pypi = "imbalanced-learn/imbalanced-learn-0.10.1.tar.gz"

    maintainers("meyersbs")

    license("MIT")

    version("0.10.1", sha256="bc7609619ec3c38c442292928239ad3d10b5deb0af8a29c83822b7b57b319f8b")

    # From setup.py:
    depends_on("python@3.8:", type=("build", "run"))
    depends_on("py-setuptools", type="build")
    depends_on("py-numpy@1.17.3:", type=("build", "run"))
    depends_on("py-scipy@1.3.2:", type=("build", "run"))
    depends_on("py-scikit-learn@1.0.2:", type=("build", "run"))

    variant("optional", default=False, description="Enable optional dependencies.")
    depends_on("py-pandas@1.0.5:", when="+optional", type=("build", "run"))
    depends_on("py-tensorflow@2.4.3:", when="+optional", type=("build", "run"))
    depends_on("py-keras@2.4.3:", when="+optional", type=("build", "run"))

    # From https://imbalanced-learn.org/stable/install.html#getting-started:
    depends_on("py-joblib@1.1.1:", type=("build", "run"))
    depends_on("py-threadpoolctl@2.0.0:", type=("build", "run"))
    depends_on("py-cython@0.29.24:", type="build")