distance-explainer


Namedistance-explainer JSON
Version 0.4.0 PyPI version JSON
download
home_pagehttps://github.com/dianna-ai/distance_explainer
SummaryXAI method to explain distances in embedded spaces
upload_time2024-11-05 12:24:06
maintainerNone
docs_urlNone
authorChristiaan Meijer
requires_python>=3.9
licenseNone
keywords xai embedded spaces
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10018768.svg)](https://doi.org/10.5281/zenodo.10018768) [![workflow pypi badge](https://img.shields.io/pypi/v/distance_explainer.svg?colorB=blue)](https://pypi.python.org/project/distance_explainer/)

# `distance_explainer`

XAI method to explain distances in embedded spaces.

![overview schema](https://github.com/user-attachments/assets/bbd5a79c-c50b-47a2-89fc-d8ed3053c845)


## Installation

To install distance_explainer from GitHub repository, do:

```console
git clone git@github.com:dianna-ai/distance_explainer.git
cd distance_explainer
python3 -m pip install .
```
## How to use

See our [tutorial](tutorial.ipynb) how to use this package.
In short:
```python
image1 = np.random.random((100, 100, 3))
image2 = np.random.random((100, 100, 3))

image2_embedded = model(image2)
explainer = DistanceExplainer(axis_labels={2: 'channels'})
attribution_map = explainer.explain_image_distance(model, image1, image2_embedded)
```
## Contributing

If you want to contribute to the development of distance_explainer,
have a look at the [contribution guidelines](docs/CONTRIBUTING.md).

## Credits

This package was created with [Cookiecutter](https://github.com/audreyr/cookiecutter) and the [NLeSC/python-template](https://github.com/NLeSC/python-template).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/dianna-ai/distance_explainer",
    "name": "distance-explainer",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "XAI, embedded spaces",
    "author": "Christiaan Meijer",
    "author_email": "c.meijer@esciencecenter.nl",
    "download_url": "https://files.pythonhosted.org/packages/55/39/4447603bbf70be426360a2de405d1d7ada3f3bf8753d10c44ea87edc184f/distance_explainer-0.4.0.tar.gz",
    "platform": null,
    "description": "[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10018768.svg)](https://doi.org/10.5281/zenodo.10018768) [![workflow pypi badge](https://img.shields.io/pypi/v/distance_explainer.svg?colorB=blue)](https://pypi.python.org/project/distance_explainer/)\n\n# `distance_explainer`\n\nXAI method to explain distances in embedded spaces.\n\n![overview schema](https://github.com/user-attachments/assets/bbd5a79c-c50b-47a2-89fc-d8ed3053c845)\n\n\n## Installation\n\nTo install distance_explainer from GitHub repository, do:\n\n```console\ngit clone git@github.com:dianna-ai/distance_explainer.git\ncd distance_explainer\npython3 -m pip install .\n```\n## How to use\n\nSee our [tutorial](tutorial.ipynb) how to use this package.\nIn short:\n```python\nimage1 = np.random.random((100, 100, 3))\nimage2 = np.random.random((100, 100, 3))\n\nimage2_embedded = model(image2)\nexplainer = DistanceExplainer(axis_labels={2: 'channels'})\nattribution_map = explainer.explain_image_distance(model, image1, image2_embedded)\n```\n## Contributing\n\nIf you want to contribute to the development of distance_explainer,\nhave a look at the [contribution guidelines](docs/CONTRIBUTING.md).\n\n## Credits\n\nThis package was created with [Cookiecutter](https://github.com/audreyr/cookiecutter) and the [NLeSC/python-template](https://github.com/NLeSC/python-template).\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "XAI method to explain distances in embedded spaces",
    "version": "0.4.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/dianna-ai/distance_explainer/issues",
        "Homepage": "https://github.com/dianna-ai/distance_explainer"
    },
    "split_keywords": [
        "xai",
        " embedded spaces"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "16945ed8a7c8f99c62fb54e52160bc45687ea859400dc33be8efe7c559a6d7db",
                "md5": "6126bd2429f89546588d904330a14849",
                "sha256": "5925a51994d9c137380fcab658b8de4fce139480f9c3f43793b1be68453f09f5"
            },
            "downloads": -1,
            "filename": "distance_explainer-0.4.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6126bd2429f89546588d904330a14849",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 9252,
            "upload_time": "2024-11-05T12:24:05",
            "upload_time_iso_8601": "2024-11-05T12:24:05.811538Z",
            "url": "https://files.pythonhosted.org/packages/16/94/5ed8a7c8f99c62fb54e52160bc45687ea859400dc33be8efe7c559a6d7db/distance_explainer-0.4.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "55394447603bbf70be426360a2de405d1d7ada3f3bf8753d10c44ea87edc184f",
                "md5": "d89492e3f36aa8627eeee2222c515a39",
                "sha256": "10a0a76c8498556b4b68bd32e6347a5dba84cf5fc075f488eb86d123b6070bd1"
            },
            "downloads": -1,
            "filename": "distance_explainer-0.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "d89492e3f36aa8627eeee2222c515a39",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 11109,
            "upload_time": "2024-11-05T12:24:06",
            "upload_time_iso_8601": "2024-11-05T12:24:06.978391Z",
            "url": "https://files.pythonhosted.org/packages/55/39/4447603bbf70be426360a2de405d1d7ada3f3bf8753d10c44ea87edc184f/distance_explainer-0.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-05 12:24:06",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "dianna-ai",
    "github_project": "distance_explainer",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "distance-explainer"
}
        
Elapsed time: 0.87512s