Skip to content
Related Articles
Open in App
Not now

Related Articles

ML | What is Machine Learning ?

Improve Article
Save Article
Like Article
  • Difficulty Level : Easy
  • Last Updated : 02 Mar, 2023
Improve Article
Save Article
Like Article

Arthur Samuel, a pioneer in the field of artificial intelligence and computer gaming, coined the term “Machine Learning”. He defined machine learning as – a “Field of study that gives computers the capability to learn without being explicitly programmed”. In a very layman’s manner, Machine Learning(ML) can be explained as automating and improving the learning process of computers based on their experiences without being actually programmed i.e. without any human assistance. The process starts with feeding good quality data and then training our machines(computers) by building machine learning models using the data and different algorithms. The choice of algorithms depends on what type of data do we have and what kind of task we are trying to automate.

What is Machine Learning?

Machine Learning is a system of computer algorithms that can learn from examples through self-improvement without being explicitly coded by a programmer. Machine learning is a part of artificial intelligence which combines data with statistical tools to predict an output that can be used to make actionable insights.

The breakthrough comes with the idea that a machine can singularly learn from the data (i.e., an example) to produce accurate results. Machine learning is closely related to data mining and Bayesian predictive modeling. The machine receives data as input and uses an algorithm to formulate answers.

A typical machine learning tasks are to provide a recommendation. For those who have a Netflix account, all recommendations of movies or series are based on the user’s historical data. Tech companies are using unsupervised learning to improve the user experience with personalizing recommendations.

Machine learning is also used for a variety of tasks like fraud detection, predictive maintenance, portfolio optimization, automated task, and so on.

The life of Machine Learning programs is straightforward and can be summarized in the following points:

Define a question

Collect data

Visualize data

Train algorithm

Test the Algorithm

Collect feedback

Refine the algorithm

Loop 4-7 until the results are satisfying

Use the model to make a prediction

Once the algorithm gets good at drawing the right conclusions, it applies that knowledge to new sets of data.

Need of the machine learning:-

Machine learning is important because it allows computers to learn from data and improve their performance on specific tasks without being explicitly programmed. This ability to learn from data and adapt to new situations makes machine learning particularly useful for tasks that involve large amounts of data, complex decision-making, and dynamic environments.

Here are some specific areas where machine learning is being used:

Predictive modeling: Machine learning can be used to build predictive models that can help businesses make better decisions. For example, machine learning can be used to predict which customers are most likely to buy a particular product, or which patients are most likely to develop a certain disease.

Natural language processing: Machine learning is used to build systems that can understand and interpret human language. This is important for applications such as voice recognition, chatbots, and language translation.

Computer vision: Machine learning is used to build systems that can recognize and interpret images and videos. This is important for applications such as self-driving cars, surveillance systems, and medical imaging.

Fraud detection: Machine learning can be used to detect fraudulent behavior in financial transactions, online advertising, and other areas.

Recommendation systems: Machine learning can be used to build recommendation systems that suggest products, services, or content to users based on their past behavior and preferences.

Overall, machine learning has become an essential tool for many businesses and industries, as it enables them to make better use of data, improve their decision-making processes, and deliver more personalized experiences to their customers.

Machine learning can be grouped into two broad learning tasks: 

  1. Supervised ML
  2. Unsupervised ML 

There are many other algorithms.

1. Supervised learning:

An algorithm uses training data and feedback from humans to learn the relationship between given inputs to a given output. For instance, a practitioner can use marketing expenses and weather forecasts as input data to predict the sales of cans. You can use supervised learning when the output data is known. The algorithm will predict new data.
There are two categories of supervised learning:

  1. Classification task
  2. Regression task


Imagine you want to predict the gender of a customer for a commercial. You will start gathering data on the height, weight, job, salary, purchasing basket, etc. from your customer database. You know the gender of each of your customer, it can only be male or female. The objective of the classifier will be to assign a probability of being a male or a female (i.e., the label) based on the information (i.e., features you have collected). When the model learned how to recognize male or female, you can use new data to make a prediction. For instance, you just got new information from an unknown customer, and you want to know if it is a male or female. If the classifier predicts male = 70%, it means the algorithm is sure at 70% that this customer is a male, and 30% it is a female.

The label can be for two or more classes. The above Machine learning example has only two classes, but if a classifier needs to predict an object, it has dozens of classes (e.g., glass, table, shoes, etc. each object represents a class)


When the output is a continuous value, the task is a regression. For instance, a financial analyst may need to forecast the value of a stock based on a range of feature like equity, previous stock performances, macroeconomics index. The system will be trained to estimate the price of the stocks with the lowest possible error.

2.Unsupervised learning

In unsupervised learning, an algorithm explores input data without being given an explicit output variable (e.g., explores customer demographic data to identify patterns).

You can use it when you do not know how to classify the data, and you want the algorithm to find patterns and classify the data for you.

Example: Training of students during exams. While preparing for the exams students don’t actually cram the subject but try to learn it with complete understanding. Before the examination, they feed their machine(brain) with a good amount of high-quality data (questions and answers from different books or teachers’ notes, or online video lectures). Actually, they are training their brain with input as well as output i.e. what kind of approach or logic do they have to solve different kinds of questions? Each time they solve practice test papers and find the performance (accuracy /score) by comparing answers with the answer key given, Gradually, the performance keeps on increasing, gaining more confidence with the adopted approach. That’s how actually models are built, train machine with data (both inputs and outputs are given to the model), and when the time comes test on data (with input only) and achieve our model scores by comparing its answer with the actual output which has not been fed while training. Researchers are working with assiduous efforts to improve algorithms, and techniques so that these models perform even much better.  

Basic Difference in ML and Traditional Programming?

  • Traditional Programming: We feed in DATA (Input) + PROGRAM (logic), run it on the machine, and get the output.
  • Machine Learning: We feed in DATA(Input) + Output, run it on the machine during training and the machine creates its own program(logic), which can be evaluated while testing.

  What does exactly learning mean for a computer? A computer is said to be learning from Experiences with respect to some class of Tasks if its performance in a given task improves with the Experience. 

A computer program is said to learn from experience E with respect to some class of tasks T and performance measure P, if its performance at tasks in T, as measured by P, improves with experience E Example: playing checkers. E = the experience of playing many games of checkers T = the task of playing checkers. P = the probability that the program will win the next game In general, any machine learning problem can be assigned to one of two broad classifications: Supervised learning and Unsupervised learning. 

How things work in reality:

  • Talking about online shopping, there are millions of users with an unlimited range of interests with respect to brands, colors, price range, and many more. While online shopping, buyers tend to search for a number of products. Now, searching a product frequently will make buyers’ Facebook, web pages, search engines or online stores start recommending or showing offers on that particular product. There is no one sitting over there to code such a task for each and every user, all this task is completely automatic. Here, ML plays its role. Researchers, data scientists, and machine learners build models on the machine using good quality and a huge amount of data and now their machine is automatically performing and even improving with more and more experience and time. Traditionally, the advertisement was only done using newspapers, magazines and radio but now technology has made us smart enough to do Targeted advertisement (online ad system) which is a way more efficient method to target the most receptive audience.
  • Even in health care also, ML is doing a fabulous job. Researchers and scientists have prepared models to train machines for detecting cancer just by looking at slide-cell images. For humans to perform this task it would have taken a lot of time. But now, no more delay, machines predict the chances of having or not having cancer with some accuracy and doctors just have to give an assurance call, that’s it. The answer to – how is this possible is very simple -all that is required, is, a high computation machine, a large amount of good quality image data, ML model with good algorithms to achieve state-of-the-art results. Doctors are using ML even to diagnose patients based on different parameters under consideration.
  • You all might have to use IMDB ratings, Google Photos where it recognizes faces, Google Lens where the ML image-text recognition model can extract text from the images you feed in, and Gmail which categories E-mail as social, promotion, updates, or forums using text classification, which is a part of ML.

How does ML work?

Now in this Machine learning basics for beginners tutorial, we will learn how Machine Learning (ML) works:

Machine learning is the brain where all the learning takes place. The way the machine learns is similar to the human being. Humans learn from experience. The more we know, the more easily we can predict. By analogy, when we face an unknown situation, the likelihood of success is lower than the known situation. Machines are trained the same. To make an accurate prediction, the machine sees an example. When we give the machine a similar example, it can figure out the outcome. However, like a human, if its feeds a previously unseen example, the machine has difficulties predicting.

The core objective of machine learning is learning and inference. First of all, the machine learns through the discovery of patterns. This discovery is made thanks to the data. One crucial part of the data scientist is to choose carefully which data to provide to the machine. The list of attributes used to solve a problem is called a feature vector. You can think of a feature vector as a subset of data that is used to tackle a problem.
The machine uses some fancy algorithms to simplify reality and transform this discovery into a model. Therefore, the learning stage is used to describe the data and summarize it into a model.

  • Gathering past data in any form suitable for processing. The better the quality of the data, the more suitable it will be for modeling
  • Data Processing – Sometimes, the data collected is in raw form and it needs to be pre-processed. Example: Some tuples may have missing values for certain attributes, and, in this case, it has to be filled with suitable values in order to perform machine learning or any form of data mining. Missing values for numerical attributes such as the price of the house may be replaced with the mean value of the attribute whereas missing values for categorical attributes may be replaced with the attribute with the highest mode. This invariably depends on the types of filters we use. If data is in the form of text or images then converting it to numerical form will be required, be it a list or array, or matrix. Simply, Data is to be made relevant and consistent. It is to be converted into a format understandable by the machine
  • Divide the input data into training, cross-validation, and test sets. The ratio between the respective sets must be 6:2:2
  • Building models with suitable algorithms and techniques on the training set.
  • Testing our conceptualized model with data that was not fed to the model at the time of training and evaluating its performance using metrics such as F1 score, precision, and recall.
    • Linear Algebra
    • Statistics and Probability
    • Calculus
    • Graph theory
    • Programming Skills – Languages such as Python, R, MATLAB, C++, or Octave. 

Challenges and Limitations of Machine Learning-

Limitations of Machine Learning:

  1. The primary challenge of machine learning is the lack of data or the diversity in the dataset.
  2.  A machine cannot learn if there is no data available. Besides, a dataset with a lack of diversity gives the machine a hard time. 
  3. A machine needs to have heterogeneity to learn meaningful insight. 
  4. It is rare that an algorithm can extract information when there are no or few variations.
  5.  It is recommended to have at least 20 observations per group to help the machine learn. This constraint leads to poor evaluation and prediction.

Application of Machine Learning

Now in this Machine learning tutorial, let’s learn the applications of Machine Learning:


Machine learning, assists humans with their day-to-day tasks, personally or commercially without having complete control of the output. Such machine learning is used in different ways such as Virtual Assistant, Data analysis, software solutions. The primary user is to reduce errors due to human bias.


Machine learning, which works entirely autonomously in any field without the need for any human intervention. For example, robots performing the essential process steps in manufacturing plants.

Finance Industry

Machine learning is growing in popularity in the finance industry. Banks are mainly using ML to find patterns inside the data but also to prevent fraud.

Government organization

The government makes use of ML to manage public safety and utilities. Take the example of China with the massive face recognition. The government uses Artificial intelligence to prevent jaywalker.

Healthcare industry

Healthcare was one of the first industry to use machine learning with image detection.


Broad use of AI is done in marketing thanks to abundant access to data. Before the age of mass data, researchers develop advanced mathematical tools like Bayesian analysis to estimate the value of a customer. With the boom of data, marketing department relies on AI to optimize the customer relationship and marketing campaign.

Retail industry

Machine learning is used in the retail industry to analyze customer behavior, predict demand, and manage inventory. It also helps retailers to personalize the shopping experience for each customer by recommending products based on their past purchases and preferences.


Machine learning is used in the transportation industry to optimize routes, reduce fuel consumption, and improve the overall efficiency of transportation systems. It also plays a role in autonomous vehicles, where ML algorithms are used to make decisions about navigation and safety.


Machine learning is used in the education sector to analyze student performance data and predict future academic performance. This helps educators to identify students who need extra support and provide personalized learning experiences.

Energy and Utilities

Machine learning is used in the energy and utilities sector to optimize energy production and distribution, reduce waste, and improve the efficiency of energy systems. It is also used to monitor energy usage and identify patterns to predict future demand.

My Personal Notes arrow_drop_up
Like Article
Save Article
Related Articles

Start Your Coding Journey Now!