{"id":13639641,"url":"https://github.com/andosa/treeinterpreter","last_synced_at":"2025-10-20T16:09:25.521Z","repository":{"id":35809413,"uuid":"40091806","full_name":"andosa/treeinterpreter","owner":"andosa","description":null,"archived":false,"fork":false,"pushed_at":"2023-07-18T10:50:27.000Z","size":28,"stargazers_count":759,"open_issues_count":26,"forks_count":140,"subscribers_count":24,"default_branch":"master","last_synced_at":"2025-09-24T06:53:10.042Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andosa.png","metadata":{"files":{"readme":"README.rst","changelog":"HISTORY.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2015-08-02T20:26:21.000Z","updated_at":"2025-07-04T13:52:38.000Z","dependencies_parsed_at":"2024-01-08T12:18:06.620Z","dependency_job_id":null,"html_url":"https://github.com/andosa/treeinterpreter","commit_stats":{"total_commits":28,"total_committers":11,"mean_commits":"2.5454545454545454","dds":0.5714285714285714,"last_synced_commit":"24f716b9dca60e2c04bb8e27f5b90a342f93ffd2"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/andosa/treeinterpreter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andosa%2Ftreeinterpreter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andosa%2Ftreeinterpreter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andosa%2Ftreeinterpreter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andosa%2Ftreeinterpreter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andosa","download_url":"https://codeload.github.com/andosa/treeinterpreter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andosa%2Ftreeinterpreter/sbom","scorecard":{"id":192078,"data":{"date":"2025-08-11","repo":{"name":"github.com/andosa/treeinterpreter","commit":"24f716b9dca60e2c04bb8e27f5b90a342f93ffd2"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.6,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":4,"reason":"Found 9/21 approved changesets -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: BSD 3-Clause \"New\" or \"Revised\" License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 18 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-16T20:56:18.961Z","repository_id":35809413,"created_at":"2025-08-16T20:56:18.961Z","updated_at":"2025-08-16T20:56:18.961Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280119196,"owners_count":26275413,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-20T02:00:06.978Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-08-02T01:01:02.882Z","updated_at":"2025-10-20T16:09:25.442Z","avatar_url":"https://github.com/andosa.png","language":"Python","readme":"===============================\nTreeInterpreter\n===============================\n\nPackage for interpreting scikit-learn's decision tree and random forest predictions.\nAllows decomposing each prediction into bias and feature contribution components as described in http://blog.datadive.net/interpreting-random-forests/. For a dataset with ``n`` features, each prediction on the dataset is decomposed  as ``prediction = bias + feature_1_contribution + ... + feature_n_contribution``.\n\nIt works on scikit-learn's\n\n* DecisionTreeRegressor\n* DecisionTreeClassifier\n* ExtraTreeRegressor\n* ExtraTreeClassifier\n* RandomForestRegressor\n* RandomForestClassifier\n* ExtraTreesRegressor\n* ExtraTreesClassifier\n\nFree software: BSD license\n\nDependencies\n------------\n\n- scikit-learn 0.17+\n\n\nInstallation\n------------\nThe easiest way to install the package is via ``pip``::\n\n    $ pip install treeinterpreter\n\nUsage\n-----\n::\n\n from treeinterpreter import treeinterpreter as ti\n # fit a scikit-learn's regressor model\n rf = RandomForestRegressor()\n rf.fit(trainX, trainY)\n \n prediction, bias, contributions = ti.predict(rf, testX)\n \nPrediction is the sum of bias and feature contributions::\n \n assert(numpy.allclose(prediction, bias + np.sum(contributions, axis=1)))\n assert(numpy.allclose(rf.predict(testX), bias + np.sum(contributions, axis=1)))\n\n\nMore usage examples at http://blog.datadive.net/random-forest-interpretation-with-scikit-learn/.\n\n \n","funding_links":[],"categories":["Model Explanation","Explaining Black Box Models and Datasets","Explainability and Fairness","Python","模型的可解释性","Technical Resources","Python Libraries(sort in alphabeta order)"],"sub_categories":["Others","NLP","Open Source/Access Responsible AI Software Packages","Evaluation methods"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandosa%2Ftreeinterpreter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandosa%2Ftreeinterpreter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandosa%2Ftreeinterpreter/lists"}