filmov
tv
Python Tutorial : Introduction to Deep Learning in Python

Показать описание
---
Imagine you work for a bank, and you need to build a model predicting how many transactions each customer will make next year. You have predictive data or features like each customer’s age, bank balance, whether they are retired and so on. We'll get to deep learning in a moment, but for comparison, consider how a simple linear regression model works for this problem. The linear regression embeds an assumption that the outcome, in this case how many transactions a user makes, is the sum of individual parts. It starts by saying, "what is the average?" Then it adds the effect of age.
Then the effect of bank balance. And so on. So the linear regression model isn't identifying the interactions between these parts, and how they affect banking activity.
Say we plot predictions from this model.
We draw one line with the predictions for retired people, and another with the predictions for those still working.
We put the current bank balance on the horizontal axis, and the vertical axis is the predicted number of transactions.
The left graph shows predictions from a model with no interactions. In that model, we simply add up the effect of the retirement status, and current bank balance. The lack of interactions is reflected by both lines being parallel. That's probably unrealistic, but it's an assumption of the linear regression model.
The graph on the right shows the predictions from a model that allows interactions, and the lines don't need to be parallel. Neural networks are a powerful modeling approach that accounts for interactions like this especially well. Deep learning, the focus of this course, is the use of especially powerful neural networks. Because deep learning models account for these types of interactions so well, they perform great on most prediction problems you've seen before. But their ability to capture extremely complex interactions also allow them to do amazing things with text, images, videos, audio, source code and almost anything else you could imagine doing data science with.
The first two chapters of this course focus on conceptual knowledge about deep learning. This part will be hard, but it will prepare you to debug and tune deep learning models on conventional prediction problems, and it will lay the foundation for progressing towards those new and exciting applications. You'll see this pay off in the third and fourth chapter.
You will write code that looks like this, to build and tune deep learning models using keras, to solve many of the same modeling problems you might have previously solved with scikit-learn. As a start to how deep learning models capture interactions and achieve these amazing results, we'll modify the diagram you saw a moment ago.
Here there is an interaction between retirement status and bank balance. Instead of having them separately affect the outcome, we calculate a function of these variables that accounts for their interaction, and use that to predict the outcome.
Even this graphic oversimplifies reality, where most things interact with each in some way, and real neural network models account for far more interactions. So the diagram for a simple neural network looks like this.
On the far left, we have something called an input layer. This represents our predictive features like age or income.
On the far right we have the output layer. The prediction from our model, in this case, the predicted number of transactions. All layers that are not the input or output layers are called hidden layers. They are called hidden layers because, while the inputs and outputs correspond to visible things that happened in the world, and they can be stored as data, the values in the hidden layer aren't something we have data about, or anything we observe directly from the world. Nevertheless, each dot, called a node, in the hidden layer, represents an aggregation of information from our input data, and each node adds to the model's ability to capture interactions. So the more nodes we have, the more interactions we can capture.
#DataCamp #PythonTutorial #IntroductiontoDeepLearninginPython