Skip to main content

Model agnostic Time-Series Counterfactual Engine.

Project description

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

dice_exp = TiCE.Dice(model, data_interface) counterfactuals = dice_exp.generate_counterfactuals(query_instance, total_CFs=5, desired_range=[value_min, value_max])

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tice_ml-1.0.4.tar.gz (15.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tice_ml-1.0.4-py3-none-any.whl (2.5 MB view details)

Uploaded Python 3

File details

Details for the file tice_ml-1.0.4.tar.gz.

File metadata

  • Download URL: tice_ml-1.0.4.tar.gz
  • Upload date:
  • Size: 15.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for tice_ml-1.0.4.tar.gz
Algorithm Hash digest
SHA256 d70e5c2f33fb493197b3498bbd6b98b35dc5b5e21a20b9e928248af2edd3402a
MD5 4b5ba432544a02895c6494b7de636b5f
BLAKE2b-256 88a25db82a756027d12e020dbdff111c1c1a0cd0c8f87136dbc56ce10446b611

See more details on using hashes here.

File details

Details for the file tice_ml-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: tice_ml-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for tice_ml-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6c0a0087a2e15ec6b76e70a43a2d950dd9abc906ce7f952315c748a6c5353f3c
MD5 5f12c35c4a68a053371a702b065c73fb
BLAKE2b-256 af79e73922b8ef583e481a0c30bf6cf65afa531b9d3b32ce257f23007dd83b9c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page