Lensa ML
Lensa ML

Bias & Decision Boundaries

Step 1 of 6

What Is Bias?

The shift in a neuron's output

0.5σ(0+b) = 0.500σ(x + b)σ(x) no biasx
Biasb = 0.0
BIAS
0.0
σ(0+b)
0.500
SHIFT
none

The bias shifts the sigmoid curve horizontally. Without bias, the sigmoid crosses 0.5 exactly at x = 0. The bias lets us adjust this crossing point.

Step 1 of 6: What Is Bias?

The shift in a neuron's output

0.5σ(0+b) = 0.500σ(x + b)σ(x) no biasx
Biasb = 0.0
BIAS
0.0
σ(0+b)
0.500
SHIFT
none

The bias shifts the sigmoid curve horizontally. Without bias, the sigmoid crosses 0.5 exactly at x = 0. The bias lets us adjust this crossing point.

Step 2 of 6: Without Bias

Boundaries must pass through the origin

-3-2-1123x₁x₂origin (0,0)
Rotate boundary45°
ACCURACY
95%
ANGLE
45°
CONSTRAINT
Through (0,0)

Without bias, the boundary must pass through the origin. You can only rotate it — never shift it. Some points are impossible to classify correctly because the boundary can't move to where it's needed.

Step 3 of 6: With Bias

Shifting the boundary freely

-3-2-1123x₁x₂
w₁+1.00
w₂+0.50
bias0.00
WITH BIAS
95%
NO BIAS
95%
IMPROVEMENT
+0

With bias, the boundary can translate freely. The dashed line shows where the boundary would be without bias. Adjust the bias to shift the boundary and improve accuracy.

Step 4 of 6: Bias in 2D

Two inputs, one boundary

-3-2-1123x₁x₂1.2x₁ + 0.8x₂ + 0.3 = 0
w₁+1.2
w₂+0.8
bias+0.3
ACCURACY
95%
CORRECT
38/40
MISCLASSIFIED
2

In 2D, the boundary is the line w₁x₁ + w₂x₂ + b = 0. The weights control the line's angle, and the bias controls its position. The green and red regions show where the neuron outputs 1 vs 0.

Step 5 of 6: Multiple Neurons

Combining boundaries

-3-2-1123x₁x₂Neuron 1Neuron 2Neuron 3
Hidden neurons3
NEURONS
3
BOUNDARIES
3
ACCURACY
95%

With 3 neurons, the network creates 3 decision boundaries. The shaded regions show the combined output — the output neuron merges all hidden neurons into a single non-linear decision surface.

Step 6 of 6: The XOR Solution

Two boundaries, one answer

-3-2-1123x₁x₂One boundary cannot solve XOR
LAYERS
1
ACCURACY
55%
SOLVABLE?
No

XOR is not linearly separable — no single straight line can separate the green from red points. The perceptron (one layer) cannot solve it. Yellow-ringed points are misclassified.