title: R How to quickly get decision boundary for logistic regression
body: <p>We know how to plot decision boundaries for logistic regression and other classifier methods, however, I am not interested in a plot; but rather I want the exact value at which the binomial prediction is .50.</p>
  
  <p>For example:</p>
  
  <pre><code>train=data.frame(1:20)
  train$response=rep(1:0,10)
  model=glm(response ~ poly(X1.20, 2), data=train, family=binomial)
  
  
  train$X1.20[1]=10.5
  predict(model, train[1,], type="response")
  </code></pre>
  
  <p>Leaves me with a decision boundary of 10.5 which I can find through trial and error with the predict() function, meaning a value of 10.5 for the independent variable gives a response of exactly .50. Is there an automated way to find what value will give a response of .50?</p>