diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-01-15 10:30:44 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-01-15 10:30:44 +0000 |
commit | e0794be8a0d11e90461e5a9c85012a36b93ec976 (patch) | |
tree | efd9cbc55ea3322867bf601c4d536758a3dd5fcc /nixpkgs/pkgs/development/python-modules/shap | |
parent | 3538874082ded7647b1ccec0343c7c1e882cfef3 (diff) | |
parent | 1a57d96edd156958b12782e8c8b6a374142a7248 (diff) | |
download | nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.gz nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.bz2 nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.lz nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.xz nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.zst nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.zip |
Merge commit '1a57d96edd156958b12782e8c8b6a374142a7248'
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/shap')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/shap/default.nix | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/shap/default.nix b/nixpkgs/pkgs/development/python-modules/shap/default.nix new file mode 100644 index 000000000000..deb6dcf2a21a --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/shap/default.nix @@ -0,0 +1,70 @@ +{ stdenv +, buildPythonPackage +, fetchFromGitHub +, isPy27 +, pytestCheckHook +, numpy +, scipy +, scikitlearn +, pandas +, tqdm +, slicer +, numba +, matplotlib +, nose +, ipython +}: + +buildPythonPackage rec { + pname = "shap"; + version = "0.36.0"; + disabled = isPy27; + + src = fetchFromGitHub { + owner = "slundberg"; + repo = pname; + rev = "v${version}"; + sha256 = "1wxnxvbz6avzzfqjfbcqd4v879hvpq4021v31fhdpccr2q317rr9"; + }; + + propagatedBuildInputs = [ + numpy + scipy + scikitlearn + pandas + tqdm + slicer + numba + ]; + + preCheck = '' + export HOME=$TMPDIR + # when importing the local copy the extension is not found + rm -r shap + ''; + checkInputs = [ pytestCheckHook matplotlib nose ipython ]; + # Those tests access the network + disabledTests = [ + "test_kernel_shap_with_a1a_sparse_zero_background" + "test_kernel_shap_with_a1a_sparse_nonzero_background" + "test_kernel_shap_with_high_dim_sparse" + "test_sklearn_random_forest_newsgroups" + "test_sum_match_random_forest" + "test_sum_match_extra_trees" + "test_single_row_random_forest" + "test_sum_match_gradient_boosting_classifier" + "test_single_row_gradient_boosting_classifier" + "test_HistGradientBoostingClassifier_proba" + "test_HistGradientBoostingClassifier_multidim" + "test_sum_match_gradient_boosting_regressor" + "test_single_row_gradient_boosting_regressor" + ]; + + meta = with stdenv.lib; { + description = "A unified approach to explain the output of any machine learning model"; + homepage = "https://github.com/slundberg/shap"; + license = licenses.mit; + maintainers = with maintainers; [ evax ]; + platforms = platforms.unix; + }; +} |