Kind of a broad question here. But is it okay/possible in R to use a random forest for regression when the response variable is a binary outcome? Essentially what I'm looking for is a probability of something happening. Below is the code I've been using it run it and the warning message. Or am I better off using this in classification mode. My end goal is to predict the probability of something happening, not necessarily predict what "classification" it will be, 1 or 0.
m1RF <- randomForest(EOI_140 ~ .,
data = dfTRN,
importance = TRUE,
ntree = 2000)
Warning message:
In randomForest.default(m, y, ...) :
The response has five or fewer unique values. Are you sure you want to do regression?
I apologize if this question is in the wrong place.