{"id":37063144,"url":"https://github.com/tsitsimis/tinyshap","last_synced_at":"2026-01-14T07:03:01.156Z","repository":{"id":154409858,"uuid":"625629908","full_name":"tsitsimis/tinyshap","owner":"tsitsimis","description":"Python package providing a minimal implementation of the SHAP algorithm using the Kernel method","archived":false,"fork":false,"pushed_at":"2023-05-27T10:10:56.000Z","size":181,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-29T16:58:00.353Z","etag":null,"topics":["explainable-ai","machine-learning","ml","python-package","shap","shapely","xai"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tsitsimis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-04-09T17:48:57.000Z","updated_at":"2024-11-12T08:55:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"8da91ccd-1845-4c03-a0ca-a2cacf6ddebe","html_url":"https://github.com/tsitsimis/tinyshap","commit_stats":{"total_commits":40,"total_committers":1,"mean_commits":40.0,"dds":0.0,"last_synced_commit":"63f7b35b983302e1135c1d6d124a3feb3f96aa64"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/tsitsimis/tinyshap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsitsimis%2Ftinyshap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsitsimis%2Ftinyshap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsitsimis%2Ftinyshap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsitsimis%2Ftinyshap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tsitsimis","download_url":"https://codeload.github.com/tsitsimis/tinyshap/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsitsimis%2Ftinyshap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28412493,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T05:26:33.345Z","status":"ssl_error","status_checked_at":"2026-01-14T05:21:57.251Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["explainable-ai","machine-learning","ml","python-package","shap","shapely","xai"],"created_at":"2026-01-14T07:03:00.442Z","updated_at":"2026-01-14T07:03:01.150Z","avatar_url":"https://github.com/tsitsimis.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tinyshap\n\u003ca href=\"https://pypi.org/project/tinyshap\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://img.shields.io/pypi/v/tinyshap?color=%2334D058\u0026label=pypi%20package\" alt=\"Package version\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://pypi.org/project/tinyshap\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://img.shields.io/pypi/pyversions/tinyshap.svg?color=%2334D058\" alt=\"Supported Python versions\"\u003e\n\u003c/a\u003e\n\n![](./assets/demo-dependency-plot.png)\n\nA minimal implementation of the SHAP algorithm using the KernelSHAP method. In less then 100 lines of code, this repo serves as an educational resource to understand how SHAP works without all the complexities of a production-level package.\n\n## Installation\n```bash\npip install tinyshap\n```\n\n## Example usage\n```python\nfrom tinyshap import SHAPExplainer\n\n# Train model\nmodel = GradientBoostingRegressor()\nmodel.fit(X_train, y_train)\n\n# Explain predictions\nexplainer = SHAPExplainer(model.predict, X=X_train.mean().to_frame().T)\ncontributions = explainer.shap_values(X)\n```\n\nSee complete [notebook](./notebooks/demo.ipynb)\n\n## Resources\n* [A Unified Approach to Interpreting Model Predictions (arXiv)](https://arxiv.org/abs/1705.07874)\n* [Interpretable Machine Learning](https://christophm.github.io/interpretable-ml-book/shap.html#kernelshap)\n\n\n## Licence\nMIT\n \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsitsimis%2Ftinyshap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftsitsimis%2Ftinyshap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsitsimis%2Ftinyshap/lists"}