| Name | bellatrex JSON |
| Version |
0.2.2
JSON |
| download |
| home_page | https://github.com/Klest94/Bellatrex |
| Summary | A toolbox for Building Explanations through a LocaLly AccuraTe Rule EXtractor |
| upload_time | 2024-08-12 10:30:47 |
| maintainer | None |
| docs_url | None |
| author | Klest Dedja |
| requires_python | <4,>=3.9 |
| license | MIT |
| keywords |
|
| VCS |
 |
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
<a name="logo-anchor"></a>
<p align="center">
<img src="https://github.com/Klest94/Bellatrex/blob/main-dev/app/bellatrex-logo.png?raw=true" alt="Bellatrex Logo" width="60%"/>
</p>
# Welcome to Bellatrex!
Random Forest models can be difficult to interpret, and Bellatrex addresses this challenge by generating explanations that are easy to understand, and by providing insights into how the model arrived at its predictions. Bellatrex does so by Building Explanations through a LocalLy AccuraTe Rule EXtractor (hence the name: Bellatrex) for a given test instance, by extracting only a few, diverse rules. See [the published paper](https://ieeexplore.ieee.org/abstract/document/10105927) for more details. The code for reproducing its results is available in a different [GitHub branch](https://github.com/Klest94/Bellatrex/tree/archive/reproduce-Dedja2023).
To illustrate how Bellatrex works, let's consider an example: when a user provides a test instance to Bellatrex, the tool begins by 1) pre-selecting a subset of the rules used to make the prediction; it then creates 2) a vector representation of such rules and 3) projects them to a low-dimensional space; Bellatrex then 4) clusters such representations to pick a rule from each cluster to explain the instance prediction. One rule per cluster is shown to the end user through visually appealing plots, and the tool's GUI allows users to explore similar rules to those extracted.
<table>
<tr>
<td align="center">
<img src="https://github.com/Klest94/Bellatrex/blob/main-dev/app/illustration-Bellatrex.png?raw=true" alt="Bellatrex image" width="90%"/>
</td>
</tr>
<tr>
<td align="left">
<em>Overview of Bellatrex, starting from top left, proceeding clockwise, we reach the output with related explanations on the bottom left. </em>
</td>
</tr>
</table>
Another strength of Bellatrex lies in its ability to handle several prediction tasks within `scikit-learn` implementations of Random Forests. For instance, Bellatrex can generate explanations for binary classification and multi-label predictions tasks with `RandomForestClassifier`, as well as single- or multi-output regression tasks with `RandomForestRegressor`. Moreover, Bellatrex is compatible with scikit-survival's `RandomSurvivalForest`, allowing it to generate explanations for time-to-event predictions in the presence of right-censored data.
This repository contains:
- instructions to run Bellatrex on your machine
- an overview of the datasets used to test the effectiveness of the method
- access to such datasets, as they appear after the pre-processing step.
# Set-up
To install the standard version of Bellatrex, run:
```
pip install bellatrex
```
In case the previous step does not work, then the ``pip`` distribution is not working as expected so please [contact us](https://mail.google.com/mail/u/0/?fs=1&tf=cm&source=mailto&to=daneel.olivaw94@gmail.com), and in the meantime try with a manual [clone](https://github.com/Klest94/Bellatrex) from the repository.
## Enable Graphical User Interface
For an enhanced user experience that includes interactive plots, you can etiher pip install the following additional packages:
```
pip install dearpygui==1.6.2
pip install dearpygui-ext==0.9.5
```
Or install everything at once with:
```
pip install bellatrex[gui]
```
**Note:** When running Bellatrex with the GUI for multiple test samples, the program will generate an interactive window. The process may take a couple of seconds, and the the user has to click at least once within the generated window in order to activate the interactive mode. Once this is done, the user can explore the generated rules by clicking on the corresponding representation. To show the Bellatrex explanation for the next sample, close the interactive window and wait until Bellatrex generates the explanation for the new sample.
# Ready for the tutorial!
If you have downloaded the content of this folder and installed the packages successfully, you can dive into the [`tutorial.ipynb`](https://github.com/Klest94/Bellatrex/blob/main-dev/tutorial.ipynb) code and try Bellatrex yourself.
Raw data
{
"_id": null,
"home_page": "https://github.com/Klest94/Bellatrex",
"name": "bellatrex",
"maintainer": null,
"docs_url": null,
"requires_python": "<4,>=3.9",
"maintainer_email": null,
"keywords": null,
"author": "Klest Dedja",
"author_email": "daneel.olivaw94@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/68/a0/da71764c70857a258f66951c1824071a71b8c503dce436d6346016160b45/bellatrex-0.2.2.tar.gz",
"platform": null,
"description": "<a name=\"logo-anchor\"></a>\r\n<p align=\"center\">\r\n<img src=\"https://github.com/Klest94/Bellatrex/blob/main-dev/app/bellatrex-logo.png?raw=true\" alt=\"Bellatrex Logo\" width=\"60%\"/>\r\n</p>\r\n\r\n# Welcome to Bellatrex!\r\n\r\nRandom Forest models can be difficult to interpret, and Bellatrex addresses this challenge by generating explanations that are easy to understand, and by providing insights into how the model arrived at its predictions. Bellatrex does so by Building Explanations through a LocalLy AccuraTe Rule EXtractor (hence the name: Bellatrex) for a given test instance, by extracting only a few, diverse rules. See [the published paper](https://ieeexplore.ieee.org/abstract/document/10105927) for more details. The code for reproducing its results is available in a different [GitHub branch](https://github.com/Klest94/Bellatrex/tree/archive/reproduce-Dedja2023).\r\n\r\nTo illustrate how Bellatrex works, let's consider an example: when a user provides a test instance to Bellatrex, the tool begins by 1) pre-selecting a subset of the rules used to make the prediction; it then creates 2) a vector representation of such rules and 3) projects them to a low-dimensional space; Bellatrex then 4) clusters such representations to pick a rule from each cluster to explain the instance prediction. One rule per cluster is shown to the end user through visually appealing plots, and the tool's GUI allows users to explore similar rules to those extracted.\r\n\r\n<table>\r\n <tr>\r\n <td align=\"center\">\r\n <img src=\"https://github.com/Klest94/Bellatrex/blob/main-dev/app/illustration-Bellatrex.png?raw=true\" alt=\"Bellatrex image\" width=\"90%\"/>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td align=\"left\">\r\n <em>Overview of Bellatrex, starting from top left, proceeding clockwise, we reach the output with related explanations on the bottom left. </em>\r\n </td>\r\n </tr>\r\n</table>\r\n\r\n\r\nAnother strength of Bellatrex lies in its ability to handle several prediction tasks within `scikit-learn` implementations of Random Forests. For instance, Bellatrex can generate explanations for binary classification and multi-label predictions tasks with `RandomForestClassifier`, as well as single- or multi-output regression tasks with `RandomForestRegressor`. Moreover, Bellatrex is compatible with scikit-survival's `RandomSurvivalForest`, allowing it to generate explanations for time-to-event predictions in the presence of right-censored data.\r\n\r\n\r\nThis repository contains:\r\n- instructions to run Bellatrex on your machine\r\n- an overview of the datasets used to test the effectiveness of the method\r\n- access to such datasets, as they appear after the pre-processing step.\r\n\r\n# Set-up\r\n\r\nTo install the standard version of Bellatrex, run:\r\n\r\n```\r\npip install bellatrex\r\n```\r\n\r\nIn case the previous step does not work, then the ``pip`` distribution is not working as expected so please [contact us](https://mail.google.com/mail/u/0/?fs=1&tf=cm&source=mailto&to=daneel.olivaw94@gmail.com), and in the meantime try with a manual [clone](https://github.com/Klest94/Bellatrex) from the repository.\r\n\r\n\r\n## Enable Graphical User Interface\r\n\r\nFor an enhanced user experience that includes interactive plots, you can etiher pip install the following additional packages:\r\n```\r\npip install dearpygui==1.6.2\r\npip install dearpygui-ext==0.9.5\r\n```\r\nOr install everything at once with:\r\n\r\n```\r\npip install bellatrex[gui]\r\n```\r\n\r\n\r\n**Note:** When running Bellatrex with the GUI for multiple test samples, the program will generate an interactive window. The process may take a couple of seconds, and the the user has to click at least once within the generated window in order to activate the interactive mode. Once this is done, the user can explore the generated rules by clicking on the corresponding representation. To show the Bellatrex explanation for the next sample, close the interactive window and wait until Bellatrex generates the explanation for the new sample.\r\n\r\n# Ready for the tutorial!\r\n\r\nIf you have downloaded the content of this folder and installed the packages successfully, you can dive into the [`tutorial.ipynb`](https://github.com/Klest94/Bellatrex/blob/main-dev/tutorial.ipynb) code and try Bellatrex yourself.\r\n\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A toolbox for Building Explanations through a LocaLly AccuraTe Rule EXtractor",
"version": "0.2.2",
"project_urls": {
"Homepage": "https://github.com/Klest94/Bellatrex"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c60742c5347970d344c931f0333384f45930849a54a2828af8b0be323c450c3d",
"md5": "976557941b96a63a08f9d73722a9ee90",
"sha256": "6263e13dd8d08000ef89265ac895a717a92a15644b6d191e2b79c7410b2f4cd0"
},
"downloads": -1,
"filename": "bellatrex-0.2.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "976557941b96a63a08f9d73722a9ee90",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4,>=3.9",
"size": 121809,
"upload_time": "2024-08-12T10:30:45",
"upload_time_iso_8601": "2024-08-12T10:30:45.456011Z",
"url": "https://files.pythonhosted.org/packages/c6/07/42c5347970d344c931f0333384f45930849a54a2828af8b0be323c450c3d/bellatrex-0.2.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "68a0da71764c70857a258f66951c1824071a71b8c503dce436d6346016160b45",
"md5": "32069848aa5ce9a941817a896679282c",
"sha256": "0dab626011af53074e27dc95ebd537d588ba22efa634c8e0a6c9f64622c60fbe"
},
"downloads": -1,
"filename": "bellatrex-0.2.2.tar.gz",
"has_sig": false,
"md5_digest": "32069848aa5ce9a941817a896679282c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4,>=3.9",
"size": 119216,
"upload_time": "2024-08-12T10:30:47",
"upload_time_iso_8601": "2024-08-12T10:30:47.546754Z",
"url": "https://files.pythonhosted.org/packages/68/a0/da71764c70857a258f66951c1824071a71b8c503dce436d6346016160b45/bellatrex-0.2.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-12 10:30:47",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Klest94",
"github_project": "Bellatrex",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "bellatrex"
}