Machine Learning is a field that is at the forefront of computing today. In fact, it is omnipresent in the computing world! Even if you’ve never heard of Machine Learning before, you use it many times (in a day!) without probably even realizing it! You make a Google search. There’s Machine Learning running in the background which ranks the results (so that you see the most relevant results first). You log in to your email account. It is Machine Learning that determines which emails should appear in your inbox and which ones in your spam folder.
Did you know? Machine Learning, or ML for short, is being used today to make driver-less cars, predict emergency room waiting times, identify whales in oceans based on audio recordings (so that ships can avoid hitting them), and make intelligent recommendations on which movie one should watch next on services such as Netflix.
What is Machine Learning?
Put simply, Machine Learning is, making computers learn from past experience. The concept of ML is, in essence, very much like we humans learn. Think of how we learn to walk. As infants, we found it difficult to walk, but as we grew, we learnt from our experiences of falling and taking bad steps. But eventually, after some time, our brains learn to walk comfortably, and thus we become the faultless walkers that we are now.
Similarly in ML, such experiences serve as data. (For example- this data could be information from the sensors of a car as it learns to drive.) Thus, we use past data to make the computer learn. Based on this “learning”, it makes predictions about future events.
How does a computer learn?
There are different types of learning, but we will discuss those in the next section. For now, let’s know how a computer learns, in a general sense, with the help of an example.
Let’s say you want to predict whether a person will be hired for a certain job position or not. Then how would you go about making such a predictive model? Well, we can break the complete process down to five main steps.
Getting the past data of people, who were hired or rejected for the same job position, on factors such as educational qualifications, previous work experience, etc.
Cleaning, preparing or manipulating the data collected. This step involves converting the data into a form that the computer can operate on. So, in our example, we would convert everything to numerical data. This would include converting the yeses and noes (for work experience) to 1’s and 0’s (i.e. binary form) and dividing educational qualifications into groups (say, Masters, Bachelors, Higher Education, etc.) and assigning a number to each group.
Building a mathematical model of the data. In our example, we have (what we call in ML lingo) a classification problem, i.e., we need to classify a person into one of two categories; whether they are going to be hired or not. A mathematical model allows us to succinctly define our data. The different parameters of this model can then be tweaked as per what we learn from our data. This would help us make the best possible predictions. This step is called training.
Using this model to make predictions. We can validate our model by running it on the same data that we used in training and then test the accuracy of our model by running it on the test data, i.e., data that the model has not been introduced to, before. This is called testing.
Making further improvements to decrease the error in our model and thus increase the accuracy.
Types of Learning
There are different types of learning. The type of learning you use depends on the specific problem(s) you are trying to solve.
1. Supervised Learning
This is the most common type of learning. Here, you provide the computer with sample data where the output is clearly defined. Recall our example in the last section where we had previous data that we used to “supervise” the learning procedure. Here we tell the computer what the “right” answer is, thus acting as its teacher. Two problems that you’d want to use this kind of learning for are classification and regression problems.
2. Unsupervised Learning
Here, we don’t make the computer learn explicitly. Instead, we give it data and allow it to find underlying structures or patterns in it. Clustering is a problem for which unsupervised learning can be used.
Unsupervised learning is often used in aggregation. For e.g., Google news aggregates news articles (from various sources) on different topics. It then clubs the related topics to form a cluster. Thus enabling the user to find a host of articles on a certain topic. Another use of this learning is in market segmentation or social network analysis. Here one is interested in the patterns that can be found.
3. Reinforcement Learning
This is best described as a reward based system of learning. When you train your dog to do a particular task, you reward it with something so that it becomes used to performing that particular behaviour. Therefore, a learner or an agent in ML vocabulary must learn over time what actions to take so as to maximize its reward.
This sort of learning often takes place while playing games. So, if we train a computer to play chess, we’d make it play a number games where the computer would figure out which step to take in response to the one taken by the opponent, so as to maximize its final reward in a future game.
In this guide, we’ve talked about what Machine Learning is, how it works and the types of learning algorithms. Hopefully, now you have mastered the basics of this exciting field.