Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Chapter 7: Neural Network

In this chapter, you will learn about neural networks, also called deep learning algorithms. These are some of the most powerful and widely used machine learning algorithms and you’d get to implement them and get them to work for yourself.

we’ll go over neural networks and how to carry out inference or prediction. If you were to go to the Internet and download the parameters of a neural network that someone else had trained and whose parameters that posted on the Internet, then to use that neural network to make predictions would be called inference. Then, you’ll learn how to train your own neural network.

Origins

Neurons, The Brain and Why now?

Human Brain vs Artificial Brain

Even though today’s neural networks have almost nothing to do with how the brain learns, there was the early motivation of trying to build software to mimic the brain.

Artificial Neural Networks are algorithms that try to mimic the brain.

So how does the brain work?

Illustration by Christy Krames, MA, CMI

Figure 7.1:Illustration by Christy Krames, MA, CMI Looie496 (n.d.)

Above is a diagram illustrating what neurons in a brain look like.

All of human thought is from neurons like this in your brain and mine, sending electrical impulses and sometimes forming new connections of other neurons.

Given a neuron like this one, it has a number of inputs where it receives electrical impulses from other neurons, and then this neuron will then send this outputs to other neurons by electrical impulses, and upper neuron’s output becomes the input to this neuron down below, which again aggregates inputs from multiple other neurons to then maybe send its own output, to yet other neurons, and this is the stuff of which human thought is made.

Simplified diagram of neuron

Figure 7.2:Simplified diagram of neuron

Here’s a simplified diagram of a biological neuron. A neuron comprises a cell body, nucleus, dendrites, axon. You don’t need to remember this, just keep the intuition of how you think in real. (Though we still don’t know how brain works!)

PartFunction
NucleusContains DNA and controls the neuron’s activities.
Cell body (soma)Maintains the neuron and integrates incoming signals.
DendritesReceive signals from other neurons.
AxonCarries electrical signals away from the cell body to other cells.

the artificial neural network uses a very simplified Mathematical model of what a biological neuron does.

Simplified diagram of artificial neuron

Figure 7.3:Simplified diagram of artificial neuron

What a neuron does is it takes some inputs, one or more inputs, which are just numbers. It does some computation and it outputs some other number, which then could be an input to a second neuron. When you’re building an artificial neural network or deep learning algorithm, rather than building one neuron at a time, you often want to simulate many such neurons at the same time. What these neurons do collectively is input a few numbers, carry out some computation, and output some other numbers.

even with these extremely simplified models of a neuron, we’ll be able to build really powerful deep learning algorithms.

Why Neural Networks and Why Now?

Why is it that only in the last handful of years that neural networks have really taken off?"

Over the last couple of decades, with the rise of the Internet, the rise of mobile phones, the digitalization of our society, the amount of data we have for a lot of applications has been rising. Every data is being digitalized like your health records, your bills, etc...

So in many application areas, the amount of digital data has exploded.

What happened to Traditional Learning Algorithms?

What we saw was with traditional machine-learning algorithms, such as logistic regression and linear regression, even as you fed those algorithms more data, it was very difficult to get the performance to keep on going up. So it was as if the traditional learning algorithms like linear regression and logistic regression, they just weren’t able to scale with the amount of data we could now feed it and they weren’t able to take effective advantage of all this data we had for different applications.

Why Now?

Figure 7.4:Why Now?

Let’s now dive more deeply into the details of how neural network actually works.

Demand Prediction

References
  1. Looie496. (n.d.). Illustration by Christy Krames, MA, CMI. US National Institutes of Health, National Institute on Aging.