This function computes the variable importance scores for a fitted BART (Bayesian Additive Regression Trees) model using a permutation-based approach. It measures the impact of each predictor variable on the model's performance by permuting the values of that variable and evaluating the change in performance (F-score is the performance metric).
variable_importance(bart_model, cutoff = 0, n_repeats = 10, seed = NULL)
A data frame where each column corresponds to a predictor variable, and each row contains the variable importance scores across permutations.
A BART model object.
A numeric threshold for converting predicted probabilities into presence-absence.
An integer indicating the number of times to repeat the permutation for each variable.
An optional seed for random number generation.