0

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?

svmguy
  • 149
  • 2
  • 8
  • 1
    $\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](http://en.wikipedia.org/wiki/Loss_function)). –  Jul 16 '14 at 18:53
  • See this excellent post about finding an optimal $\alpha$ (http://stats.stackexchange.com/questions/25389/obtaining-predicted-values-y-1-or-0-from-a-logistic-regression-model-fit/25398#25398) – mike1886 Jul 16 '14 at 18:53
  • @Matthew: But it is required that the output values are 1 or 0. – svmguy Jul 16 '14 at 18:55
  • 1
    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. – whuber Jul 16 '14 at 19:02

0 Answers0