DiCE
An open-source Python library under the MIT license that explains model predictions with alternative inputs. Works with scikit-learn, TensorFlow and PyTorch.

DiCE is an open-source Python library that finds changes to an input that would make a machine learning model produce a different result. It's for model developers and researchers who need to explain individual predictions or examine a model's dependence on particular features. It generates several alternatives, so people can compare different routes to the desired prediction.
For a loan rejection, for example, it can identify changes to an applicant's profile that would lead the model to approve the application. These examples describe the model's behavior; they don't guarantee that a suggested change is practical. DiCE lets you keep certain features fixed, limit values to acceptable ranges and give harder-to-change features greater weight. You can also balance how different the alternatives are against how close they stay to the original input.
DiCE works with scikit-learn, TensorFlow and PyTorch models, including binary and multiclass classifiers and regressors. It supports pretrained models without requiring their original training records. Feature ranges and category values can provide the data context instead, which is useful when access to sensitive records is restricted.
Its search methods include approaches that work without access to model internals, plus gradient-based methods for differentiable models. Results appear in tables that show the changed features and can be saved as CSV files. DiCE also estimates feature importance for individual predictions and across inputs. The library uses the MIT license.