A game theoretic approach to explain the output of any machine learning model.

Overview


Binder Documentation Status

SHAP (SHapley Additive exPlanations) is a game theoretic approach to explain the output of any machine learning model. It connects optimal credit allocation with local explanations using the classic Shapley values from game theory and their related extensions (see papers for details and citations).

Install

SHAP can be installed from either PyPI or conda-forge:

pip install shap
or
conda install -c conda-forge shap

Tree ensemble example (XGBoost/LightGBM/CatBoost/scikit-learn/pyspark models)

While SHAP can explain the output of any machine learning model, we have developed a high-speed exact algorithm for tree ensemble methods (see our Nature MI paper). Fast C++ implementations are supported for XGBoost, LightGBM, CatBoost, scikit-learn and pyspark tree models:

import xgboost
import shap

# train an XGBoost model
X, y = shap.datasets.boston()
model = xgboost.XGBRegressor().fit(X, y)

# explain the model's predictions using SHAP
# (same syntax works for LightGBM, CatBoost, scikit-learn, transformers, Spark, etc.)
explainer = shap.Explainer(model)
shap_values = explainer(X)

# visualize the first prediction's explanation
shap.plots.waterfall(shap_values[0])

The above explanation shows features each contributing to push the model output from the base value (the average model output over the training dataset we passed) to the model output. Features pushing the prediction higher are shown in red, those pushing the prediction lower are in blue. Another way to visualize the same explanation is to use a force plot (these are introduced in our Nature BME paper):

# visualize the first prediction's explanation with a force plot
shap.plots.force(shap_values[0])

If we take many force plot explanations such as the one shown above, rotate them 90 degrees, and then stack them horizontally, we can see explanations for an entire dataset (in the notebook this plot is interactive):

# visualize all the training set predictions
shap.plots.force(shap_values)

To understand how a single feature effects the output of the model we can plot the SHAP value of that feature vs. the value of the feature for all the examples in a dataset. Since SHAP values represent a feature's responsibility for a change in the model output, the plot below represents the change in predicted house price as RM (the average number of rooms per house in an area) changes. Vertical dispersion at a single value of RM represents interaction effects with other features. To help reveal these interactions we can color by another feature. If we pass the whole explanation tensor to the color argument the scatter plot will pick the best feature to color by. In this case it picks RAD (index of accessibility to radial highways) since that highlights that the average number of rooms per house has less impact on home price for areas with a high RAD value.

# create a dependence scatter plot to show the effect of a single feature across the whole dataset
shap.plots.scatter(shap_values[:,"RM"], color=shap_values)

To get an overview of which features are most important for a model we can plot the SHAP values of every feature for every sample. The plot below sorts features by the sum of SHAP value magnitudes over all samples, and uses SHAP values to show the distribution of the impacts each feature has on the model output. The color represents the feature value (red high, blue low). This reveals for example that a high LSTAT (% lower status of the population) lowers the predicted home price.

# summarize the effects of all the features
shap.plots.beeswarm(shap_values)

We can also just take the mean absolute value of the SHAP values for each feature to get a standard bar plot (produces stacked bars for multi-class outputs):

shap.plots.bar(shap_values)

Natural language example (transformers)

SHAP has specific support for natural language models like those in the Hugging Face transformers library. By adding coalitional rules to traditional Shapley values we can form games that explain large modern NLP model using very few function evaluations. Using this functionality is as simple as passing a supported transformers pipeline to SHAP:

import transformers
import shap

# load a transformers pipeline model
model = transformers.pipeline('sentiment-analysis', return_all_scores=True)

# explain the model on two sample inputs
explainer = shap.Explainer(model) 
shap_values = explainer(["What a great movie! ...if you have no taste."])

# visualize the first prediction's explanation for the POSITIVE output class
shap.plots.text(shap_values[0, :, "POSITIVE"])

Deep learning example with DeepExplainer (TensorFlow/Keras models)

Deep SHAP is a high-speed approximation algorithm for SHAP values in deep learning models that builds on a connection with DeepLIFT described in the SHAP NIPS paper. The implementation here differs from the original DeepLIFT by using a distribution of background samples instead of a single reference value, and using Shapley equations to linearize components such as max, softmax, products, divisions, etc. Note that some of these enhancements have also been since integrated into DeepLIFT. TensorFlow models and Keras models using the TensorFlow backend are supported (there is also preliminary support for PyTorch):

# ...include code from https://github.com/keras-team/keras/blob/master/examples/mnist_cnn.py

import shap
import numpy as np

# select a set of background examples to take an expectation over
background = x_train[np.random.choice(x_train.shape[0], 100, replace=False)]

# explain predictions of the model on four images
e = shap.DeepExplainer(model, background)
# ...or pass tensors directly
# e = shap.DeepExplainer((model.layers[0].input, model.layers[-1].output), background)
shap_values = e.shap_values(x_test[1:5])

# plot the feature attributions
shap.image_plot(shap_values, -x_test[1:5])

The plot above explains ten outputs (digits 0-9) for four different images. Red pixels increase the model's output while blue pixels decrease the output. The input images are shown on the left, and as nearly transparent grayscale backings behind each of the explanations. The sum of the SHAP values equals the difference between the expected model output (averaged over the background dataset) and the current model output. Note that for the 'zero' image the blank middle is important, while for the 'four' image the lack of a connection on top makes it a four instead of a nine.

Deep learning example with GradientExplainer (TensorFlow/Keras/PyTorch models)

Expected gradients combines ideas from Integrated Gradients, SHAP, and SmoothGrad into a single expected value equation. This allows an entire dataset to be used as the background distribution (as opposed to a single reference value) and allows local smoothing. If we approximate the model with a linear function between each background data sample and the current input to be explained, and we assume the input features are independent then expected gradients will compute approximate SHAP values. In the example below we have explained how the 7th intermediate layer of the VGG16 ImageNet model impacts the output probabilities.

from keras.applications.vgg16 import VGG16
from keras.applications.vgg16 import preprocess_input
import keras.backend as K
import numpy as np
import json
import shap

# load pre-trained model and choose two images to explain
model = VGG16(weights='imagenet', include_top=True)
X,y = shap.datasets.imagenet50()
to_explain = X[[39,41]]

# load the ImageNet class names
url = "https://s3.amazonaws.com/deep-learning-models/image-models/imagenet_class_index.json"
fname = shap.datasets.cache(url)
with open(fname) as f:
    class_names = json.load(f)

# explain how the input to the 7th layer of the model explains the top two classes
def map2layer(x, layer):
    feed_dict = dict(zip([model.layers[0].input], [preprocess_input(x.copy())]))
    return K.get_session().run(model.layers[layer].input, feed_dict)
e = shap.GradientExplainer(
    (model.layers[7].input, model.layers[-1].output),
    map2layer(X, 7),
    local_smoothing=0 # std dev of smoothing noise
)
shap_values,indexes = e.shap_values(map2layer(to_explain, 7), ranked_outputs=2)

# get the names for the classes
index_names = np.vectorize(lambda x: class_names[str(x)][1])(indexes)

# plot the explanations
shap.image_plot(shap_values, to_explain, index_names)

Predictions for two input images are explained in the plot above. Red pixels represent positive SHAP values that increase the probability of the class, while blue pixels represent negative SHAP values the reduce the probability of the class. By using ranked_outputs=2 we explain only the two most likely classes for each input (this spares us from explaining all 1,000 classes).

Model agnostic example with KernelExplainer (explains any function)

Kernel SHAP uses a specially-weighted local linear regression to estimate SHAP values for any model. Below is a simple example for explaining a multi-class SVM on the classic iris dataset.

import sklearn
import shap
from sklearn.model_selection import train_test_split

# print the JS visualization code to the notebook
shap.initjs()

# train a SVM classifier
X_train,X_test,Y_train,Y_test = train_test_split(*shap.datasets.iris(), test_size=0.2, random_state=0)
svm = sklearn.svm.SVC(kernel='rbf', probability=True)
svm.fit(X_train, Y_train)

# use Kernel SHAP to explain test set predictions
explainer = shap.KernelExplainer(svm.predict_proba, X_train, link="logit")
shap_values = explainer.shap_values(X_test, nsamples=100)

# plot the SHAP values for the Setosa output of the first instance
shap.force_plot(explainer.expected_value[0], shap_values[0][0,:], X_test.iloc[0,:], link="logit")

The above explanation shows four features each contributing to push the model output from the base value (the average model output over the training dataset we passed) towards zero. If there were any features pushing the class label higher they would be shown in red.

If we take many explanations such as the one shown above, rotate them 90 degrees, and then stack them horizontally, we can see explanations for an entire dataset. This is exactly what we do below for all the examples in the iris test set:

# plot the SHAP values for the Setosa output of all instances
shap.force_plot(explainer.expected_value[0], shap_values[0], X_test, link="logit")

SHAP Interaction Values

SHAP interaction values are a generalization of SHAP values to higher order interactions. Fast exact computation of pairwise interactions are implemented for tree models with shap.TreeExplainer(model).shap_interaction_values(X). This returns a matrix for every prediction, where the main effects are on the diagonal and the interaction effects are off-diagonal. These values often reveal interesting hidden relationships, such as how the increased risk of death peaks for men at age 60 (see the NHANES notebook for details):

Sample notebooks

The notebooks below demonstrate different use cases for SHAP. Look inside the notebooks directory of the repository if you want to try playing with the original notebooks yourself.

TreeExplainer

An implementation of Tree SHAP, a fast and exact algorithm to compute SHAP values for trees and ensembles of trees.

DeepExplainer

An implementation of Deep SHAP, a faster (but only approximate) algorithm to compute SHAP values for deep learning models that is based on connections between SHAP and the DeepLIFT algorithm.

GradientExplainer

An implementation of expected gradients to approximate SHAP values for deep learning models. It is based on connections between SHAP and the Integrated Gradients algorithm. GradientExplainer is slower than DeepExplainer and makes different approximation assumptions.

LinearExplainer

For a linear model with independent features we can analytically compute the exact SHAP values. We can also account for feature correlation if we are willing to estimate the feature covaraince matrix. LinearExplainer supports both of these options.

KernelExplainer

An implementation of Kernel SHAP, a model agnostic method to estimate SHAP values for any model. Because it makes not assumptions about the model type, KernelExplainer is slower than the other model type specific algorithms.

  • Census income classification with scikit-learn - Using the standard adult census income dataset, this notebook trains a k-nearest neighbors classifier using scikit-learn and then explains predictions using shap.

  • ImageNet VGG16 Model with Keras - Explain the classic VGG16 convolutional nerual network's predictions for an image. This works by applying the model agnostic Kernel SHAP method to a super-pixel segmented image.

  • Iris classification - A basic demonstration using the popular iris species dataset. It explains predictions from six different models in scikit-learn using shap.

Documentation notebooks

These notebooks comprehensively demonstrate how to use specific functions and objects.

Methods Unified by SHAP

  1. LIME: Ribeiro, Marco Tulio, Sameer Singh, and Carlos Guestrin. "Why should i trust you?: Explaining the predictions of any classifier." Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. ACM, 2016.

  2. Shapley sampling values: Strumbelj, Erik, and Igor Kononenko. "Explaining prediction models and individual predictions with feature contributions." Knowledge and information systems 41.3 (2014): 647-665.

  3. DeepLIFT: Shrikumar, Avanti, Peyton Greenside, and Anshul Kundaje. "Learning important features through propagating activation differences." arXiv preprint arXiv:1704.02685 (2017).

  4. QII: Datta, Anupam, Shayak Sen, and Yair Zick. "Algorithmic transparency via quantitative input influence: Theory and experiments with learning systems." Security and Privacy (SP), 2016 IEEE Symposium on. IEEE, 2016.

  5. Layer-wise relevance propagation: Bach, Sebastian, et al. "On pixel-wise explanations for non-linear classifier decisions by layer-wise relevance propagation." PloS one 10.7 (2015): e0130140.

  6. Shapley regression values: Lipovetsky, Stan, and Michael Conklin. "Analysis of regression in game theory approach." Applied Stochastic Models in Business and Industry 17.4 (2001): 319-330.

  7. Tree interpreter: Saabas, Ando. Interpreting random forests. http://blog.datadive.net/interpreting-random-forests/

Citations

The algorithms and visualizations used in this package came primarily out of research in Su-In Lee's lab at the University of Washington, and Microsoft Research. If you use SHAP in your research we would appreciate a citation to the appropriate paper(s):

Issues
  • Output value in binary classification task is outside [0, 1] range

    Output value in binary classification task is outside [0, 1] range

    Hi @slundberg,

    I've been playing with a binary classification task using XGBoost and I noticed an unexpected (for me at least) behaviour. I replicated it using the adult dataset you're providing.

    So, after training a binary classfication XGBoost model and plotting the SHAP values for a case, I'm getting the following:

    image

    Both the base value and the output value are outside the [0, 1] range. Is this the expected bahavior? If so, how can someone interpret this?

    opened by asstergi 39
  • TreeExplainer with xgboost model trained on GPU dies.

    TreeExplainer with xgboost model trained on GPU dies.

    Hi, I've train quite a huge model using GPU, and save/load it before using with TreeExplainer(). The problem is the jupyter kernel dies when I call TreeExplainer(model).

    I supposed that it's because the model is too big to fit GPU memory, so I tried to change the model's parameter to 'cpu_predictor' using set_params method, so that the SHAP internally use CPU & RAM for the calculation.

    But it doesn't work as I expected. Even if I changed the predictor to use CPU, the jupyter kernel still dies. There's no error log so I couldn't attach here. The program just dies. What can I do with this?

    Here's my code

    def load_model(fname):
        model = xgb.XGBClassifier()
        model.load_model(fname)
        with open(fname.replace('.xgboost', '.json'), encoding='utf-8') as fin:
            params = json.load(fin)
        model.set_params(**params)
        return model
    
    model = load_model('./model/model_2-gram_2019-02-20T15-10-38.xgboost')
    
    params = {
         'tree_method': 'hist',
         'nthread': 4,
         'predictor': 'cpu_predictor', 
         'n_gpus': 1
    }
    model.set_params(**params)
    
    # compute the SHAP values for every prediciton in the validation dataset
    # DIES HERE!
    explainer = shap.TreeExplainer(model)
    
    todo 
    opened by kyoungrok0517 28
  • Saving SHAP plots programmatically in Python

    Saving SHAP plots programmatically in Python

    First off, thanks a lot for such an awesome tool!

    I think I might be missing something obvious, but I'm trying to save SHAP plots from Python, that I'm displaying with the shap plotting functions. I tried a couple ways:

    import matplotlib.pyplot as plt
    ...
    shap.summary_plot(shap_values, final_model_features)
    plt.savefig('scratch.png')
    

    and...

    import matplotlib.pyplot as plt
    ...
    fig = shap.summary_plot(shap_values, final_model_features)
    plt.savefig('scratch.png')
    

    but each just saves a blank image. Is there something obvious I'm missing to programmatically save these awesome plots from Python? Or should I just be re-generating them in matplotlib off the SHAP values matrix to do that? Thanks!

    opened by MaxPowerWasTaken 27
  • Reshap error for SHAP calculation

    Reshap error for SHAP calculation

    Hi Scott,

    We got a reshape error when trying to test SHAP on our data. Have you seen something similar? ValueError: cannot reshape array of size 207506055 into shape (255235,0,815)

    Also please see similar errors reported here https://github.com/dmlc/xgboost/issues/4276 https://discuss.xgboost.ai/t/scala-spark-xgboost-v0-81-shap-problem/817/2

    Let me know if you need to more information to investigate.

    Best, Wei

    bug 
    opened by kongwei9901 27
  • IndexError: list index out of range

    IndexError: list index out of range

    I am running the following code:

    from catboost.datasets import *
    train_df, _ = catboost.datasets.amazon()
    ix = 100
    X_train = train_df.drop('ACTION', axis=1)[:ix]
    y_train = train_df.ACTION[:ix]
    X_val = train_df.drop('ACTION', axis=1)[ix:ix+20]
    y_val = train_df.ACTION[ix:ix+20]
    model = CatBoostClassifier(iterations=100, learning_rate=0.5, random_seed=12)
    model.fit(X_train, y_train, eval_set=(X_val, y_val), verbose=False, plot=False)
    shap.TreeExplainer(model)
    

    I get the following error:

    ---------------------------------------------------------------------------
    IndexError                                Traceback (most recent call last)
    <ipython-input-2-6d52aef09dc8> in <module>
          8 model = CatBoostClassifier(iterations=100, learning_rate=0.5, random_seed=12)
          9 model.fit(X_train, y_train, eval_set=(X_val, y_val), verbose=False, plot=False)
    ---> 10 shap.TreeExplainer(model)
    
    ~/prb/anaconda3/lib/python3.6/site-packages/shap/explainers/tree.py in __init__(self, model, data, model_output, feature_dependence)
         94         self.feature_dependence = feature_dependence
         95         self.expected_value = None
    ---> 96         self.model = TreeEnsemble(model, self.data, self.data_missing)
         97 
         98         assert feature_dependence in feature_dependence_codes, "Invalid feature_dependence option!"
    
    ~/prb/anaconda3/lib/python3.6/site-packages/shap/explainers/tree.py in __init__(self, model, data, data_missing)
        594             self.dtype = np.float32
        595             cb_loader = CatBoostTreeModelLoader(model)
    --> 596             self.trees = cb_loader.get_trees(data=data, data_missing=data_missing)
        597             self.tree_output = "log_odds"
        598             self.objective = "binary_crossentropy"
    
    ~/prb/anaconda3/lib/python3.6/site-packages/shap/explainers/tree.py in get_trees(self, data, data_missing)
       1120 
       1121             # load the per-tree params
    -> 1122             depth = len(self.loaded_cb_model['oblivious_trees'][tree_index]['splits'])
       1123 
       1124             # load the nodes
    
    IndexError: list index out of range
    

    This error was spotted with Catboost version 0.15.2, I upgraded to the latest version (0.16.4 as of today), but the error persists. I have Shap version: '0.29.3'

    opened by ibuda 22
  • How to speed up SHAP computation

    How to speed up SHAP computation

    Hi,

    The package itself is really interesting and intuitive to use. I notice however it takes quite long time to run on neural network with practical feature & sample size using KernelExplainer. Question, is there any document to explain how to properly choose

    1. sample size fed into shap.KernelExplainer, and what is the guiding principal to choose these samples;
    2. number of samples fed into function explainer.shap_values, I would assume it has something to do with number of features(columns)

    For example, I have over 1 million record with 400 raw features (continuous + unencoded categorical). Any suggestion would be appreciated.

    screen shot 2018-05-08 at 2 50 41 pm

    Above screen shot is the example using 50 samples in KernelExplainer as typical feature values and 2000 case with 500 repeats in shap_values perturbation.

    opened by bingojojstu 22
  • initial distributed summary plot

    initial distributed summary plot

    As per #16, plus a few additions to support scatter, and a few tweaks. @slundberg - it's not finished yet, but can you give some initial feedback:

    • function call: I put all the arguments at the end so as to be backward compatible, but it's not as clean
    • do you have any idea about the sum of individual kdes not equalling the overall kde?
    • any comments on the visuals and changes, including code style etc.

    Examples below. Note that the 2nd and 7th from bottom have only two unique values (i.e. one-hot encoding). These two don't quite seem to match the scatterplot, which makes me somewhat suspicious.

    hidden_names = [str(i) for i in range(len(X_train.columns))]
    summary_plot(shap_values, hidden_names, max_display=20, features=X_train.as_matrix())
    summary_plot(shap_values, hidden_names, color="#cccccc", max_display=20, features=X_train.as_matrix())
    summary_plot(shap_values, hidden_names, max_display=10, violin=False, features=X_train.as_matrix(), alpha=0.01)
    summary_plot(shap_values, hidden_names, max_display=10, violin=False, features=X_train.as_matrix(), width=0., alpha=0.01)
    

    image image image image

    opened by kodonnell 22
  • shap.summary_plot displaying gray plot

    shap.summary_plot displaying gray plot

    screen shot 2019-01-23 at 8 56 37 pm

    I'm facing this issue where the features are not getting the expected blue and red colors. Does anyone have any idea why this might be so? Thank you!

    opened by terryyylim 22
  • #38 add support for pyspark trees in shap explainer

    #38 add support for pyspark trees in shap explainer

    This pull request add support for pyspark Decision Trees (Random Forest and GBT) in the explainer. It doesn't use spark to explain the model, big dataset still need to be reduced and converted as panda DF in order to run the explainer.

    Limitations:

    • Categorical split aren't supported, I haven't seen this feature being supported in SHAP, if it is I'd be happy to add it but I don't see a simple way to add it
    • Variance impurity isn't supported
    • the .predict() function doesn't support prediction with spark
    opened by QuentinAmbard 18
  • SHAP Values for ensemble of XGBoost models

    SHAP Values for ensemble of XGBoost models

    First, thank for all your work for this very excellent package! It's very easy to use and produces insightful plots that have been proving useful in my day-to-day work.

    I'm currently working on a model that is an ensemble of 10 XGBoost models. What's the best way to obtain SHAP values for this ensemble? Is it even sensible to get 10 sets of SHAP values and then average them? Or is there a better way?

    opened by sergeyf 18
  • Error in image_plot for image binary classification

    Error in image_plot for image binary classification

    I tried to implement shap values for a keras model of binary classification following the tutorial in the docs "Explain ResNet50 using the Partition explainer"

    In my case, I have only two output classes: 0 and 1, and I am trying to predict if a mushroom is poisonous or not based on an image.

    image

    so, I followed the steps of the tutorial with my own keras model (loaded_model) and my data X_im. Because I only want an explanation for the most probable class (as its binary classification) I considered shap.Explanation.argsort.flip[:1].

    So far, so good and the shap values were computed, but when I tried to plot the shap values using shap.image_plot, I got this error:

    image

    I am assuming it's because the binary output structure since in the tutorial was a multi class problem but I didn't find any solution so far.

    opened by ReginaBDuarte 0
  • GPUTree: model_output='probability' not working

    GPUTree: model_output='probability' not working

    Hello,

    I was just testing GPUTree explainer. Comparing GPUTree with outputs "raw" and "probability" understood, that they are the same (giving log odds, but I need probability).

    So:

    model = xgboost.XGBClassifier()
    
    shap.explainers.GPUTree(model, X)
    shap.explainers.GPUTree(model, model_output='probability', feature_perturbation='interventional', data = X)
    

    Giving the same output (in log odds) in .values, but .base_values are different.

    @slundberg @RAMitchell Could you please check it? Thank you!

    #1571

    opened by aletsomaya 0
  • SHAP interpretation for image to image CNN (regression)

    SHAP interpretation for image to image CNN (regression)

    Hi,

    I have a trained PyTorch CNN which takes 4 images(fields) of size 256x128 and produces 2 images(fields) of size 256x128. The CNN architecture is similar to the U-Net architecture.

    Is it possible to interpret such networks with SHAP values? If yes, are there any examples that could illustrate the process? How could I proceed ? I am looking forward to publishing the results of my research and interpreting the CNNs with SHAP would provide great added value to my work.

    Thank you for your time!

    opened by mmany 0
  • Update _kernel.py for memory optimization

    Update _kernel.py for memory optimization

    add garbage collector to kernel explainer

    opened by Qingtian-Zou 0
  • SHAP on converted models from onnx-tensorflow

    SHAP on converted models from onnx-tensorflow

    We want to run SHAP on models that were converted from onnx using onnx-tensorflow. Using this draft PR, we hope to be able to test against the CI setup from the original slundberg/shap repo.

    opened by cwmeijer 0
  • Waterfall plot doesn't work with uncertainty CatBoostRegressor model

    Waterfall plot doesn't work with uncertainty CatBoostRegressor model

    Hello,

    I am currently trying to plot a waterfall plot with shap. My model is a CatBoostRegressor:

    model = CatBoostRegressor(depth=10, l2_leaf_reg=1, iterations=75, learning_rate=0.1,
                                                   random_state=random_state, loss_function='RMSEWithUncertainty',
                                                   posterior_sampling=True, od_type="Iter", od_wait=10)
    

    The dataset I train it on is a standard dataset with a one-dimensional float target.

    I explain the model as follows:

    explainer = shap.TreeExplainer(model)                 
    shap_values = explainer(df_for_shap)
    

    When I try to plot a waterfall plot with

    shap.waterfall_plot(explanation)

    the program raises the exception

    Exception: waterfall_plot requires a scalar base_values of the model output as the first parameter, but you have passed an array as the first parameter! Try shap.waterfall_plot(explainer.base_values[0], values[0], X[0]) or for multi-output models try shap.waterfall_plot(explainer.base_values[0], values[0][0], X[0]).

    When I print the shap_values variable, this is the output.

    .values = array([[[0.000], [0.004], [-0.003], [0.000], [0.003], [0.006], [-0.009], [0.000], [0.002], [0.000], [-0.014], [0.000], [0.001], [0.004], [0.016], [-0.006], [0.030], [-0.024], [-0.002], [-0.022], [-0.001], [0.000], [-0.003], [-0.001], [0.020], [-0.007], [0.006], [0.006], [-0.000], [-0.000], [0.002], [-0.000], [0.000], [0.011], [-0.001], [0.007], [0.001], [0.006]]])

    .base_values = array([[0.153]])

    .data = array([[1.000, 0.000, 35000000.000, 97.000, 111.000, 70.050, 170.000, 520000000.000, 20800000.000, 7.000, 0.000, 0.000, 10.000, 4.000, 0.673, 25.000, 392.900, 0.500, 17.850, -1.000, 8.100, 15.810, 35.710, 0.000, -33.329, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 39.290, 0.000, 0.000, 6.000, 1.000]])

    I tried many workarounds as the one mentioned in this issue, but didn't have any luck. I even tried to make the numpy arrays from the ground up and assigning them to a helper object but the resulting plot was a None.

    Any insights?

    opened by giostefa 1
  • how to use plots.force and plots.text ?

    how to use plots.force and plots.text ?

    when i want to visualize the text sample ,shap.plots.force(explainer.expected_value, shap_values) i got an error: _--------------------------------------------------------------------------- Exception Traceback (most recent call last) ~\AppData\Local\Temp/ipykernel_17588/3349770769.py in ----> 1 shap.plots.force(explainer.expected_value, shap_values)

    A:\anaconda\envs\shap\lib\site-packages\shap\plots_force.py in force(base_value, shap_values, features, feature_names, out_names, link, plot_cmap, matplotlib, show, figsize, ordering_keys, ordering_keys_time_format, text_rotation, contribution_threshold) 97 if (isinstance(base_value, np.ndarray) or type(base_value) == list): 98 if not isinstance(shap_values, list) or len(shap_values) != len(base_value): ---> 99 raise Exception("In v0.20 force_plot now requires the base value as the first parameter! "
    100 "Try shap.force_plot(explainer.expected_value, shap_values) or "
    101 "for multi-output models try " \

    Exception: In v0.20 force_plot now requires the base value as the first parameter! Try shap.force_plot(explainer.expected_value, shap_values) or for multi-output models try shap.force_plot(explainer.expected_value[0], shap_values[0])._

    and when i input as it shap.plots.force(explainer.expected_value[0], shap_values[0]) ,another error occurred: _--------------------------------------------------------------------------- AssertionError Traceback (most recent call last) ~\AppData\Local\Temp/ipykernel_17588/1262830726.py in ----> 1 shap.plots.force(explainer.expected_value[0], shap_values[0])

    A:\anaconda\envs\shap\lib\site-packages\shap\plots_force.py in force(base_value, shap_values, features, feature_names, out_names, link, plot_cmap, matplotlib, show, figsize, ordering_keys, ordering_keys_time_format, text_rotation, contribution_threshold) 108 109 if type(shap_values) != np.ndarray: --> 110 return visualize(shap_values) 111 112 # convert from a DataFrame or other types

    A:\anaconda\envs\shap\lib\site-packages\shap\plots_force.py in visualize(e, plot_cmap, matplotlib, figsize, show, ordering_keys, ordering_keys_time_format, text_rotation, min_perc) 350 return AdditiveForceArrayVisualizer(e, plot_cmap=plot_cmap, ordering_keys=ordering_keys, ordering_keys_time_format=ordering_keys_time_format) 351 else: --> 352 assert False, "visualize() can only display Explanation objects (or arrays of them)!" 353 354 class BaseVisualizer:

    AssertionError: visualize() can only display Explanation objects (or arrays of them)!_

    what should i do ?

    opened by hanluxq 0
  • pyspark RandomForestRegressionModel save error AttributeError: 'TreeEnsemble' object has no attribute 'save'

    pyspark RandomForestRegressionModel save error AttributeError: 'TreeEnsemble' object has no attribute 'save'

    I trained a pyspark RandomForestRegressionModel model and created an explainer:

    model = ...  # train pyspark.ml.regression.RandomForestRegressionModel
    explainer = shap.Explainer(model)
    

    However, when trying to save the explainer:

    with open('shaptest', 'wb') as file:
        explainer.save(file)
    

    I get:

    AttributeError: 'TreeEnsemble' object has no attribute 'save'
    

    Digging around, the error is here: https://github.com/slundberg/shap/blob/9d7de4dee742ce10684400171257c66a86e4c7a6/shap/_serializable.py#L87

    and value is of type shap.explainers._tree.TreeEnsemble, which is the type shap has defined and created/coerced from my RandomForestRegressionModel.

    Is this expected behavior? User error? A bug?

    opened by trianta2 0
  • Logit non-linearity and Shapely values

    Logit non-linearity and Shapely values

    @slundberg thanks for your work and for taking your time to solve issues. Also thanks for your YouTube great content.

    Since XGBoost for classification works internally in the logit space and the logit function is far from linear, how is it possible to average magnitudes out of all possible combinations for computing Shapely values? Does this make sense or am I missing something?

    What I mean is that it hasn't the same impact (in terms of probability) a 1 unit increase in the logit value when where're around 0.5 (huge impact) vs the impact a 1 unit increase has when we're in the tails of the logit function (no-impact)

    If I'm correct then it'd be more correct to work with model_output='probability'

    Also I don't understand why if working with model_output='probability' we need to pass a data kwarg and why we couldn't work with the models output in each leaf and just make the transformation as we do when working with a background dataset.

    Thanks in advance

    opened by eduardcmp 0
Releases(v0.40.0)
  • v0.40.0(Oct 20, 2021)

    This release contains many bugs fixes and lots of new functionality, specifically for transformer based NLP models. Some highlights include:

    • New plots, bug fixes, docs, and features for NLP model explanations (see docs for details).
    • important permutation explainer performance fix by @sander-sn
    • New joint scatter plots to plot many at once on the same y-scale
    • better tree model memory usage by @morriskurz
    • new docs by @coryroyce
    • new wheel building by @PrimozGodec
    • dark mode improvements for the docs by @gialmisi
    • api tweaks by @c56pony @nsorros @jebarb
    Source code(tar.gz)
    Source code(zip)
  • v0.39.0(Mar 3, 2021)

    Lots of new text explainer work courtesy of @ryserrao and serialization courtesy of @vivekchettiar! (will note all the other changes later)

    Source code(tar.gz)
    Source code(zip)
  • v0.38.1(Jan 15, 2021)

  • v0.38.0(Jan 14, 2021)

    This release contains improved support for explanations of transformer text models and support for the new Explanation object based API. Specific improvements include:

    • Transformer model support in the Text explainer courtesy of @ryserrao
    • Interventional Tree explainer GPU support courtesy of @RAMitchell
    • Image captioning model support courtesy of @anusham1990
    • Benchmarking improvements courtesy of @maggiewu19
    • New text and image visualizations courtesy of @vivekchettiar
    • New explainer serialization support courtesy of @vivekchettiar
    • Bug fixes for Linear explainer and the new API courtesy of @heimengqi
    • Fix for categorical plots courtesy of @jeffreyftang
    • CUDA support improvements courtesy of @JohnZed
    • Support for econML model courtesy of @vasilismsr
    • Many other bug fixes and API improvements.
    Source code(tar.gz)
    Source code(zip)
  • v0.37.0(Nov 4, 2020)

    This release contains more support for the new API, many bug fixes, and preliminary model agnostic text/image explainer support (still beta). Specific contributions include:

    • Fix Sampling explainer sample counting issue courtesy of @tcbegley
    • Add multi-bar plotting support.
    • Preliminary support for cohorts.
    • Fixed an import error courtesy of @suragnair
    • Fix Tree explainer issues with isolation forests with max_features < 1 courtesy of @zhanjiezhu
    • Huge documentation cleanup and update courtesy of @lrjball
    • Typo fix courtesy of @anusham1990
    • Added a documentation notebook for the Exact explainer.
    • Text and Image explainers courtesy of @anusham1990 and Ryan Serrao
    • Bug fix for shap.utils.hclust
    • Initial support for InterpretML EBM models.
    • Added column grouping functionality to Explainer objects.
    • Fix for loop index bug in Deep explainer for PyTorch courtesy of @quentinRaq
    • Initial text to text visualization concepts courtesy of @vivekchettiar
    • Color conversion warning fix courtesy of @wangjoshuah
    • Fix invertibility issues in Kernel explainer with the pseudoinverse courtesy of @PrimozGodec
    • New benchmark code courtesy of @maggiewu19 and @vivekchettiar
    • Other small bug fixes and enhancements.
    Source code(tar.gz)
    Source code(zip)
  • v0.36.0(Aug 27, 2020)

    This version contains a significant refactoring of the SHAP code base into a new (cleaner) API. Full backwards compatibility should be retained, but most things are now available in locations with the new API. Note that this API is still in a beta form, so refrain from depending on it for production code until the next release. Highlights include:

    • A new shap.Explainer object that auto-chooses the explainer based on the given model and masking dataset.
    • A new shap.Explanation object that allows for parallel slicing of data, SHAP values, base values (expected values), and other explanation-specific elements.
    • A new shap.maskers.* module that separates the various ways to mask (i.e. perturb/hide) features from the algorithms themselves.
    • A new shap.explainers.Partition explainer that can explain any text or image models very quickly.
    • A new shap.maskers.Partition masker that ensures tightly grouped features are perturbed in unison, so preventing "unrealistic" model inputs from inappropriately influencing the model prediction. It also allows for the exact quadratic time computation of SHAP values for the 'structured games' (with coalitions structured according to a hierarchical clustering).
    • A new shap.plots.* module with revamped plot types that all support the new API. Plots are now named more directly, so summary_plot (default) becomes beeswarm, and dependent_plot becomes scatter. Not all the plots have been ported over to the new API, but most have.
    • A new notebooks/plots/* directory given examples of how to use the new plotting functions.
    • A new shap.plots.bar function to directly create bar plots and also display hierarchical clustering structures to group redundant features together, and show the structure used by a Partition explainer (that relied on Owen values, which are an extension of Shapley values).
    • Equally check fixes courtesy of @jameslamb
    • Sparse kmeans support courtesy of @PrimozGodec
    • Pytorch bug fixes courtesy of @rightx2
    • NPM JS code clean up courtesy of @SachinVarghese
    • Fix logit force plot bug courtesy of @ehuijzer
    • Decision plot documentation updates courtesy of @floidgilbert
    • sklearn GBM fix courtesy of @ChemEngDataSci
    • XGBoost 1.1 fix courtesy of @lrjball
    • Make SHAP spark serializable courtesy of @QuentinAmbard
    • Custom summary plot color maps courtesy of @nasir-bhanpuri
    • Support string inputs for KernelSHAP courtesy of @YotamElor
    • Doc fixes courtesy of @imatiach-msft
    • Support for GPBoost courtesy of @fabsig
    • Import bug fix courtesy of @gracecarrillo and @aokeson
    Source code(tar.gz)
    Source code(zip)
  • 0.35.0(Feb 27, 2020)

    This release includes:

    • Better support for TensorFlow 2 (thanks @imatiach-msft)
    • Support for NGBoost models in TreeExplainer (thanks @zhiruiwang)
    • TreeExplainer support for the new sklearn.ensemble.HistGradientBoosting model.
    • New improved versions of PartitionExplainer for images and text.
    • IBM zOS compatibility courtesy of @DorianCzichotzki.
    • Support for XGBoost 1.0
    • Many bug fixes courtesy of Ivan, Christian Paul, @RandallJEllis, and @ibuda.
    Source code(tar.gz)
    Source code(zip)
  • 0.34.0(Dec 27, 2019)

    This release includes:

    • Many small bug fixes.
    • Better matplotlib text alignment during rotation courtesy of @koomie
    • Cleaned up the C++ transformer code to allow easier PRs.
    • Fixed a too tight check_additivity tolerance in TreeExplainer #950
    • Updated the LinearExplainer API to match TreeExplainer
    • Allow custom class ordering in a summary_plot courtesy of @SimonStreicher
    Source code(tar.gz)
    Source code(zip)
  • 0.33.0(Dec 11, 2019)

    This release contains various bug fixes and new features including:

    • Added PySpark support for TreeExplainer courtesy of @QuentinAmbard
    • A new type of plot that is an alternative to the force_plot, a waterfall_plot
    • A new PermutationExplainer that is an alternative to KernelExplainer and SamplingExplainer.
    • Added return_variances to GradientExplainer for PyTorch courtesy of @s6juncheng
    • Now we use exceptions rather than assertions in TreeExplainer courtesy of @ssaamm
    • Fixed image_plot transpose issue courtesy of @Jimbotsai
    • Fix color bar axis attachment issue courtesy of Lasse Valentini Jensen
    • Fix tensor attachment issue in PyTorch courtesy of @gabrieltseng
    • Fix color clipping ranges in summary_pot courtesy of @joelostblom
    • Address sklearn 0.22 API changes courtesy of @lemon-yellow
    • Ensure matplotlib is optional courtesy of @imatiach-msft
    Source code(tar.gz)
    Source code(zip)
  • 0.32.1(Nov 6, 2019)

  • 0.32.0(Nov 6, 2019)

    This release includes:

    • Support for sklearn isolation forest courtesy of @JiechengZhao
    • New check_additivity tests to ensure no errors in DeepExplainer and TreeExplainer
    • Fix #861, #860
    • Fix missing readme example html file
    • Support for spark decision tree regressor courtesy of @QuentinAmbard
    • Better safe isinstance checking courtesy of @parsatorb
    • Fix eager execution in TF < 2 courtesy of @bottydim
    Source code(tar.gz)
    Source code(zip)
  • 0.31.0(Oct 21, 2019)

    This release contains several new features and bug fixes:

    • GradientExplainer now supports TensorFlow 2.0.
    • We now do a lazy load of the plotting dependencies, which means a pip install no longer needs to also pull in matplotlib, skimage, and ipython. This should make installs much lighter, especially those that don't need plotting :)
    • Added a new BruteForceExplainer for easy testing and comparison on small problems.
    • Added a new partial_dependence_plot function. This function will be used to illustrate the close connections between partial dependence plots and SHAP values in future example notebooks.
    • Handle the multiclass case with no intercept in LinearExplainer courtesy of @gabrieltseng
    • Some extras_require options during the pip install courtesy of @AbdealiJK
    • Other small bug fixes and updates
    Source code(tar.gz)
    Source code(zip)
  • 0.30.2(Oct 9, 2019)

    This release is primarily to remove a dependency on dill that was not in setup.py. It also includes:

    • A typo fix in force.py courtesy of @jonlwowski012
    • Test code cleanup courtesy of @jorgecarleitao
    Source code(tar.gz)
    Source code(zip)
  • 0.30.1(Sep 9, 2019)

    • Fix floating point rounding mismatches in recent sklearn versions of tree models
    • An update to allow easier loading of custom tree ensemble models by TreeExplainer.
    • decision_plot documentation updates courtesy of @floidgilbert
    Source code(tar.gz)
    Source code(zip)
  • 0.30.0(Aug 31, 2019)

    • New decision_plot function courtesy of @floidgilbert
    • Add alpha version of the new model agnostic PartitionExplainer
    • ensure data is all on the same device for pytorch in DeepExplainer courtesy of @gabrieltseng
    • fix lightgbm edge case issue courtesy of @imatiach-msft
    • create binder setup for shap courtesy of @jamesmyatt
    • Allow for multiple inputs in the gradient explainer courtesy of @gabrieltseng
    • New KernelExplainer unit tests courtesy of @jorgecarleitao
    • Add python 2/3 trove classifiers courtesy of @proinsias
    • support for pyspark trees courtesy of @QuentinAmbard
    • many other bug fixes courtesy of @Rygu, @Kylecrif, @trams, @imatiach-msft, @yunchuankong, @invokermain, @lupusomniator, @satyarta, @jotsif, @parkerzf, @jaller94, @gabrieltseng, and others
    Source code(tar.gz)
    Source code(zip)
  • 0.29.3(Jun 19, 2019)

  • 0.29.2(Jun 19, 2019)

    Various bug fixes and improvements including:

    • adding SHAP values for binary classification to CatBoost courtesy of @dvpolyakov
    • Integer division fix for plots courtesy of @pmeier-tiplu
    • Support passing in an Axes object to dependence_plot courtesy of @mqk
    • Add adaptive average pooling and conv transpose layers courtesy of of @gabrieltseng
    • fix import errors on a missing matplotlib backend courtesy of @hchandola
    • fix TreeExplainer GradientBoostingClassifier bug courtesy of @prempiyush
    • make tqdm play nicer with notebooks courtesy of @KOLANICH
    • Allow deep_pytorch to use cuda models courtesy of @juliusbierk
    • Fix sklearn GradientBoostingRegressor bug courtesy of @nasir-bhanpuri
    • adding sparse support to shap linear explainer courtesy of @imatiach-msft
    Source code(tar.gz)
    Source code(zip)
  • 0.29.1(May 15, 2019)

  • 0.29.0(May 14, 2019)

    A few contribution highlights of this release (in chronological order)

    • Better testing courtesy of @jorgecarleitao
    • Image plot customizations courtesy of @verdimrc
    • Batch norm support for PyTorch in DeepExplainer courtesy of @JiechengZhao
    • Leaky ReLU and other conv layer support for pytorch deep explainer courtesy of @gabrieltseng
    • Fixed keras multi input in gradient explainer and improved random seeds courtesy of @moritzaugustin
    • Support for catBoost ranker courtesy of @doramir
    • Added XGBRanker and LGBMRanker to TreeExplainer courtesy of @imatiach-msft
    • Fix embedding lookup with tf.keras in DeepExplainer courtesy of @andriy-nikolov
    • Custom dependence_plot colors maps courtesy of @rcarneva
    • Fix divide by zero issues possible with CatBoost models courtesy of @dvpolyakov
    • Lots of other bug fixes/improvements!
    Source code(tar.gz)
    Source code(zip)
  • 0.28.5(Feb 16, 2019)

  • 0.28.4(Feb 16, 2019)

    • Fixes memory corruption error from TreeExplainer (courtesy of @imatiach-msft)
    • Adds support for skopt Random Forest and ExtraTrees Regressors (courtesy of @Bacoknight)
    • Adds support for matplotlib forceplot with text rotation (courtesy of @vatsan)
    • Adds a save_html function
    Source code(tar.gz)
    Source code(zip)
  • 0.28.3(Jan 24, 2019)

  • 0.28.2(Jan 23, 2019)

  • 0.28.1(Jan 23, 2019)

    • Fixes a byte-alignment issue on Windows when loading XGBoost models.
    • Now matches tree_limit use in XGBoost models courtesy of @HughChen
    • Fix an issue with the expected_value of transformed model outputs in TreeExplainer
    Source code(tar.gz)
    Source code(zip)
  • 0.28.0(Jan 21, 2019)

    • Add support for rank-based feature selection in KernelExplainer.
    • Depreciate l1_reg="auto" in KernelExplainer in favor of eventually defaulting to l1_reg="num_features(10)"
    • New color scales based on the Lch color space.
    • Better auto-color choices for multi-class summary plots.
    • Better plotting of NaN values in dependence_plots
    • Updates for Pytorch 1.0 courtesy of @gabrieltseng
    • Fix the sklearn DecisionTreeClassifier handling to correctly normalize to a probability output
    • Enable multi-output model support for TreeExplainer when feature_dependence="independent"
    • Correctly load the objective of LightGBM models for use in explaining the model loss.
    • Fix numerical precision mismatch with sklearn models.
    • Fix numerical precision mismatch with XGBoost models by now directly loading from memory instead of JSON.
    Source code(tar.gz)
    Source code(zip)
  • 0.27.0(Jan 1, 2019)

    • Better hierarchal clustering orderings that now rotate subtrees to give more continuity.
    • Work around XGBoost JSON issue.
    • Account for NaNs when doing auto interaction detection.
    • PyTorch fixes.
    • Updated LinearExplainer.
    Source code(tar.gz)
    Source code(zip)
  • 0.26.0(Dec 12, 2018)

    • Complete refactor of TreeExplainer to support deeper C++ integration
    • The ability to explain transformed outputs of tree models in TreeExplainer, including the loss. In collaboration with @HughChen
    • Allow for a dynamic reference value in DeepExplainer courtesy of @AvantiShri
    • Add x_jitter option for categorical dependence plots courtesy of @ihopethiswillfi
    • Added support for GradientBoostingRegressor with quantile loss courtesy of @dmilad
    • Better plotting support for NaN values
    • Fixes several bugs.
    Source code(tar.gz)
    Source code(zip)
  • 0.25.2(Nov 9, 2018)

    • Allows ordering_keys to be given to force_plot courtesy of @JasonTam
    • Fixes sparse nonzero background issue with KernelExplainer courtesy of @imatiach-msft
    • Fix to support tf.concat in DeepExplainer.
    Source code(tar.gz)
    Source code(zip)
  • 0.25.1(Nov 8, 2018)

  • 0.25.0(Nov 7, 2018)

    • Support for PyTorch in GradientExplainer and preliminary support for PyTorch in DeepExplainer courtesy of @gabrieltseng.
    • A matplotlib version of the single sample force_plot courtesy of @jverre.
    • Support functional Keras models in GradientExplainer.
    • KernelExplainer speed improvements.
    • Various performance improvements and bug fixes.
    Source code(tar.gz)
    Source code(zip)
Owner
Scott Lundberg
Scott Lundberg
machine learning model deployment project of Iris classification model in a minimal UI using flask web framework and deployed it in Azure cloud using Azure app service

This is a machine learning model deployment project of Iris classification model in a minimal UI using flask web framework and deployed it in Azure cloud using Azure app service. We initially made this project as a requirement for an internship at Indian Servers. We are now making it open to contribution.

Krishna Priyatham Potluri 69 Nov 4, 2021
This machine-learning algorithm takes in data from the last 60 days and tries to predict tomorrow's price of any crypto you ask it.

Crypto-Currency-Predictor This machine-learning algorithm takes in data from the last 60 days and tries to predict tomorrow's price of any crypto you

Hazim Arafa 3 Nov 8, 2021
A Python Automated Machine Learning tool that optimizes machine learning pipelines using genetic programming.

Master status: Development status: Package information: TPOT stands for Tree-based Pipeline Optimization Tool. Consider TPOT your Data Science Assista

Epistasis Lab at UPenn 8.3k Nov 25, 2021
Python Extreme Learning Machine (ELM) is a machine learning technique used for classification/regression tasks.

Python Extreme Learning Machine (ELM) Python Extreme Learning Machine (ELM) is a machine learning technique used for classification/regression tasks.

Augusto Almeida 65 Aug 23, 2021
Vowpal Wabbit is a machine learning system which pushes the frontier of machine learning with techniques

Vowpal Wabbit is a machine learning system which pushes the frontier of machine learning with techniques such as online, hashing, allreduce, reductions, learning2search, active, and interactive learning.

Vowpal Wabbit 7.8k Nov 26, 2021
CD) in machine learning projectsImplementing continuous integration & delivery (CI/CD) in machine learning projects

CML with cloud compute This repository contains a sample project using CML with Terraform (via the cml-runner function) to launch an AWS EC2 instance

Iterative 14 Oct 20, 2021
High performance, easy-to-use, and scalable machine learning (ML) package, including linear model (LR), factorization machines (FM), and field-aware factorization machines (FFM) for Python and CLI interface.

What is xLearn? xLearn is a high performance, easy-to-use, and scalable machine learning package that contains linear model (LR), factorization machin

Chao Ma 3k Nov 30, 2021
Machine Learning Model to predict the payment date of an invoice when it gets created in the system.

Payment-Date-Prediction Machine Learning Model to predict the payment date of an invoice when it gets created in the system.

null 6 Dec 1, 2021
Python package for machine learning for healthcare using a OMOP common data model

This library was developed in order to facilitate rapid prototyping in Python of predictive machine-learning models using longitudinal medical data from an OMOP CDM-standard database.

Sontag Lab 47 Nov 30, 2021
Model Agnostic Confidence Estimator (MACEST) - A Python library for calibrating Machine Learning models' confidence scores

Model Agnostic Confidence Estimator (MACEST) - A Python library for calibrating Machine Learning models' confidence scores

Oracle 83 Nov 30, 2021
Graphsignal is a machine learning model monitoring platform.

Graphsignal is a machine learning model monitoring platform. It helps ML engineers, MLOps teams and data scientists to quickly address issues with data and models as well as proactively analyze model performance and availability.

Graphsignal 101 Nov 16, 2021
We have a dataset of user performances. The project is to develop a machine learning model that will predict the salaries of baseball players.

Salary-Prediction-with-Machine-Learning 1. Business Problem Can a machine learning project be implemented to estimate the salaries of baseball players

Ayşe Nur Türkaslan 7 Nov 8, 2021
This is a Machine Learning model which predicts the presence of Diabetes in Patients

Diabetes Disease Prediction This is a machine Learning mode which tries to determine if a person has a diabetes or not. Data The dataset is in comma s

Edem Gold 2 Oct 21, 2021
Built on python (Mathematical straight fit line coordinates error predictor machine learning foundational model)

Sum-Square_Error-Business-Analytical-Tool- Built on python (Mathematical straight fit line coordinates error predictor machine learning foundational m

om Podey 1 Dec 3, 2021
Mosec is a high-performance and flexible model serving framework for building ML model-enabled backend and microservices

Mosec is a high-performance and flexible model serving framework for building ML model-enabled backend and microservices. It bridges the gap between any machine learning models you just trained and the efficient online service API.

null 21 Nov 27, 2021
Model search (MS) is a framework that implements AutoML algorithms for model architecture search at scale.

Model Search Model search (MS) is a framework that implements AutoML algorithms for model architecture search at scale. It aims to help researchers sp

AriesTriputranto 1 Nov 2, 2021
Microsoft contributing libraries, tools, recipes, sample codes and workshop contents for machine learning & deep learning.

Microsoft contributing libraries, tools, recipes, sample codes and workshop contents for machine learning & deep learning.

Microsoft 271 Nov 21, 2021
A data preprocessing package for time series data. Design for machine learning and deep learning.

A data preprocessing package for time series data. Design for machine learning and deep learning.

Allen Chiang 101 Nov 22, 2021
A mindmap summarising Machine Learning concepts, from Data Analysis to Deep Learning.

A mindmap summarising Machine Learning concepts, from Data Analysis to Deep Learning.

Daniel Formoso 5.3k Nov 23, 2021