Closed madprogramer closed 1 year ago
Good idea. We can add a dimnames.shapviz<-
method, which would automatically give you also the possibility to use
colnames(shp) <- c("carat", "cut", "colour", "clarity")
Note to myself: don't forget SHAP interaction arrays.
Implemented in https://github.com/ModelOriented/shapviz/pull/99
Consider a simple force plot generated from the
diamonds
dataset:Because I currently live in Europe, I would like to change the
color=F
in this plot tocolour=F
as in UK ortography.Although the
shapviz
class defines an S3 method for colnames, there is no way to alter the colnames/dimnames because the class does not have array-like inheritance for the underlying matrix. Passing dimnames for both axes of the dimensions will also fail:Essentially, I want to be able to post-process the
shapviz
object for human readibility. Another use-case could be when working with categorical variables and using collapse (https://github.com/ModelOriented/shapviz/issues/7 ) where renaming variables before the shapviz object is generated might not be feasible.