Skip to content
Neural networks · 1 of 5 · Python · With a year

Build a single neuron

A neuron is the building block of a neural network, and it does two things you already know. First it takes a weighted sum of its inputs and adds a bias, exactly like the linear model. Then it passes that one number through an activation function. With sigmoid as the activation, the output is a number between 0 and 1 that can be read as how strongly the neuron says yes.

About this lesson

Words to know

neuron
The basic unit of a network: a weighted sum of its inputs plus a bias, passed through an activation function.
dot product
Multiply two lists of numbers position by position and add up the results. It gives one number.
sigmoid
The function 1 / (1 + e^(-x)). It squeezes any number into the range 0 to 1.

Why it matters

A layer is many neurons reading the same inputs, each with its own weights. The next two lessons work out how a neuron's weights should change when its answer is wrong.

With a year

How it works, a worked example, the exercise with its tests, three hints and the explained solution are in the app, with a year of Algo150 for $19. The first chapter, Math foundations, is free for everyone: start with Follow a gradient.

What a year includes