giuseppec / iml

iml: interpretable machine learning R package
https://giuseppec.github.io/iml/
Other
489 stars 88 forks source link

Set y-axis label to "" for plots of FeatureImp, Shapley and LocalModel #70

Open christophM opened 5 years ago

christophM commented 5 years ago

The y-axis label ("Feature") is not really helpful and should be removed

ugroempi commented 4 years ago

It seems that you already worked on this. What I would really like in relation y-axis labels: create the plot such that subsequent calls to +ylab("new y-axis label") would work. This worked for all cases I tried for xlab, but not for ylab with ALE or PD plots for single features.

I finally figured out from the code that this is because the plot is created with scale_y_continuous, where the axis label is specified. Hence, I was able to modify the y axis label with +scale_y_continuous(name="Predicted probability for good risk") (wanting to replace y-hat).

Unfortunately, since ggplot seems to remember how an axis label got there, it cannot be changed by conventional ways. I am not a ggplot2 expert, but I suspect that you would not really need the scale_y_continuous function there, and life would become easier if you used +ylim() and +ylab() instead.

Best regards, Ulrike