{"id":22549797,"url":"https://github.com/ml-libs/mldissect","last_synced_at":"2025-04-10T01:53:23.928Z","repository":{"id":57442255,"uuid":"148058974","full_name":"ml-libs/mldissect","owner":"ml-libs","description":"mldissect - model agnostic predictions explainer","archived":false,"fork":false,"pushed_at":"2023-07-06T21:24:39.000Z","size":30,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T03:34:59.825Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ml-libs.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.txt","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-09T19:33:37.000Z","updated_at":"2018-11-04T17:23:41.000Z","dependencies_parsed_at":"2022-09-26T17:21:04.453Z","dependency_job_id":null,"html_url":"https://github.com/ml-libs/mldissect","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ml-libs%2Fmldissect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ml-libs%2Fmldissect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ml-libs%2Fmldissect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ml-libs%2Fmldissect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ml-libs","download_url":"https://codeload.github.com/ml-libs/mldissect/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248142939,"owners_count":21054671,"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","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-12-07T16:09:48.106Z","updated_at":"2025-04-10T01:53:23.910Z","avatar_url":"https://github.com/ml-libs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"mldissect\n=========\n.. image:: https://travis-ci.com/ml-libs/mldissect.svg?branch=master\n    :target: https://travis-ci.com/ml-libs/mldissect\n.. image:: https://codecov.io/gh/ml-libs/mldissect/branch/master/graph/badge.svg\n    :target: https://codecov.io/gh/ml-libs/mldissect \n.. image:: https://api.codeclimate.com/v1/badges/bc29bc214f39b54ef30a/maintainability\n   :target: https://codeclimate.com/github/ml-libs/mldissect/maintainability\n   :alt: Maintainability\n\n\n**mldissect** is model agnostic predictions explainer, library can show\ncontribution of each feature of your prediction value.\n\nFeatures\n========\n* Supports predictions explanations for classification and regression\n* Easy to use API.\n* Works with ``pandas`` and ``numpy``\n\n\nInstallation\n------------\nInstallation process is simple, just::\n\n    $ pip install mldissect\n\nBasic Usage\n===========\n\n.. code:: python\n\n    # lets train a model\n    boston = load_boston()\n    columns = list(boston.feature_names)\n    X, y = boston['data'], boston['target']\n    X_train, X_test, y_train, y_test = train_test_split(\n        X, y, test_size=.2, random_state=seed\n    )\n\n    clf = LassoCV()\n    clf.fit(X_train, y_train)\n\n    # select first observation in test split\n    observation = X_test[0]\n    # RegressionExplainer uses training data or sample of training data\n    # for large dataset to figure out contributions of each feature\n    explainer = RegressionExplainer(clf, X_train, columns)\n    result = explainer.explain(observation)\n    # print/visualize explanation\n    explanation = Explanation(result)\n    explanation.print()\n\n\nresult::\n\n    +----------+---------+--------------------+\n    | Feature  | Value   | Contribution       |\n    +----------+---------+--------------------+\n    | baseline | -       | 22.611881188118804 |\n    | LSTAT    | 7.34    | 3.6872             |\n    | PTRATIO  | 16.9    | 1.3652             |\n    | CRIM     | 0.06724 | 0.2323             |\n    | B        | 375.21  | 0.1195             |\n    | RM       | 6.333   | 0.0411             |\n    | INDUS    | 3.24    | 0.0312             |\n    | CHAS     | 0.0     | 0.0                |\n    | NOX      | 0.46    | 0.0                |\n    | TAX      | 430.0   | -0.3794            |\n    | AGE      | 17.2    | -0.5127            |\n    | ZN       | 0.0     | -0.6143            |\n    | DIS      | 5.2146  | -1.0792            |\n    | RAD      | 4.0     | -1.0993            |\n    +----------+---------+--------------------+\n\n\nAlgorithm\n=========\nAlgorithm is based on ideas describe in paper *\"Explanations of model predictions\nwith live and breakDown packages\"* https://arxiv.org/abs/1804.01955\n\n\nDifference with pyBreakDown\n===========================\n``pyBreakDown`` is similar project, but there is key differences:\n\n* `mldissect` is maintained\n* Has tests and good code coverage.\n* Classification is working properly.\n* Multi class support.\n* Top down approach is not implemented.\n* Friendly license.\n\n\nRequirements\n------------\n\n* Python_ 3.6+\n* numpy_\n\n.. _Python: https://www.python.org\n.. _numpy: http://www.numpy.org/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fml-libs%2Fmldissect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fml-libs%2Fmldissect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fml-libs%2Fmldissect/lists"}