What Is Machine Learning

Artificial Intelligence and Machine Learning are among the most trending technologies these days.  Artificial Intelligence teaches computers to behave like a human, to think, and to give a response like a human, and to perform the actions like humans perform.

What is Machine Learning?

As the name suggests, Machine Learning means the Machine is Learning.

This is the technique through which we teach the machines about things. It is a branch of Artificial Intelligence and I would say it is the foundation of Artificial Intelligence. Here we train our machines using data. If you take a look into it, you’ll see that it is something like Data Mining. Actually, the concept behind it is that Machine Learning and Data Mining are both data oriented. We work on data in both of situations. Actually, in data sciences or big data, we analyze the data and make the statistics out of it and we work on how we can maintain our data, how we can conclude the results and make a summary of it instead of maintaining the complete comprehensive bulk of data. But in Machine Learning, we teach the machines to make the decisions about things. We teach the machine with different data sets and then we check the machine for some situations and see what kind of results we get from this unknown scenario. We also use this trained model for prediction in new scenarios.

Machine Learning

We teach the machine with our historical data, observations, and experiments. And then, we predict with the machine from these learnings and take the responses.

As I already said, Machine Learning is closely related to data mining and statistics.

Data Mining -- Concerned with Analytics of Data.

Statistics -- Concerned with Prediction-Making/Probability

Why do we need Machine Learning?

In this era, we’re using wireless communication, internet etc. Using social media, or driving cars, or anything we’re doing right now, is actually generating the data at the backend. If you're surprised about how our cars are generating the data, remember that every car has a small computer inside which controls your vehicle completely, i.e., when which component needs the current, when the specific component needs to start or switch. In this way, we’re generating TBs (terabytes) of data.

But this data is also important to get to the results. Let’s take an example and try to understand the concept clearly. Let’s suppose a person is living in a town and he goes to a shopping mall and buys something. We have many items of a single product. When he buys something, now we can generate the pattern of the things he bought. In the same way, we can generate the selling and purchasing patterns of things of different people. Now you might be thinking about a random person who comes and buy something and then he never comes again, but we have  the pattern of things as well there. With the help of this pattern we can make a decision about the things people most like and when they come to the mall again. They will see the things they want just at the entrance, this is how we attract the customer with machine learning.

How Do Machines Learn?

Actually, machines learn through the patterns of data. Let’s start with the data sets of data, the input we give to the machine called X and the response we get is Y. Here we’ve 2 types of learning.

  • Supervised Learning
  • Unsupervised Learning
  • Reinforcement Learning

Supervised Learning

In supervised learning, we know about the different cases (inputs) and we know the labels (output) of these cases. And here we already know about the basic truths, so here we just focus on the function (operation) because it is the main and most important thing here.

Machine Learning


Here we just create the function to get the output of the inputs. And we try to create the function which processes the data and try to give the accurate outputs (Y) in most of the scenarios.

Machine Learning


Because we’ve started with known values for our inputs, we can validate the model and make it even better.

Machine Learning


And now we teach our machine with different data sets. Now it is the time to check it in unknown cases and generate the value.

Machine Learning


Let’s suppose you’ve provided the machine a data set of some kind of data and now you trained the model according to this data set. Now the result comes to you from this model on the basis of this knowledge set you’ve provided. But let’s suppose if you delete an existing item in this knowledge set or you update something then you don’t expect  the results you get according to this new modification you’ve made in the data set. 

How Supervised Learning Works?

Let’s take an example here of iPhone. Let’s suppose different customers purchase the iPhone in different years and its price gradually increases.

Machine Learning
Image Credit Goes To TowardsDataScience


Here is the general image for any model. Here we can see how many cases we have  here. Let’s suppose different customers purchase the iPhone with different prices and we know each year, its price increases. We already know that the thing which is independent comes horizontally in the graph and vertical represents the dependent thing. So prize works vertically in the graph. Now draw a line which touches the maximum points. This straight line is the supervised learning of your model. Your model can take a decision, if the next version of iPhone comes in the next year how much the prize it will be. This is how we’re predicting the values of the things. Although it is not so accurate but it is approximately near to the things.

Unsupervised Learning

It is quite different from supervised learning. Here we don’t know about the labels (output) of different cases. And here, we train the model with patterns by finding similarities. And then these patterns become the cluster.

Cluster = Collection of Similar Patterns of Data

And then, this cluster is used to analyze and to process the data.

Machine Learning


In unsupervised learning, we really don’t know if the output is right or wrong. So here in this scenario, the system recognizes the pattern and tries to calculate the results until we get the nearly right value.

Example of Machine Learning

Machine Learning basically is a problem solving tool. Like if you play a chess game on a computer or even on a mobile phone then the computer knows about different steps and what steps he would perform after you, the computer knows. Here, we’ve trained our machine to play chess with the user.

Reinforcement Learning

It is like reward based learning. The example of reward based is, suppose your parents will give you a reward on the completion of a specific task. So here you know you’ve to complete this task and how much it is necessary for you. Here the developer decides himself what reward he’ll give on the completion of this task.

It is also feedback oriented learning. Now you’re doing some tasks and on the basis of these tasks, you’re getting feedback. And if the feedback is positive then it means you’re doing it right and you can improve your work on your own. And if the feedback is negative then you know as well what was wrong and how to do it correctly. And feedback comes from the environment where it is working.

It makes the system more optimal than the unsupervised scenario. Because here we have some clues like rewards or good feedback to make our system more efficient.

Steps in Machine Learning

There are some key point steps of Machine Learning, and ow we start to teach the machine.

  • Collect Data
    As we already know  Machine Learning is data oriented. We need data to teach our system for future predictions.
  • Prepare the Input Data
    Now you’ve downloaded the data but when you’re feeding the data then we need to make sure of the particular order of the data to make it meaningful for our Machine Learning Tool to process it; i.e. .csv file (comma separated value). This is the best format of the file to process the data. Because comma separated values help a lot in clustering.
  • Analyzing Data
    Now, you’re looking at the patterns in the data to process it in a better way. We’re checking the outliers (scope & boundaries) of the data. And we’re also checking the novelty (specification) of the data
  • Train Model
    This is the main part of the Machine Learning when we’re developing the algorithm where we are structuring the complete system with coding to process the input and give back the output.
  • Test the Model
    Here you’re checking the values you’re getting from the system whether it matches your required outcome or not.
  • Deploy it in the Application
    Let’s discuss an example of Autonomous Cars (automatic cars) which don’t have human intervention, which run on their own. The first step is collect the data, and you have to collect many kind of data. You’re driving the car which runs on its own then it should know the road signs, it should have the knowledge of traffic signals, when the people crossing the road then it can make the decision to stop or run in different situations. So we need a collection of images of these different situations, it is our Collect Data Module.

Now we have to make the particular format of data (images) like csv file where we store the path of the file, the dimensions of the file. It makes our system processing efficient. This is what we called preparing the data.

And then it makes the patterns for different traffic signals (red, green, blue), for different sign boards of traffic and for its environment like car or people running around it. And then it decides the outlier of these objects whether it is static (stopped) or dynamic (running state). And then it can make the decision to stop or to move in the side of another object.

These decisions are obviously dependent upon training the model, and what code we write to develop our model. This is what we say training the model and then we test it and then we deploy it in our real world applications.

Applications of Machine Learning

Machine Learning is widely used today in our applications.

  • You might use the Snapchat or Instagram app where you can apply the different animal's body parts on your face like ears, nose, tongue etc. These different organs places at the exact right spot in the image, this is an application of Machine Learning.

  • Google is a widely used AI, ML. Google Lens is an application if you scan anything through Google lens then it can tell the properties and features of this specific thing.

  • Google Maps is also using Machine Learning. Like if you’re watching any department store on the map then sometimes it is telling to you how much it is branded, and how expensive it is.