5eed28f134
* Added info about required packages * Update responsibleaidashboard-question-answering-model-debugging.ipynb * show example prediction * Update responsibleaidashboard-question-answering-model-debugging.ipynb * add genai metrics Signed-off-by: Kartik Choudhary <kartikchoudh@umass.edu> * Add genai task type Signed-off-by: Kartik Choudhary <kartikchoudh@umass.edu> * add genai task type (#2494) * Added info about required packages * Update responsibleaidashboard-question-answering-model-debugging.ipynb * show example prediction * Update responsibleaidashboard-question-answering-model-debugging.ipynb * add genai metrics Signed-off-by: Kartik Choudhary <kartikchoudh@umass.edu> * Add genai task type Signed-off-by: Kartik Choudhary <kartikchoudh@umass.edu> --------- Signed-off-by: Kartik Choudhary <kartikchoudh@umass.edu> * remove target_column requirement for genai tasks Signed-off-by: Kartik Choudhary <kartikchoudh@umass.edu> * genai dev demo notebook Signed-off-by: Kartik Choudhary <kartikchoudh@umass.edu> * Added info about required packages * Update responsibleaidashboard-question-answering-model-debugging.ipynb * add genai metrics Signed-off-by: Kartik Choudhary <kartikchoudh@umass.edu> * Add genai task type Signed-off-by: Kartik Choudhary <kartikchoudh@umass.edu> * remove target_column requirement for genai tasks (#2501) Signed-off-by: Kartik Choudhary <kartikchoudh@umass.edu> * add demo notebook (#2502) * remove target_column requirement for genai tasks Signed-off-by: Kartik Choudhary <kartikchoudh@umass.edu> * genai dev demo notebook Signed-off-by: Kartik Choudhary <kartikchoudh@umass.edu> --------- Signed-off-by: Kartik Choudhary <kartikchoudh@umass.edu> * added generative text explainer for OpenAI models Signed-off-by: Mohsin Shah <websitemohsinshah@gmail.com> * update UI to support genai task for RAI text dashboard (#2504) * generative ai explanations for all rows of dataset Signed-off-by: Mohsin Shah <websitemohsinshah@gmail.com> * move metrics to utils submodule Signed-off-by: Kartik Choudhary <kartikchoudh@umass.edu> * error analysis support for genai text Signed-off-by: Kartik Choudhary <kartikchoudh@umass.edu> * error analysis support (#2510) * move metrics to utils submodule Signed-off-by: Kartik Choudhary <kartikchoudh@umass.edu> * error analysis support for genai text Signed-off-by: Kartik Choudhary <kartikchoudh@umass.edu> --------- Signed-off-by: Kartik Choudhary <kartikchoudh@umass.edu> * fix some linting issues Signed-off-by: Kartik Choudhary <kartikchoudh@umass.edu> * more linting fixes Signed-off-by: Kartik Choudhary <kartikchoudh@umass.edu> * Kartikch/add genai metrics (#2513) * update UI to support genai task for RAI text dashboard (#2504) (#2508) * move metrics to utils submodule Signed-off-by: Kartik Choudhary <kartikchoudh@umass.edu> * error analysis support for genai text Signed-off-by: Kartik Choudhary <kartikchoudh@umass.edu> * fix some linting issues Signed-off-by: Kartik Choudhary <kartikchoudh@umass.edu> * more linting fixes Signed-off-by: Kartik Choudhary <kartikchoudh@umass.edu> --------- Signed-off-by: Kartik Choudhary <kartikchoudh@umass.edu> Co-authored-by: Ilya Matiach <ilmat@microsoft.com> * add genai metrics endpoint in UI for model overview metrics (#2517) * Add socketio event handler for generative text metrics Signed-off-by: Kartik Choudhary <kartikchoudh@umass.edu> * add converter from genai task to model type, fix endpoint results (#2518) * Add support for evaluation model in RAITextInsights Signed-off-by: Kartik Choudhary <kartikchoudh@umass.edu> * fix linting issues Signed-off-by: Kartik Choudhary <kartikchoudh@umass.edu> * Remove commented out code for generative text tasks Signed-off-by: Kartik Choudhary <kartikchoudh@umass.edu> * update genai metric compute function for new ml wrapper interface Signed-off-by: Kartik Choudhary <kartikchoudh@umass.edu> * add output examples in genai metric prompts Signed-off-by: Kartik Choudhary <kartikchoudh@umass.edu> * fix merge errors Signed-off-by: Kartik Choudhary <kartikchoudh@umass.edu> * add methods and constants for genai task type Signed-off-by: Kartik Choudhary <kartikchoudh@umass.edu> * add missing files for genai metrics Signed-off-by: Kartik Choudhary <kartikchoudh@umass.edu> * update copyright information Signed-off-by: Kartik Choudhary <kartikchoudh@umass.edu> * Fix target_column assignment in ErrorAnalysisManager Signed-off-by: Kartik Choudhary <kartikchoudh@umass.edu> * Remove duplicate import and refactor if condition in RAITextInsights class Signed-off-by: Kartik Choudhary <kartikchoudh@umass.edu> * Refactor rating examples in genai_metrics scripts Signed-off-by: Kartik Choudhary <kartikchoudh@umass.edu> * Refactor debug_ml method to handle missing text_cols attribute Signed-off-by: Kartik Choudhary <kartikchoudh@umass.edu> * Remove unnecessary code for generative text models Signed-off-by: Kartik Choudhary <kartikchoudh@umass.edu> * Rearranged import statements in _compute.py Signed-off-by: Kartik Choudhary <kartikchoudh@umass.edu> --------- Signed-off-by: Kartik Choudhary <kartikchoudh@umass.edu> Signed-off-by: Mohsin Shah <websitemohsinshah@gmail.com> Co-authored-by: Mohsin Shah <websitemohsinshah@gmail.com> Co-authored-by: Ilya Matiach <ilmat@microsoft.com> Co-authored-by: Mohsin Shah <106512207+mohsinposts@users.noreply.github.com> |
||
---|---|---|
.. | ||
responsibleai | ||
tests | ||
.gitignore | ||
LICENSE | ||
MANIFEST.in | ||
README.md | ||
requirements-dev.txt | ||
requirements.txt | ||
setup.py |
README.md
Responsible AI Model Analysis SDK for Python
This package has been tested with Python 3.7, 3.8, 3.9 and 3.10
The Responsible 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 modelcounterfactuals.add()
computes counterfactualserror_analysis.add()
runs error analysiscausal.add()
runs causal analysis
Supported scenarios, models and datasets
responsibleai
supports computation of Responsible AI insights for scikit-learn
models that are trained on pandas.DataFrame
. The responsibleai
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 responsibleai
.
Currently, we support datasets having numerical and categorical features. The following table provides the scenarios supported for each of the four responsible AI insights:-
RAI 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/microsoft/responsible-ai-toolbox/tree/main/responsibleai