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
As compared to the python implementation, it appears that R's aspect_importance does not seem to have some functionalities and non unified API:
Specifying correlation mechanism (depend_method in python API). Currently, only numeric columns are supported.
Functionality seems to be distributed between triplot,dalexExtra. It would be great to bring it under DALEX like python API does. Here are some thoughts:
# create explainer
exp = explain(model, data, y)
# create aspects object/class instead of passing `variable_groups` to `triplot::predict_aspects`
# when `variable_groups` is specified, `depend_method` should be NULL
exp_asp = get_aspects(exp, depend_method = 'association', variable_groups)
# get variable groups at required cutpoint in hclust
# called 'group_variables' in triplot
vg = get_variable_groups(exp_asp, h = 1, n = 5) # either h or n
# get global aspect importance
# triplot has `predict_aspects` which seems like a local method, but actually it is global
# one among h, n and variable_groups should be provided
model_parts(exp_asp, type = "variable_importance", h, n, variable_groups) # should have print and plot methods
# get local aspect importance
# one among h, n and variable_groups should be provided
predict_parts(exp_asp, type = "shap", seed = 1, h, n, variable_groups, show_triplot = FALSE)
# This will keep the API consistent with python
# and the user need not worry calling `aspect_importance`, `predict_triplot` from different packages
# knowing DALEX's `predict_parts`, `model_parts` will suffice
I will be happy to contribute, let me know if a PR is welcome.
The text was updated successfully, but these errors were encountered:
Hi @talegari, it is good to see interest in Aspect importance.
R's aspect_importance and other related methods were moved from DALEXtra to triplot; they are no longer available in DALEXtra, and the triplot package was meant to support Aspect importance. I believe it was not considered for DALEX, since DALEX has no hard dependencies besides ggplot2, iBreakDown, and ingredients (both, which also only depend on ggplot2).
In Python, we use Power Predictive Score (PPS) [blog, software] to compute relationship between categorical and numerical variables. If you wish to implement new measures for the triplot package, I would be happy to review your contributed PR.
We can consider adding global/local aspect importance into DALEX only if you do so without adding any newly imported dependencies. As for changing the triplot API, you would need to propose a change there.
Team Dalex,
As compared to the python implementation, it appears that R's aspect_importance does not seem to have some functionalities and non unified API:
depend_method
in python API). Currently, only numeric columns are supported.triplot
,dalexExtra
. It would be great to bring it underDALEX
like python API does. Here are some thoughts:I will be happy to contribute, let me know if a PR is welcome.
The text was updated successfully, but these errors were encountered: