Lesson 2.2 · 7 min read · about 50 min to master at a very slow pace
Decision Boundaries and Linear Separability
A neuron with a threshold activation splits the input space with a straight line (a hyperplane). Which problems that can solve: AND and OR worked through, and the definition of linear separability.
The decision boundary
With a sign activation, the neuron outputs when and when . The decision boundary is where :
In 2 dimensions this is a line, in 3 a plane, in a hyperplane. The weight vector is perpendicular (normal) to it and points towards the side classified ; the bias moves it away from the origin.
Linear separability
Two classes are linearly separable if some and put every positive example on one side and every negative example on the other: for all positives and for all negatives. A single neuron can only solve linearly separable problems.
AND and OR are separable
| AND: | OR: | |
|---|---|---|
| (0, 0) | −1.5 → −1 | −0.5 → −1 |
| (1, 0) | −0.5 → −1 | 0.5 → +1 |
| (0, 1) | −0.5 → −1 | 0.5 → +1 |
| (1, 1) | 0.5 → +1 | 1.5 → +1 |
Same weights, different bias: the bias slides the line, turning AND into OR. XOR (true when exactly one input is 1) puts the two positives on opposite corners, and no line separates them. The next lesson proves it.
Exam phrasing
"A dataset is linearly separable if a hyperplane can separate the classes without error. AND and OR are linearly separable; XOR is not."
Stuck? Common doubts
Questions real learners asked while studying this lesson. They stay closed so they don't spoil your own thinking: open only the ones you need.
First passWhy is perpendicular to the boundary?
Take two points and on the boundary: and . Subtracting gives , so is at right angles to every direction along the boundary. Moving in the direction of increases fastest, which is why points to the positive side.
Cheatsheet
Decision boundary
Separable or not
Check your understanding
Score 75% or more to master this lesson and earn XP. Answer first, then check.