# Using Data to Answer Questions: An Introduction to Machine Learning

Today Machine Learning is one of the most talked-about topics among new developers and companies. Every other company in the market is now shifting towards this new trend. But what exactly Machine Learning is? And why it’s becoming a choice for everyone? We will figure it out in this article.

Before coming to this new trend let's try to understand a bit about our traditional way of programming. How our traditional way of programming works? Let’s understand this with a very simple example. Suppose we have the scores of 100 players in the form of numbers and we need to generate a rank list of players, i.e., we need to sort the scores. How do we do that in general? We simply write a sorting algorithm, a set of rules, and pass our data to it and we get the expected sorted rank list very easily. To understand it better, have a look at this diagram:

So, how we are going to approach sorting with Machine Learning. Let’s see.

We first train our model based on some known data like this:

After the model being trained if we pass some unknown data without any rules to process the data with, we will still get our expected result i.e. a sorted list of numbers like this:

Sorting numbers is a really basic example and Machine Learning doesn’t seem to be very useful in this case. True. but suppose we are making a Hand Cricket game. Think of how we can code this using our traditional way of programming. We need to take image data from the camera, define rules to detect different gestures of the hand, and then do the logic for the game. Here detecting gestures of hand is having a huge complexity as it depends upon lots of factors like shape, size, skin tone, etc. And writing code for that is a huge pain for any developer. We may end up writing thousands and thousands of lines of code. It doesn’t seem to be feasible. Here comes the use of Machine Learning in the picture. How do we do this using Machine Learning? We do it in the same way as training a model and using it to get an answer. We first train our model with some images of hand gestures labeled with there respective numbers it represents and then later we use this model for our unknown data. See this illustration:

Now to conclude this article, we can define Machine Learning in just five words “Using Data to Answer Questions”. It has two parts ‘Using Data’ and ‘Answer Questions’. Using data refer to the Training phase and Answer Question refers to the prediction or making inference phase of Machine Learning. So, we can say that Machine Learning has two parts Training and Prediction/Inference, and it's nothing but deriving meaning from data, and data is the most important thing for machine learning to work according to our expectations. It helps us to solve some unachievable tasks of traditional programming in a better, faster, and easier way.

Please let me know in the comments how it helped you to understand the basic concept of Machine Learning.

## More from Nitish Sharma

A designer and developer. check out nitishsharma.design