We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
unify
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
This code returns an error:
n <- 1000 p <- 5 X <- as.data.frame(matrix(rnorm(n*p), nrow=n)) logit <- exp(X[, 1] * X[, 2]) y <- 1 / (1 + logit) > 0.5 plot(X[, 1], X[, 2], col = as.factor(y)) plot(X[, 1], X[, 3], col = as.factor(y)) df <- cbind(X, y = y) library(gbm) model <- gbm(y~., data=df, interaction.depth=2, n.trees=50) library(treeshap) uexp <- gbm.unify(model, X) treeshap1 <- treeshap(uexp, X, verbose = 0) plot_feature_importance(treeshap1) plot_contribution(treeshap1)
When passing df to gbm.unify and treeshap, the y variable shows on both plots, and it should not.
df
gbm.unify
treeshap
y
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
This code returns an error:
When passing
df
togbm.unify
andtreeshap
, they
variable shows on both plots, and it should not.The text was updated successfully, but these errors were encountered: