avatarMike Wolfe

Summarize

A Deeper Dive into Neural Networks

What are they and how are they used?

Photo by Alina Grubnyak on Unsplash

A while back I wrote an article about Deep Learning in Data Science. In that article, I briefly mentioned Neural Networks and their basic goal. However, as I am learning more about Data Science I realize just how often Neural Networks can be used, and their overall effectiveness in developing a strong AI. That is why I decided to take another look into Neural Networks. By learning more details, and diving deeper into the content, we can start to understand how this method can be a game changer for Machine Learning. If we start from the beginning, we know that computers and a human brain may be structured in a similar pattern, but they operate differently. The goal of this article will be to explain more about how neural networks make a machine’s decision process more like the human brain, and how they can aid machine learning to make new connections independently. So, without any further delay, let’s dig more into neural networks.

Neural Networks and the Human Brain

Despite having millions or even a few hundred million transistors connected to a computer, the human brain has numerals times more cells that work together to store information and make decisions. Computers are meant to store data, even meaningless data. The process for storing information on a computer is simple in comparison, as there are not as many steps to take. The human brain, on the other hand, is much more complex. Although the goal is to put memories or other data into storage, the human brain has a much more roundabout way of storing data. To keep it simple, it could be because we don’t take information at face value. We compare new information to what we knew beforehand and include emotions in the mix. These comparisons promote constant learning, and can even shift old memories into different perspectives. While you have a partner, you remember everything wonderful, but once they are your ex suddenly you’re only remembering the bad times. Teaching a machine to think the same way would be extremely difficult, but that is where neural networks come in.

How Neural Networks Work

In Machine Learning, we have a series of inputs that would be sorted, classified, categorized, clustered, (etcetera), into outputs. Deep Learning adds another hidden layer between each. This hidden layer could be the neural network. One thing to note is that a true neural network is a brain, so in machine learning it is technically an Artificial Neural Network, meaning it simulates the way a real neural network would work.

The main difference is that a true neural network can make decisions with rich criteria. Follow me for a moment, when I say rich I’m just thinking complex. Emotions, old memories, all that good stuff. There could also be a little bit of indecision that could change the way you make your final decision. And even though you might learn what gives you the best outcome, people sometimes choose to maybe make the wrong decision because they feel it has better results, even though there could be consequences. A machine will only make that type of decision when it is experimenting to find the best results. In addition, although it does take past results into mind, we are still working with a machine. That means working in the binary. Instead of our yes/no/maybe so, we are working with 0’s and 1’s, just a yes or no.

One article by Chris Woodford had a great example to explain about how to classify a chaise longue as either a table or chair. In his example, they have an image of 25 chairs and 25 tables. He posed a series of five binary (yes/no) questions: Does it have a back? Does it have a top? Does it have soft upholstery? Can you sit on it comfortably for long periods of time? Can you put lots of things on top of it? Your binary yeses would be represented as a 1, and your binary no’s would be a 0. They also provided answers for each. For a chair, you would answer the questions with 10110 (Yes, No, Yes, Yes, No). The table’s answers would be 01001 (No, Yes, No, No, Yes). The computer could use these binaries to compare the results of the chaise lounge, then determine which it would be more like. For example, the binary would be 10111. The lounge has much more in common with a chair, so it would then be classified as a chair rather than a table.

But how does it make these binary decisions? Recall that we mentioned that it is artificially making decisions, so a computer would need to simulate a thought process. To do so, we use formulas in the software. An example of formulas with Linear regression would look something like this:

Weights are also assigned to variables. The weights can help put importance on different criteria. An example of why you may choose to weigh criteria differently is when you are searching for a home. Maybe you have a certain budget, but you also need a certain number of rooms. Maybe you need no less than three bedrooms. In that scenario, a realtor may suggest homes slightly higher than your selected price range, just so you can view a property that has the necessary number of bedrooms. You might choose to go a little out of your budget to meet the criteria, meaning it is weighed as less important than the number of rooms. For a realtor, it’s easy to separate homes based on more important criteria. But if you’re using machine learning, what would that look like? To visualize, let’s look at this photo from IBM:

Within the hidden layers, you can see multiple nodes, or points data will pass through to make the decisions. In each connection, a node will send different data items and numbers. At first, they would be set to random numbers, which become more accurate as it is trained. The numbers are multiplied by the associated weight. The products are added together and compared against a threshold. If the result is above the threshold, the node would send the data to all the outgoing connections. But how many nodes would data pass through? That depends on the complexity, or how many layers the neural network has.

Neural networks can be simple, or more complicated. For example, the number of hidden layers can range. A basic network would consist of two or three layers. Anything more than that could then be considered deep learning. Although deep learning and neural networks are sometimes used interchangeably, the number of layers ultimately differentiates them. Your neural network could be deep learning, or it could be a basic network.

All of these pieces work together to help a machine make decisions similar to how a human brain works. An artificial neural network does not entirely work the same way, but by getting close, decisions can be made in a human-like manner.

Conclusion

In machine learning, neural networks aim to create a decision-making process more like the human brain. It uses nodes to pass data along, which operate in a hidden layer. The network can be basic or more complex. The more complex, or deep learning, the more human-like the decision-making process may become. However, remember that even though a computer is making more complex decisions, it is still working with binary output for comparisons. Hopefully, neural networks are a little easier to understand after reading this article. I hope you also found this interesting. If you have ever tried using a neural network, I would love to hear about it in the comments. Until next time, cheers!

Read all my articles for free with my weekly newsletter, thanks!

Want to read all articles on Medium? Become a Medium member today!

Check out some of my recent articles:

References:

Machine Learning
Data Science
Neural Networks
Artificial Intelligence
Ml So Good
Recommended from ReadMedium