I am trying to find SHAPs of a random forest model! I am using the "explain" function and this is the code:
exp_forest <- fastshap::explain(my_model,X = subset(train_data, select = -training_target),pred_wrapper= predict,nsim = 1)
But I get this error:
no applicable method for 'predict' applied to an object of class "randomForest" Calls: ... lapply -> FUN -> explain_column -> pred_wrapper -> predict Execution halted
Any Idea?
Thanks in advance