Skip to main content

SDK API to explain models, generate counterfactual examples, analyze causal effects and analyze errors in Machine Learning models.

Project description

Trustworthy AI Model Analysis SDK for Python

This package has been tested with Python 3.7, 3.8, 3.9 and 3.10

The Trustworthy AI Model Analysis SDK enables users to analyze their machine learning models in one API. Users will be able to analyze errors, explain the most important features, compute counterfactuals and run causal analysis using a single API.

Highlights of the package include:

  • explainer.add() explains the model
  • counterfactuals.add() computes counterfactuals
  • error_analysis.add() runs error analysis
  • causal.add() runs causal analysis

Supported scenarios, models and datasets

trustworthyai supports computation of Trustworthy AI insights for scikit-learn models that are ttained on pandas.DataFrame. The trustworthyai accept both models and pipelines as input as long as the model or pipeline implements a predict or predict_proba function that conforms to the scikit-learn convention. If not compatible, you can wrap your model's prediction function into a wrapper class that transforms the output into the format that is supported (predict or predict_proba of scikit-learn), and pass that wrapper class to modules in trustworthyai.

Currently, we support datasets having numerical and categorical features. The following table provides the scenarios supported for each of the four trustworthy AI insights:-

TAI insight Binary classification Multi-class classification Multilabel classification Regression Timeseries forecasting Categorical features Text features Image Features Recommender Systems Reinforcement Learning
Explainability Yes Yes No Yes No Yes No No No No
Error Analysis Yes Yes No Yes No Yes No No No No
Causal Analysis Yes No No Yes No Yes (max 5 features due to expensiveness) No No No No
Counterfactual Yes Yes No Yes No Yes No No No No

The source code can be found here: https://github.com/affectlog/trustworthy-ai-toolbox/tree/main/trustworthyai

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

trustworthyai-0.0.2.tar.gz (113.0 kB view details)

Uploaded Source

Built Distribution

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

trustworthyai-0.0.2-py3-none-any.whl (153.7 kB view details)

Uploaded Python 3

File details

Details for the file trustworthyai-0.0.2.tar.gz.

File metadata

  • Download URL: trustworthyai-0.0.2.tar.gz
  • Upload date:
  • Size: 113.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.10

File hashes

Hashes for trustworthyai-0.0.2.tar.gz
Algorithm Hash digest
SHA256 d5076443068f045f55b3dcb2e3e3839a69ee7f11b2bb5ef1faea0a4b7c0491a0
MD5 82a117682dda80c815f8438a969cbc66
BLAKE2b-256 5600cfd505e1a9fae67f8c000ec2df1a2ad9abe1a5f7f44de1b0a5d39c24ae99

See more details on using hashes here.

File details

Details for the file trustworthyai-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: trustworthyai-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 153.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.10

File hashes

Hashes for trustworthyai-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 47cc26521d791062a06ce8841fcd315f9b93704ac66ac2b99e79cdca73b0e6fa
MD5 26f7bbb69797b058b5f7765cfa0d29a6
BLAKE2b-256 66d2db224f0e3a658bdda33bec49c7996ad504d47984c5c946ce063c22dffb55

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