Package Details: python-shap 0.47.2-1

Git Clone URL: https://aur.archlinux.org/python-shap.git (read-only, click to copy)
Package Base: python-shap
Description: Game theoretic approach to explain the output of any machine learning model
Upstream URL: https://github.com/slundberg/shap
Keywords: Additive exPlanations shapley
Licenses: MIT
Submitter: flipflop97
Maintainer: mboquien
Last Packager: mboquien
Votes: 3
Popularity: 0.50
First Submitted: 2020-05-22 21:13 (UTC)
Last Updated: 2025-05-09 16:59 (UTC)

Latest Comments

kashyap.cc commented on 2025-05-05 06:52 (UTC)

Here is the new PKGBUILD

# Maintainer: Médéric Boquien <mboquien@free.fr>
# Contributor: Philip Goto <philip.goto@gmail.com>
# Contributor: Kashyap Chhatbar <kashyap.cc@gmail.com>

_pkg=shap
pkgname=python-${_pkg}
pkgver=0.47.2
pkgrel=1
pkgdesc="Game theoretic approach to explain the output of any machine learning model"
arch=(i686 x86_64 armv7h aarch64)
url="https://github.com/shap/shap"
license=(MIT)
depends=(python python-numpy python-scipy python-scikit-learn python-pandas python-tqdm python-packaging python-slicer python-numba python-cloudpickle)
makedepends=(python-build python-installer python-wheel cython)
optdepends=(ipython python-matplotlib)
source=(https://files.pythonhosted.org/packages/source/s/${_pkg}/${_pkg}-${pkgver}.tar.gz)
sha512sums=('5e30944eed87d806fb3a14a2820e1aa2d38bc6e49dc1be909b1d36b61be9eea5877f12e1a19f7d12ba40fac4cfef19b17cc0fcbc23584327a11a24f86cf7a99f')

build() {
  cd ${_pkg}-${pkgver}
  python -m build --wheel --no-isolation --skip-dependency-check
}

package(){
    cd "${_pkg}-${pkgver}"
    python -m installer --destdir="${pkgdir}" dist/*.whl
    install -D LICENSE "${pkgdir}/usr/share/licenses/python-${_pkg}/LICENSE"
}

kashyap.cc commented on 2025-04-09 19:29 (UTC) (edited on 2025-04-09 19:30 (UTC) by kashyap.cc)

As of the most recent version, cython is required for building the wheel

Source: pyproject.toml

hockeymikey commented on 2024-12-05 16:35 (UTC)

@mboquien v0.46.0 was released

rudy.matela commented on 2023-07-07 12:26 (UTC)

Here's a further update: python-shap-0.42.0-2

I have now included optional dependencies as listed in: https://github.com/slundberg/shap/blob/master/pyproject.toml

# Maintainer: Philip Goto <philip.goto@gmail.com>
# Contributor: Rudy Matela <rudy@matela.com.br>
# Contributor: Philip Goto <philip.goto@gmail.com>

pkgname=python-shap
pkgver=0.42.0
pkgrel=2
pkgdesc='A game theoretic approach to explain the output of any machine learning model'
arch=(i686 x86_64 armv7h aarch64)
url='https://pypi.org/project/shap/'
_url='https://github.com/slundberg/shap'
license=(BSD)
depends=(
  gcc-libs
  glibc
  ipython
  python
  python-cloudpickle
  python-dill
  python-keras
  python-lime
  python-matplotlib
  python-numba
  python-numpy
  python-packaging
  python-pandas
  python-scikit-learn
  python-scipy
  python-slicer
  python-tqdm
)
makedepends=(
  python-setuptools
  python-wheel
)
optdepends=(
  python-catboost
  python-opencv
  python-pyspark
  python-pytorch
  python-tensorflow
  python-xgboost
)
_archive="${pkgname#python-}-$pkgver"
source=("${_url}/archive/v${pkgver}/${_archive}.tar.gz")
sha256sums=('73a9e99dee19e1db4ba058c5bf6209ce2bd49f6e91c3c16e94480f8bbb92c97a')

package() {
    cd $_archive
    python setup.py install --root="$pkgdir" --optimize=1
    install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE
}

rudy.matela commented on 2023-07-07 11:06 (UTC) (edited on 2023-07-07 12:23 (UTC) by rudy.matela)

@mboquien, version 0.42.0 of python-shap was released yesterday:

https://github.com/slundberg/shap/releases/tag/v0.42.0

I think several dependencies are missing from the PKGBUILD, namely: python-cloudpickle, python-dill, python-keras, python-lime, python-matplotlib, python-numba, python-numpy, python-packaging, python-pandas, python-scikit-learn, python-scipy, python-slicer and python-tqdm.

Here is an updated PKGBUILD with the above dependencies:

# Maintainer: Philip Goto <philip.goto@gmail.com>
# Contributor: Rudy Matela <rudy@matela.com.br>
# Contributor: Philip Goto <philip.goto@gmail.com>

pkgname=python-shap
pkgver=0.42.0
pkgrel=1
pkgdesc='A game theoretic approach to explain the output of any machine learning model'
arch=(i686 x86_64 armv7h aarch64)
url='https://pypi.org/project/shap/'
_url='https://github.com/slundberg/shap'
license=(BSD)
depends=(
  gcc-libs
  glibc
  ipython
  python
  python-cloudpickle
  python-dill
  python-keras
  python-lime
  python-matplotlib
  python-numba
  python-numpy
  python-packaging
  python-pandas
  python-scikit-learn
  python-scipy
  python-slicer
  python-tensorflow
  python-tqdm
)
makedepends=(
  python-setuptools
  python-wheel
)
_archive="${pkgname#python-}-$pkgver"
source=("${_url}/archive/v${pkgver}/${_archive}.tar.gz")
sha256sums=('73a9e99dee19e1db4ba058c5bf6209ce2bd49f6e91c3c16e94480f8bbb92c97a')

package() {
    cd $_archive
    python setup.py install --root="$pkgdir" --optimize=1
    install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE
}

There are still a few other potential missing deps, which namcap is able to list: namcap python-shap-0.42.0-1-x86_64.pkg.tar.zst

If you add me as co-maintainer, I'll happily address these myself. If not, feel free to use the above PKGBUILD. :-)