Giter Club home page Giter Club logo

Comments (7)

slundberg avatar slundberg commented on May 5, 2024

Cool application. What you want is an XGBoost model that would do a good job identifying new anomalies in future data. If your model doesn't, then it is not capturing real structure in the data.

So since SHAP values are only as meaningful as the model they explain, I would for sure do a train test split to determine the XGBoost parameters. However, once you have those params I would also then retrain the XGBoost model on the whole dataset for a bit of extra accuracy before explaining it.

from shap.

asstergi avatar asstergi commented on May 5, 2024

Thank you for you comments. I absolutely agree that the XGBoost should be able to capture the real structure of the data.

So, are you suggesting doing cross-validation to get the optimal hyper-parameters and then re-train the model on the whole dataset (and make predictions on the same one)?

from shap.

slundberg avatar slundberg commented on May 5, 2024

from shap.

jsulopzs avatar jsulopzs commented on May 5, 2024

Is it possible to output shap values out of an Isolation Forest by its own, without the need to use xgboost?

I have tried to compute the shap values for Anomaly Detection with Local Outlier Factor, SVM and Isolation Forest. They all output -1 or 1 with respect to if the observation is an outlier or not, respectively.

My question is whether we need xgboosting to calculate probabilities to find outliers and then compute the shap values, or if there is another way of computing the shap values of these methods by its own?

Every time that I have run the experiment with the outcome labelled -1 or 1, I couldn't match the results because they all yielded 1 as if the shap values don't go well with these models...

from shap.

Harshit200107 avatar Harshit200107 commented on May 5, 2024

I am using Anomaly Detection with Local Outlier Forest, One Class Svm ,Isolation Forest .They have Output as an outlier 1 or -1.

I am trying to use Shap For finding interpretation of these models but It is saying These Explainer doesnot go well with these models except for isolation forest.

Is there any explainer that works with Local Outlier Forest and One Class Svm

from shap.

skngetich avatar skngetich commented on May 5, 2024

@Harshit200107 did you get a solution? if not what did you use as an alternative? I have the same problem

from shap.

smc181002 avatar smc181002 commented on May 5, 2024

the LOF in sklearn provides a method called decision_function which outputs the raw scores of the prediction. Using this will give better explanation of the features. But the novelty parameter should be set to True for this

from shap.

Related Issues (20)

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.