DEV Community

EhteshamAli
EhteshamAli

Posted on

Why Do Neural Networks Use y = w * x + b?

A neuron in a neural network uses this equation:

y = w * x + b
Enter fullscreen mode Exit fullscreen mode

Because real life usually has a starting value, not zero.

Think of it as:

Output = (rate Γ— amount) + base value

Simple Real-Life Examples

  1. Taxi Fare πŸš•
  • $5 per km
  • $20 base fare
fare = 5 * km + 20
Enter fullscreen mode Exit fullscreen mode

Even at 0 km, you still pay $20 β†’ that’s b.

  1. Salary πŸ’°
  • $10 per hour
  • $100 fixed pay
salary = 10 * hours + 100
Enter fullscreen mode Exit fullscreen mode

Work 0 hours? You still earn $100.

What This Means in Deep Learning

x β†’ input

w β†’ importance (rate)

b β†’ starting value

y β†’ output

Without + b, the model is forced to start at zero, which doesn’t match real data.

Top comments (0)