manic-xai


Namemanic-xai JSON
Version 1.0.81 PyPI version JSON
download
home_pagehttps://github.com/craigybaeb/MANIC
SummaryGenetic Algorithm for Generating Metacounterfactual Explanations
upload_time2023-08-15 00:14:35
maintainer
docs_urlNone
authorCraig Pirie
requires_python
license
keywords manic metacounterfactual counterfactual xai explanation aggregation disagreement agreement
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            \n# Manic: A Genetic Algorithm-based Metaheuristic Approach for Nature-Inspired Aggregation of Counterfactuals

## Table of Contents
- [Introduction](#introduction)
- [Installation](#installation)
- [Usage](#usage)
- [Docker Instructions](#docker-instructions)
- [Citation](#citation)
- [Author](#author)
- [Contact](#contact)
- [License](#license)

## Introduction

Manic is a Python package that provides a genetic algorithm-based metaheuristic approach for aggregating counterfactual explanations. It implements a nature-inspired optimization technique to generate counterfactuals that explain the disagreement between different explainers. The goal is to find counterfactual instances that are both diverse and informative to enhance the interpretability of machine learning models.

## Installation

To install Manic, use the following pip3 command:

```bash
pip3 install manic-xai
```

## Usage

You can use Manic in your Python code as follows:

```python
from manic import Manic

# Define your data_instance, base_counterfactuals, categorical_features, immutable_features, feature_ranges, data, and predict_fn

manic_instance = Manic(data_instance, base_counterfactuals, categorical_features, immutable_features, feature_ranges, data, predict_fn)

# Generate counterfactuals
counterfactuals = manic_instance.generate_counterfactuals()
```

## Docker Instructions

To run Manic using Docker, follow these steps:

1. Build the Docker image:

```bash
docker build -t manic .
```

2. Run the Docker container

```bash
docker run -v /path/to/your/data:/data -it manic python3 your_script.py
```

## Citation
If you use the Manic package in your research or work and find it helpful, we kindly request that you cite it using the following BibTeX entry:

```bibtex
@software{manic,
  author       = {Craig Pirie},
  title        = {Manic: A Genetic Algorithm-based Metaheuristic Approach for Nature-Inspired Aggregation of Counterfactuals},
  year         = {2023},
  publisher    = {GitHub},
  journal      = {GitHub repository},
  howpublished = {\url{https://github.com/your-username/manic}},
}
```

We appreciate your support and acknowledgment of our work.

## Contact
For any inquiries or collaborations, please contact Craig Pirie at c.pirie11@rgu.ac.uk.

## License
This project is licensed under the MIT License. See the LICENSE file for details.

## Contributions
Contributions to the Manic package are always welcome. If you find any issues or have ideas for improvements, please feel free to open an issue or submit a pull request on the GitHub repository. Together, we can make Manic better for everyone.

## Changelog
For updates and a history of changes to the Manic package, please refer to the Changelog.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/craigybaeb/MANIC",
    "name": "manic-xai",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "manic,metacounterfactual,counterfactual,xai,explanation,aggregation,disagreement,agreement",
    "author": "Craig Pirie",
    "author_email": "c.pirie11@rgu.ac.uk",
    "download_url": "https://files.pythonhosted.org/packages/85/34/0efedb9358ed7fa00edeed0ffadf37ffbaff8f4a9e62295248b69ce7a32a/manic-xai-1.0.81.tar.gz",
    "platform": null,
    "description": "\\n# Manic: A Genetic Algorithm-based Metaheuristic Approach for Nature-Inspired Aggregation of Counterfactuals\n\n## Table of Contents\n- [Introduction](#introduction)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Docker Instructions](#docker-instructions)\n- [Citation](#citation)\n- [Author](#author)\n- [Contact](#contact)\n- [License](#license)\n\n## Introduction\n\nManic is a Python package that provides a genetic algorithm-based metaheuristic approach for aggregating counterfactual explanations. It implements a nature-inspired optimization technique to generate counterfactuals that explain the disagreement between different explainers. The goal is to find counterfactual instances that are both diverse and informative to enhance the interpretability of machine learning models.\n\n## Installation\n\nTo install Manic, use the following pip3 command:\n\n```bash\npip3 install manic-xai\n```\n\n## Usage\n\nYou can use Manic in your Python code as follows:\n\n```python\nfrom manic import Manic\n\n# Define your data_instance, base_counterfactuals, categorical_features, immutable_features, feature_ranges, data, and predict_fn\n\nmanic_instance = Manic(data_instance, base_counterfactuals, categorical_features, immutable_features, feature_ranges, data, predict_fn)\n\n# Generate counterfactuals\ncounterfactuals = manic_instance.generate_counterfactuals()\n```\n\n## Docker Instructions\n\nTo run Manic using Docker, follow these steps:\n\n1. Build the Docker image:\n\n```bash\ndocker build -t manic .\n```\n\n2. Run the Docker container\n\n```bash\ndocker run -v /path/to/your/data:/data -it manic python3 your_script.py\n```\n\n## Citation\nIf you use the Manic package in your research or work and find it helpful, we kindly request that you cite it using the following BibTeX entry:\n\n```bibtex\n@software{manic,\n  author       = {Craig Pirie},\n  title        = {Manic: A Genetic Algorithm-based Metaheuristic Approach for Nature-Inspired Aggregation of Counterfactuals},\n  year         = {2023},\n  publisher    = {GitHub},\n  journal      = {GitHub repository},\n  howpublished = {\\url{https://github.com/your-username/manic}},\n}\n```\n\nWe appreciate your support and acknowledgment of our work.\n\n## Contact\nFor any inquiries or collaborations, please contact Craig Pirie at c.pirie11@rgu.ac.uk.\n\n## License\nThis project is licensed under the MIT License. See the LICENSE file for details.\n\n## Contributions\nContributions to the Manic package are always welcome. If you find any issues or have ideas for improvements, please feel free to open an issue or submit a pull request on the GitHub repository. Together, we can make Manic better for everyone.\n\n## Changelog\nFor updates and a history of changes to the Manic package, please refer to the Changelog.\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Genetic Algorithm for Generating Metacounterfactual Explanations",
    "version": "1.0.81",
    "project_urls": {
        "Homepage": "https://github.com/craigybaeb/MANIC"
    },
    "split_keywords": [
        "manic",
        "metacounterfactual",
        "counterfactual",
        "xai",
        "explanation",
        "aggregation",
        "disagreement",
        "agreement"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cff90b1776e66bdf4707442d9f4924027de03a55e8fb1498184db5db4a65df64",
                "md5": "8b551b78d676d2f037f9772c9fd8f3aa",
                "sha256": "519d3b0aa6c37e9f0caa4524d2c1a39da3a6e0dd72961796e5e3e344d443a455"
            },
            "downloads": -1,
            "filename": "manic_xai-1.0.81-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8b551b78d676d2f037f9772c9fd8f3aa",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 37541,
            "upload_time": "2023-08-15T00:14:33",
            "upload_time_iso_8601": "2023-08-15T00:14:33.932486Z",
            "url": "https://files.pythonhosted.org/packages/cf/f9/0b1776e66bdf4707442d9f4924027de03a55e8fb1498184db5db4a65df64/manic_xai-1.0.81-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "85340efedb9358ed7fa00edeed0ffadf37ffbaff8f4a9e62295248b69ce7a32a",
                "md5": "3dee71c3f779074cbe47ff9d5e3b3ed1",
                "sha256": "9be3ca05fc7cb3d3022da1423035264918cfe84808d13ea552593f9900b313dc"
            },
            "downloads": -1,
            "filename": "manic-xai-1.0.81.tar.gz",
            "has_sig": false,
            "md5_digest": "3dee71c3f779074cbe47ff9d5e3b3ed1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 24266,
            "upload_time": "2023-08-15T00:14:35",
            "upload_time_iso_8601": "2023-08-15T00:14:35.236397Z",
            "url": "https://files.pythonhosted.org/packages/85/34/0efedb9358ed7fa00edeed0ffadf37ffbaff8f4a9e62295248b69ce7a32a/manic-xai-1.0.81.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-15 00:14:35",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "craigybaeb",
    "github_project": "MANIC",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "manic-xai"
}
        
Elapsed time: 0.13036s