Metadata-Version: 2.4
Name: tice-ml
Version: 1.0.5
Summary: Model agnostic Time-Series Counterfactual Engine.
Author: Devansh Mishra
Author-email: devansh360@yahoo.com
License: MIT
Keywords: machine-learning explanation interpretability counterfactual
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: jsonschema
Requires-Dist: numpy
Requires-Dist: pandas==2.2.3
Requires-Dist: scikit-learn
Requires-Dist: tqdm
Requires-Dist: raiutils>=0.4.0
Provides-Extra: deeplearning
Requires-Dist: tensorflow<2.16.1,>=1.13.1; extra == "deeplearning"
Requires-Dist: torch; extra == "deeplearning"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

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])


