4
$\begingroup$

The randomForest package in R software includes outlier function for the detection of outliers. This function uses proximity matrix or randomForest object for the outlier detection. The manual says that the type of the randomForest object can not be regression? Why is it so that this function can be used for classification models only? Is there a reasonable way to detect outliers in regression models?

$\endgroup$
1

1 Answer 1

4
$\begingroup$

Basic idea behind this outlier score is how far an object is from a centroid of its predicted class, thus it makes little sense for regression.
Yet you can still produce proximity from regression RF by putting proximity=TRUE argument to the call to randomForest and then force outlier detection on it by calling outlier(<rf object>$proximity), but this will only make assumption that all objects are from one class.

A bit less hopeless idea is to just convert regression problem to classification by splitting continuous decision into several intervals with cut or Hmisc::cut2 and doing outlier detection on this -- but I have never tried it.

$\endgroup$
1
  • $\begingroup$ Thank you for explaining that the outlier score is relative to the cluster centroids. I had impression that this was relative to other compounds. Now this restriction makes sense. I'll try to experiment with your other suggestions. $\endgroup$
    – JooMing
    Oct 12, 2011 at 7:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.