A linear score z pushed through the sigmoid. The heatmap is the model's probability; the arrow is the weight vector, always perpendicular to the boundary. Hover w₁ in the formulas and watch the arrow answer.
class 0class 1filled = train, hollow = testhover to probe · click to pin
step 0BCE —train acc —test acc —
Spaceplay/pauseSstepRreset
Data
datasetpoints150noise0.15seedsplitmouse
Linear score
z=w1x1+w2x2+b=z
Sigmoid
P(y=1∣x)=σ(z)=1+e−z1=p
The decision boundary is the line where z = 0, i.e. p = 0.5.
Binary cross-entropy
L=−n1i∑[yilogpi+(1−yi)log(1−pi)]=L
Gradient
∂w∂L=n1i∑(pi−yi)xi[∂w1,∂w2,∂b]
What's simplified here
Full-batch gradient descent only — no momentum, no second-order methods.
Two features and two classes; multinomial softmax is out of scope for this page.