top of page

Day 12: Decision Boundary

In logistic regression, decision boundary is a line that separates class A from class B

let's take a look at an example:


from the example plot above, the blue line is the decision boundary, separating y=1, from y= 0


To recap from yesterday, the logistic regression's function is g(z), and it's going to output a value between 0 to 1, it may output values such as 0.7 or 0.3

What if we want the learning algorithm to predict value of 0 or 1? We will set a threshold in this case, and let's say we want to set the threshold to 0.5:

  • to get a prediction (y=0 or y=1) from a logistic regression model, we can use the following heuristic: if f(x) >= 0.5, predict y=1, if f(x) < 0.5, predict y=0

If we were to plot this, it will look like this:



Recent Posts

See All

Day 39: Tree Ensembles

Using Multiple Decision Trees One of the weaknesses of using a single decision tree is that decision tree can be highly sensitive to small changes in the data. One solution to make the algorithm less

Comments


bottom of page