/ THE IDEA
First, the model multiplies each input by a learned weight and adds a starting value. Call the resulting score z. A weight describes how strongly that input shifts the score. Then a smooth S-shaped function called the sigmoid maps z into a value between zero and one. At z = 0, the output is one half. Positive scores give values above one half; negative scores give values below it. Near the middle, a small score change has a noticeable effect. Far out on either side, the same change has less effect because the output is approaching a boundary.
THE FORMAL IDEA
p = 1 / (1 + e^(−z))
| p is the predicted probability of the chosen yes outcome, here late delivery. z is the model's numerical score. | | e is a constant approximately 2.718; raising it to a power produces the curved conversion. Neither p nor z has physical units here. |
|
RUN THE TINY EXAMPLE
Change one thing. Predict what happens.
Suppose the model gives a journey z = 0: p = 1/(1+1) = 0.50. Change one input so that the score increases to z = 1. p ≈ 1/(1+0.368) ≈ 0.731. If z rises again to 2, p ≈ 0.881, not 0.962.
|
The first score increase added about 0.231 to the probability. The second added only about 0.150. Equal additions to the score do not produce equal additions to probability. That shrinking response is a property of the chosen conversion, not evidence that the journey's input stopped changing.
/ SO WHAT?
The model can now make graded estimates instead of only yes-or-no guesses. A separate operating rule can decide which probability is high enough to trigger a warning. Changing that warning threshold does not retrain the weights or change the estimated probability; it changes what the service does with the estimate.
ONE CAVEAT |
| Being between zero and one does not make a prediction trustworthy. The inputs, training examples and evaluation determine whether those numbers correspond well to real frequencies; the sigmoid alone cannot guarantee that. |
KEEP THIS
The sigmoid turns an unrestricted score into a bounded estimate, with equal score changes producing smaller probability changes near the extremes.
|
NEXT: Why can adding a resistor increase the current?
|