Archive — one question answered
Weights and bias in one neuron
What does z = w·x + b mean when filtering spam?
One neuron computes a weighted sum plus bias. For features , weights and :
The sign of each weight tells the direction: on link count — more links pull down in the course spam example. on unknown sender is the strongest cue.
Changing from to while keeping adds to every : bias shifts the threshold for all emails, even when . Beginners often treat bias as a fourth weight — but is always added.
In training code, and are parameters updated by gradient descent. Separating them helps you read a spam model as something inspectable, not a black box. After training, plotting next to feature names shows which words the model actually learned to fear — the course’s first “interpretability” win. Lesson two walks through the same , , and numbers on the toy inbox so you can trace every multiplication on paper.