I've been looking at leverage plots, but it seems to me that they are always related to linear regression models.
For instance, this explanation of a hat matrix considers a linear regression model: Hat matrix and leverages in classical multiple regression
Does it make sense to calculate leverages if we are using, say, a random forest regressor? Or are there more appropriate measures to identify X-outliers that are model independent, such as: https://scikit-learn.org/stable/modules/outlier_detection.html