0
$\begingroup$

In R, the logistic regression output gives you predicted probabilities. Is there away of determining the threshold value $\alpha$, such that any $p > \alpha$ is classified as a $1$ and and $p \leq \alpha$ is classified as a $0$? Can the caret package do this?

$\endgroup$
  • 1
    $\begingroup$ $\alpha$ is determined based on your own needs. If your goal is classification accuracy, one option is to use cross validation to get the best $\alpha$ to maximize accuracy. With that said, when you're given the option it's always better to avoid using cutoffs and instead to phrase predictions in terms of expected loss (see: loss functions). $\endgroup$ – user44764 Jul 16 '14 at 18:53
  • $\begingroup$ See this excellent post about finding an optimal $\alpha$ (stats.stackexchange.com/questions/25389/…) $\endgroup$ – mike1886 Jul 16 '14 at 18:53
  • $\begingroup$ @Matthew: But it is required that the output values are 1 or 0. $\endgroup$ – svmguy Jul 16 '14 at 18:55
  • 1
    $\begingroup$ As far as I can see, the thread identified by @mike1886 is a duplicate of this one: both ask how to find the threshold used to convert the predicted value in a logistic regression into a classification. $\endgroup$ – whuber Jul 16 '14 at 19:02

Browse other questions tagged or ask your own question.