ModelOriented / DALEX

moDel Agnostic Language for Exploration and eXplanation
https://dalex.drwhy.ai
GNU General Public License v3.0
1.38k stars 166 forks source link

Wish: allow model_profile to specify only some variable_splits (python) #470

Open mayer79 opened 3 years ago

mayer79 commented 3 years ago

I am using dalex to plot multiple partial dependence plots in Python. It is a very useful package!

For some numeric features (especially those with outliers), I would like to specify the evaluation grid using option variable_splits in model_profile. However, if I do this, I need to specify a grid for all other features as well. Ideally, the function would use the keys in variable_splits only to overwrite the default. For those features without specified variable_splits key, it would resort to the default.

In the following case: the left-most feature should stop at a maximum of 10. The range for the other feature is fine though:

image

hbaniecki commented 3 years ago

Agreed, but it will change the default behaviour so it probably should be added in v1.5.0.

mayer79 commented 3 years ago

Oops, wrong button ;-). Sounds reasonable! My suggestion only makes a difference if a variable list is passed as well. If there is no such list, it makes sense to only plot variables appearing in the keys.

hbaniecki commented 3 years ago

Actually, I am not sure if it makes sense for the keys of variable_splits to override variables=None (like it is now). This behaviour was probably copied from R. I will investigate it.