Of course, 9 lines is a little dense, even with numpy. In practice, I got more understanding out of the slightly longer version that clocks in at 74 lines including comments and empty lines. This is an enormously simple neural network: a single layer with just 3 neurons. My son described its intelligence as being less than a cockroach after it'd been stepped on.
It works though. It's able to accurately guess the correct response for the trivial pattern it's given. You can follow the logic through so you understand each simple step in the process. In a follow up blog post, there's a slightly smarter neural network with a second layer and a mighty 9 neurons.
These examples are very approachable. It's about as simple a neural network as you can get. If you're new to machine learning, understand how it works helps illuminate the more sophisticated networks described in Martin Görner's presentation.
Of course, 9 lines is a little dense, even with numpy. In practice, I got more understanding out of the slightly longer version that clocks in at 74 lines including comments and empty lines. This is an enormously simple neural network: a single layer with just 3 neurons. My son described its intelligence as being less than a cockroach after it'd been stepped on.
It works though. It's able to accurately guess the correct response for the trivial pattern it's given. You can follow the logic through so you understand each simple step in the process. In a follow up blog post, there's a slightly smarter neural network with a second layer and a mighty 9 neurons.
These examples are very approachable. It's about as simple a neural network as you can get. If you're new to machine learning, understand how it works helps illuminate the more sophisticated networks described in Martin Görner's presentation.