Coder Social home page Coder Social logo

ccaribe9 / shapeffects Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 57.3 MB

Code and experiments related to SHAPEffects paper: 'A feature selection method based on Shapley values robust to concept shift in regression'

License: MIT License

Jupyter Notebook 97.82% Python 2.18%
concept-drift data-science feature-selection machine-learning shap shapley-values concept-shift

shapeffects's People

Contributors

ccaribe9 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

shapeffects's Issues

Uniform distribution instead of random permutation

Hi,

First of all thank you for publishing the paper and for providing the code with it for reproducibility. While going through the code, I noticed a slight discrepancy (maybe intended) between the description of the algorithm and the actual routine.

In page 12, it says that :

The algorithm is divided into two phases, a preliminary and optional
phase and the main component. In the first preprocessing phase, a random
variable is introduced into the dataset, specifically, a permutation of the most
influential variable according to the mean of the absolute values of the Shapley
values between the original variables.

However, in the function introduce_random_variable, a uniform distribution is sampled from the most influential variable:

sample_train = np.random.uniform(low=random_variable_train.min(), high=random_variable_train.max(), size=(len(X_train),))
sample_val = np.random.uniform(low=random_variable_val.min(), high=random_variable_val.max(), size=(len(X_val),))

Following the paper definition, it should be:

sample_train = np.random.permutation(random_variable_train)
sample_val = np.random.uniform(random_variable_val)

I doubt that it has a big impact on results but I wanted to check with you nonethless whether it is intended or not. Happy to hear your thoughts.

Thanks,
Thomas

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.