Artificial neuron in 3D
Move the weights of one neuron and watch the chance that the next letter is a vowel.
What this lab shows
An artificial neuron adds up its inputs, each multiplied by a weight, and passes the total through a curve that returns a number between 0 and 1. Here the inputs are two questions about the previous letters, and the output is the chance that the next letter is a vowel. The 3D surface shows the answer for any combination.
A tiny neuron, really trained with numpy on simple sentences in Portuguese. The numbers are its own, not those of a large language model.
How to use it
- Type a text and watch the neuron make its guess letter by letter.
- Change the weights and the bias and watch the surface tilt.
- Press Train and follow the error going down until the neuron stops improving.
| Last letter | Second-to-last letter | Chance of a vowel (neuron) | Times a vowel came up in training |
|---|---|---|---|
| vowel | vowel | 3.8% | 8.8% |
| vowel | consonant or space | 20% | 20% |
| consonant or space | vowel | 46% | 46% |
| consonant or space | consonant or space | 85% | 85% |
Example calculated with the trained network (the interactive version needs JavaScript).
The lab could not load. The summary above still applies.
Books that use this lab
No published book uses this lab yet.