Loading video player…

Building a Neural Network & Making Predictions (Overview)

If you’re just starting out in the artificial intelligence (AI) world, then Python is a great language to learn since most of the tools are built using it. Deep learning is a technique used to make predictions using data, and it heavily relies on neural networks. This course will show you how to build a neural network from scratch.

In a production setting, you would use a deep learning framework like TensorFlow or PyTorch instead of building your own neural network. That said, having some knowledge of how neural networks work is helpful because you can use it to better architect your deep learning models.

In this course, you’ll learn:

  • What artificial intelligence is
  • How both machine learning and deep learning play a role in AI
  • How a neural network functions internally
  • How to build a neural network from scratch using Python
Download

Sample Code (.zip)

23.0 KB
Download

Course Slides (.pdf)

642.7 KB

00:00 Welcome! In this course, you will learn some of the basics of artificial intelligence and you will learn about one of the most popular implementations of artificial intelligence, the neural network.

00:11 You’ll also build a simple neural network from scratch using Python and train it to make predictions.

00:20 The goal of artificial intelligence is to make predictions given a set of conditions. This is actually easier than it might sound. If you ask me the sum of 2 and 2 and I tell you it’s 5, that’s a prediction. Now, it’s an inaccurate prediction—the correct answer, of course, and correct prediction would be 4—so a better goal might be to make predictions that mimic human response.

00:46 And notice that I said human response, not human intelligence, because there are many ways to predict the sum of 2 and 2. One of them is a set of conditional statements.

00:58 Take a look at this short Python script that would predict the sum of two numbers.

01:04 Obviously, this is not the most efficient way to add two numbers, but if the range of the numbers is 0 to 2 inclusive, it’ll work. However, essentially, artificial intelligence is about discovering rules that will make predictions to mimic human response, and this set of conditionals will describe rules to add two numbers.

01:26 Now, a better approach might be to use machine learning or even deep learning. In the script that you just saw, the rules are hard-coded using Python statements, and as you can imagine, being thorough using this tactic would be a challenge.

01:41 Therefore, with machine learning and deep learning, you’ll provide representative examples of what you want to predict. So you would show a machine-learning algorithm sums of many different pairs of numbers.

01:53 The algorithm would analyze them for commonalities and eventually discover the rules to be able to predict the sum of any two numbers. The result of analyzing the examples or training data is a model.

02:07 So we could say that the goal of machine learning is to train a model that will make predictions to mimic human response without being explicitly programmed. Here’s a diagram that explains the process.

02:21 First, you start off with the training data—again, the examples. Then the machine learning algorithm trains the model based on the training data. After that, you use the model to make new predictions based on data that was not used during the training process. This is important.

02:40 The model should be able to make accurate predictions on data it has not seen.

02:46 One problem that arises in machine learning is how to represent data. Computers like numbers, and it’s often necessary to convert data into numbers so that a computer can process it. Take, for example, text data, such as the sentence “Dave watched as the forest burned up on the hill.”

03:06 Two of these words, “watched” and “burned,” are inflected forms. For example, the base form of “watched” is “watch.” Producing an inflected form to the base is called lemmatization and is a common task in natural language processing.

03:24 After you apply lemmatization to the sentence, you can take the number of times each word appears in the sentence, and these frequency counts will convert the text to numeric features using what’s called a bag-of-words model.

03:38 This process, called feature engineering, is a common task in machine learning.

03:44 You may have heard about deep learning since it’s a hot topic in AI right now. Deep learning applies neural networks to machine learning and automates feature engineering. As deep learning deals with more complex data such as images, automating the feature engineering process improves the performance and accuracy of models. In the next lesson, you’ll begin to learn about neural networks.

Avatar image for Patrick

Patrick on Jan. 19, 2022

Sometimes I have a problem watching the videos because of the white background just something you should consider making the videos with a dark background really helps on my eyes

Become a Member to join the conversation.