dragons <- DALEX::dragons[1:100, ]
lm_model <- lm(life_length ~ ., data = dragons)
lm_audit <- audit(lm_model, data = dragons, y = dragons$life_length)
check_residuals(lm_audit)
if (FALSE) {
library("randomForest")
rf_model <- randomForest(life_length ~ ., data = dragons)
rf_audit <- audit(rf_model, data = dragons, y = dragons$life_length)
check_residuals(rf_audit)
}
Run the code above in your browser using DataLab