-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fastshap with tree augmented naive bayes of caret (tan) #44
Comments
Hi @PARODBE, can you provide some info as to what a “tan” mode is and what R package is used to fit them? |
Of course! https://github.com/topepo/caret/blob/master/models/files/tan.R This model can be train with categories which can work like strings (you use this model for do searchs of conditional probabilities). You can get whatever dataset before of dummies conversion and run fastshap like a proof, in my case doesn't work, but it is very possible that I do something wrong since I am very better in python. Thank you! |
Gotcha @PARODBE, and thanks for the link. If you’d be kind enough to post a small reproducible example, I’d be happy to take a look!! |
Hi again, Use whatever dataset with categorical data (with strings, for example 1 variable, kind of animals: dogs, birds,cats..., another variable, size: High, medium, little etc and output variable, for example: cute, not cute), and after you can build your model with this (it is only an example): set.seed(666) fitControl <- trainControl(method = "repeatedcv", tune.grid <- expand.grid(smooth=10^seq(-1,2,0.2), alldata.tan <- caret::train(x,y, And here you have your tan model for introduce it in fastshap, I am doing this: p_function_G<- function(object, newdata) shap_values_G <- fastshap::explain(alldata.tan, But I obtain nothing, for this reason I think that I am doing something wrong... |
Have you could find out something about this??? |
Hi! I've create a section in my github for this with a dataset totally artificial but it should be useful for using fastshap: https://github.com/PARODBE/bnlearn_r_playing/tree/main All best, |
Hi,
Is it possible to use this library for tan model? In my tan model features have different categories (they are strings).
Thanks!
The text was updated successfully, but these errors were encountered: