TiCE
====
**TiCE** is an extension of the `DiCE <https://github.com/interpretml/DiCE>`_ (Diverse Counterfactual Explanations) library, designed to provide counterfactual explanations with additional functionality and improvements.
This library was developed as part of my master's thesis at TU Eindhoven while working at ASML.
This package is especially tailored for regression and time series applications, while maintaining compatibility with DiCE's original design principles.
Acknowledgement
---------------
This work builds upon the excellent `DiCE <https://github.com/interpretml/DiCE>`_ library created by the team at **InterpretML**.
I acknowledge and thank them for their contributions to the field of explainable AI.
The improvements in **TiCE** extend DiCE's capabilities while staying true to its core mission: generating actionable and diverse counterfactual explanations.
Improvements in TiCE
--------------------
Compared to the original DiCE implementation, **TiCE** introduces the following enhancements:
- **Support for regression tasks**: Generate counterfactuals not only for classification but also for regression settings with a continious target variable.
- **Time series compatibility**: Adapted internal structures to handle sequential data, enabling counterfactual explanations for time-dependent models.
- **Improved data interface**: More flexible handling of continuous, categorical, and temporal features in heterogeneous datasets.
- **Advanced Visualization**: Dedicated visualization utilities tailored to time-series explanations are added. These visualization tools
transform hundreds of numeric scores into digestible figures, making it far easier for domain experts and
stakeholders to interpret model explanations and counterfactual suggestion
Installation
------------
You can install **TiCE** directly from PyPI::
pip install tice
Usage
-----
The usage of **TiCE** follows the same structure as DiCE with minor adjustments::
import TiCE
tice_exp = (model, data_interface)
counterfactuals = tice_exp.generate_counterfactuals(query_instance,
total_CFs=5,
desired_range=[value_min, value_max])
Raw data
{
"_id": null,
"home_page": null,
"name": "tice-ml",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "machine-learning explanation interpretability counterfactual",
"author": "Devansh Mishra",
"author_email": "devansh360@yahoo.com",
"download_url": "https://files.pythonhosted.org/packages/4e/c1/c246d628bf21dfab3aadbd17da7f324682cff215baaab497f34932a73b3f/tice_ml-1.0.5.tar.gz",
"platform": null,
"description": "TiCE\r\n====\r\n\r\n**TiCE** is an extension of the `DiCE <https://github.com/interpretml/DiCE>`_ (Diverse Counterfactual Explanations) library, designed to provide counterfactual explanations with additional functionality and improvements. \r\nThis library was developed as part of my master's thesis at TU Eindhoven while working at ASML. \r\n\r\nThis package is especially tailored for regression and time series applications, while maintaining compatibility with DiCE's original design principles.\r\n\r\nAcknowledgement\r\n---------------\r\n\r\nThis work builds upon the excellent `DiCE <https://github.com/interpretml/DiCE>`_ library created by the team at **InterpretML**. \r\nI acknowledge and thank them for their contributions to the field of explainable AI. \r\n\r\nThe improvements in **TiCE** extend DiCE's capabilities while staying true to its core mission: generating actionable and diverse counterfactual explanations.\r\n\r\nImprovements in TiCE\r\n--------------------\r\n\r\nCompared to the original DiCE implementation, **TiCE** introduces the following enhancements:\r\n\r\n- **Support for regression tasks**: Generate counterfactuals not only for classification but also for regression settings with a continious target variable.\r\n- **Time series compatibility**: Adapted internal structures to handle sequential data, enabling counterfactual explanations for time-dependent models.\r\n- **Improved data interface**: More flexible handling of continuous, categorical, and temporal features in heterogeneous datasets.\r\n- **Advanced Visualization**: Dedicated visualization utilities tailored to time-series explanations are added. These visualization tools\r\ntransform hundreds of numeric scores into digestible figures, making it far easier for domain experts and\r\nstakeholders to interpret model explanations and counterfactual suggestion\r\n\r\n\r\nInstallation\r\n------------\r\n\r\nYou can install **TiCE** directly from PyPI::\r\n\r\n pip install tice\r\n\r\nUsage\r\n-----\r\n\r\nThe usage of **TiCE** follows the same structure as DiCE with minor adjustments::\r\n\r\n import TiCE\r\n\r\n tice_exp = (model, data_interface)\r\n counterfactuals = tice_exp.generate_counterfactuals(query_instance,\r\n total_CFs=5,\r\n desired_range=[value_min, value_max])\r\n\r\n\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Model agnostic Time-Series Counterfactual Engine.",
"version": "1.0.5",
"project_urls": null,
"split_keywords": [
"machine-learning",
"explanation",
"interpretability",
"counterfactual"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "64f021d81fb20f2806df18d62f581984729dea1753670565099e5404edac9679",
"md5": "32c7607138baab547d63edf39ffbb88c",
"sha256": "cdde711379b610f078d7bd93036eeb4340de598376e36b2ed9581c7ddccddaf0"
},
"downloads": -1,
"filename": "tice_ml-1.0.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "32c7607138baab547d63edf39ffbb88c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 2523890,
"upload_time": "2025-08-25T16:46:54",
"upload_time_iso_8601": "2025-08-25T16:46:54.131049Z",
"url": "https://files.pythonhosted.org/packages/64/f0/21d81fb20f2806df18d62f581984729dea1753670565099e5404edac9679/tice_ml-1.0.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "4ec1c246d628bf21dfab3aadbd17da7f324682cff215baaab497f34932a73b3f",
"md5": "42afb3702f93ed95e80446bf2f197622",
"sha256": "2b2b41d004aa814a6ce5f3cc7756021188a7fa1842d7e2068a80d9a24a48da9f"
},
"downloads": -1,
"filename": "tice_ml-1.0.5.tar.gz",
"has_sig": false,
"md5_digest": "42afb3702f93ed95e80446bf2f197622",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 15016601,
"upload_time": "2025-08-25T16:46:56",
"upload_time_iso_8601": "2025-08-25T16:46:56.575761Z",
"url": "https://files.pythonhosted.org/packages/4e/c1/c246d628bf21dfab3aadbd17da7f324682cff215baaab497f34932a73b3f/tice_ml-1.0.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-25 16:46:56",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "tice-ml"
}