Hello everyone! Are you interested in Deep Learning but don’t know how to get started? Here is a series through which we will learn the fundamentals of deep learning and subsequently learn to use Keras, a deep learning framework, to build neural networks. Ready to Roll? Let’s dive into it.

In this series, we will have the following:

- Introduction
- Fundamentals of a neural network
- Building the first neural network in Keras
- Building a neural network in Keras for a prediction task

**INTRODUCTION**

First let’s start by learning what is Machine Learning.

Machine Learning is everywhere.

Let’s get started through an example. Let’s say you are a product company and you want to find out how your new product that is yet to be launched at your company will fare in the market. Will it be liked or not? Now, how do we find this out even before the product is launched? The answer is Machine Learning!

Machine Learning(ML), a subcategory of AI, is an approach in which the code that the ML developer codes will aim to make the machine learning program (known as machine learning model) learn the requirements/rules on its own for a given problem and comes up with the results. Sounds magical! Isn’t it? In order to learn the rules and produce results, the model takes previously observed data. i.e., historical data of the problem as input. Once the machine learning program understands the pattern/rules in the given historical data, it applies the learned pattern/rules on the new data to find out the result for the new data.

So in our example, details about all the similar products that the company launched in the past will be given as the input to the model and the model finds out if the new product will be liked or not! Machine learning helps in making decisions by gaining insights through leveraging data.

Learning the pattern from historical data using mathematical techniques and applying it on each new data to find a target value is called machine learning. Here the developers do not code the rules, we simply input the historical data and algorithms that will help to learn the pattern, and the learning is done by the machine and hence the name machine learning!

So as we understand, since the machine learns the rules from the past data that is given, the quality and the size of data are very important for it to produce accurate results. If we do not have large data(ie. enough samples of past data) to learn, we should not think of machine learning solutions.

Machine Learning can be categorized into the following

**1. ****Supervised Learning** — The historical data (in ML world this historical data is known as training data) that is given to the machine learning model is going to also contain the target value (‘liked’ in our example. also refer to the table below) which the model will need to find for new data. For our example, the target is to find out whether the user ‘76886’ (see table below) with the mentioned salary and age will like the product. The model will learn the rule/pattern by understanding the relation between the target value and other values in the past data and will try to find similar patterns in the new data. If the pattern matches between the past data and new data, the corresponding past data’s target value will be assigned to the new data.

Eg: Past Data Samples

New Data set for which ‘Liked’ needed to be determined

Supervised Learning is further classified into Classification problem and Regression problem.

Classification problem is when the output that the model needs to find is categorical (i.e. the output would be one of the categories ). The example we saw belongs to the Classification problem because the model has to find out whether a product will be liked or not.

Regression problem is when the output that the machine needs to find is any real number value. Like in our example, if the machine learning model needs to find out the price of the new product.

**2. Unsupervised Learning** — If the historical data that we feed to the machine learning program does not contain the target value and the ask remains the same, i.e., the model needs to find patterns with the past data to find out the results, then the learning is known as unsupervised learning. But how does it do it when there is no target value in the past data? In unsupervised learning, the model will try to group the past data into clusters based on the pattern observed. The model will then try to find out which cluster the new data belongs to. Eg: Recommending a movie to a user. The unsupervised model clusters users based on what they have watched and attempts to find users with similar viewing habits and can then recommend movies based on the view list of the newly found similar viewer.

**3. Semi Supervised Learning** — In many problems, all of the past data might not have the target value. When such data (containing a set of data with the target value and a set of data without the target value) is given to the machine learning, it is known as Semi Supervised Learning.

**4. Reinforcement Learning** — Reinforcement learning focuses on maximizing score/points for an action performed. The program will be trained to give more scores for certain actions and less score for certain actions. The machine will learn the correct action by the scores earned in the previous actions. Reinforcement learning works well when learning to play a game.

**5. Transfer Learning — **In transfer learning , the machine learns to find solution to a problem that it was not trained for. Transfer learning is used when tuning a general model to a new domain.

Now, Let’s move on to Deep Learning. **Deep learning (or Neural Network) is a subset of Machine Learning that can be applied to all the above areas. **

Deep Learning uses a set of algorithms inspired by the structure and functions of human brain. We will learn more about it in our next article.

The below image helps us understand the basic difference between Machine Learning and Deep Learning Models.

Machine Learning Model to solve a problem needs:

- developers(Machine learning engineers) to define features from the data to be fed into the model.
- the ML developer will have to choose the best algorithm for the problem.
- not as big (training) data as required when compared to that the deep learning models require.

Deep Learning Model, on the other hand, to solve a problem needs:

- neural network to be defined (the features within the data best needed to solve the problem are determined by the network itself)
- tons of training data required for the neural network model to learn the pattern and hence require high computing power, a long time is required to train the model as compared to machine learning models but the results obtained using these models are highly accurate.
- neural Network models are hard to debug when the model produces incorrect results

And that is all for the Introduction. In our next article, we will move to the topic that is next in the series – ‘Fundamentals of a Neural Network’. Stay Tuned!

## Subscribe To Our Newsletter

Join our mailing list to receive the latest news and updates from our team.

## You have Successfully Subscribed!