You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You hard work is very much appreciated, as is your kind attention.
shap.plot.dependence is important validating the output of the SHAP model.
The histogram option is very useful for this, as is the smooth option.
However, the latter almost demands that the linear equation and R-squared be shown.
Would it be possible to implement as an option in shap.plot.dependence?
And here is an example of it being used in practice, with output below: library(devtools) source_gist("524eade46135f6348140") df = data.frame(x = c(1:100)) df$y = 2 + 5 * df$x + rnorm(100, sd = 40) df$class = rep(1:2,50) ggplot(data = df, aes(x = x, y = y, label=y)) + stat_smooth_func(geom="text",method="lm",hjust=0,parse=TRUE) + geom_smooth(method="lm",se=FALSE) + geom_point() + facet_wrap(~class)
Thanks in advance!
The text was updated successfully, but these errors were encountered:
The default smooth line uses loess since most relationships are not linear. But you can make it linear by adding the geom_smooth yourself since the output is ggplot2 object (please turn add_hist off otherwise it is no longer ggplot2 object)
Dear Colleague,
You hard work is very much appreciated, as is your kind attention.
shap.plot.dependence
is important validating the output of the SHAP model.The
histogram
option is very useful for this, as is thesmooth
option.However, the latter almost demands that the linear equation and R-squared be shown.
Would it be possible to implement as an option in
shap.plot.dependence
?There is some easy code that enables this, found here:
https://gist.github.com/kdauria/524eade46135f6348140
And here is an example of it being used in practice, with output below:
library(devtools) source_gist("524eade46135f6348140") df = data.frame(x = c(1:100)) df$y = 2 + 5 * df$x + rnorm(100, sd = 40) df$class = rep(1:2,50) ggplot(data = df, aes(x = x, y = y, label=y)) + stat_smooth_func(geom="text",method="lm",hjust=0,parse=TRUE) + geom_smooth(method="lm",se=FALSE) + geom_point() + facet_wrap(~class)
Thanks in advance!
The text was updated successfully, but these errors were encountered: