Introduction To Machine Learning for Beginners

What is Machine Learning?

Before understanding the meaning of machine learning in a simplified way, let’s see the formal definitions of machine learning. Since there are already many experts already defined the definition of machine learning, I don’t want to redefine it and confuse you hence, I got these definitions from the sources as-is.

Definition 1:

Machine Learning is the] field of study that gives computers the ability to learn without being explicitly programmed. —Arthur Samuel, 1959

Definition 2:

Machine Learning at its most basic is the practice of using algorithms to parse data, learn from it, and then make a determination or prediction about something in the world. – NVIDIA

Definition 3:

Machine learning is the science of getting computers to act without being explicitly programmed.- Stanford

Definition 4: More engineering-oriented one

A computer program is said to learn from experience E with respect to some task T and some performance measure P, if its performance on T, as measured by P, improves with experience E. —Tom Mitchell, 1997

Although the definitions listed above are all technically solid and come from professionals in the area, they might seem a little challenging to someone who is just learning about machine learning. Let’s establish our machine learning definition in a friendly manner since this is a machine learning instruction for beginners.

Machine learning is the ability of the machine to learn on its own

Wait. That’s it. Is this the definition of machine learning?

Yeah, that is the definition of machine learning in simple words. In the future, we will examine how we came to this definition, how a machine learns, and how it can resolve one of the world’s most challenging problems.

How Does Machine Learning Work?

machine learning

If I download a copy of Wikipedia, has my computer really “learned” something? Is it suddenly smarter?

If you just download a copy of Wikipedia, your computer has a lot more data, but it is
not suddenly better at any task. Thus, it is not Machine Learning.

For example, your spam filter is a Machine Learning program that can learn to flag spam given examples of spam emails (e.g., flagged by users) and examples of regular (non-spam, also called “ham”) emails. The examples that the system uses to learn are called the training set. Each training example is called a training instance (or sample).
In this case, task T is to flag spam for new emails, experience E is the training data, and performance measure P needs to be defined; for example, you can use the ratio of correctly classified emails. This particular performance measure is called accuracy and it is often used in classification tasks.

In machine learning, we do not explicitly code machines on how to solve a particular problem. Rather than that, we give the machine the ability so it can figure out the problem and try to solve it on its own.

What are the Different Types of Machine Learning?

There are so many different types of Machine Learning systems that it is useful to
classify them into broad categories based on:

  • If they receive training under human supervision or not (supervised, unsupervised, semisupervised, and Reinforcement Learning)
  • Whether or not they can learn incrementally on the fly (online versus batch

Let’s look at each of these criteria a bit more closely.

Supervised/Unsupervised Learning

Machine Learning systems can be classified according to the amount and type of
supervision they get during training. There are four major categories: supervised
learning, unsupervised learning, semisupervised learning, and Reinforcement Learning.

1. Supervised Learning

In supervised learning, we use known or labeled data for the training data. Since the data is known, the learning is, therefore, supervised, i.e., directed into successful execution. The input data goes through the Machine Learning algorithm and is used to train the model. Once the model is trained based on the known data, you can use unknown data in the model and get a new response.

Popular algorithms used in supervised learning include linear regression, logistic regression, decision trees, random forests, support vector machines, and neural networks.

Supervised learning has a wide range of applications in various fields, including healthcare, finance, marketing, and retail. It is a powerful technology that enables businesses to make informed decisions based on data and can lead to the development of new products and services.

2. Unsupervised learning

Unsupervised learning involves training a model on unlabeled data, without any predefined output or labels. The goal is to find patterns and relationships in the data that can be used to gain insights or make predictions. Examples of unsupervised learning include clustering, anomaly detection, and dimensionality reduction.

Popular algorithms used in unsupervised learning include k-means clustering, hierarchical clustering, principal component analysis (PCA), t-distributed stochastic neighbor embedding (t-SNE), and association rule mining.

Unsupervised learning has a wide range of applications in various fields, including computer vision, natural language processing, and anomaly detection. It is a powerful technology that enables businesses to discover hidden patterns and relationships within their data, which can lead to insights and better decision-making.

3. Semi-supervised learning

Semi-supervised learning is a type of machine learning where a model is trained using both labeled and unlabeled data. In traditional supervised learning, a model is trained using only labeled data, while in unsupervised learning, a model is trained using only unlabeled data. Semi-supervised learning is a combination of these two approaches, where the model is trained using a small amount of labeled data and a larger amount of unlabeled data.

The goal of semi-supervised learning is to leverage the information contained in the unlabeled data to improve the accuracy of the model’s predictions on the labeled data. By incorporating the additional information provided by the unlabeled data, the model can learn more about the underlying structure of the data and make better predictions.

Semi-supervised learning can be particularly useful in situations where labeled data is scarce or expensive to obtain. By using unlabeled data in combination with a small amount of labeled data, semi-supervised learning can achieve better performance than supervised learning using only the same small amount of labeled data.

4. Reinforcement Learning

Reinforcement learning is a type of machine learning where an agent learns to make decisions by interacting with an environment. The agent learns by receiving feedback in the form of rewards or penalties for its actions. The goal of the agent is to learn a policy, which is a mapping from states to actions, that maximizes its cumulative reward over time.

In reinforcement learning, the agent observes the current state of the environment and selects an action based on its current policy. The environment then transitions to a new state, and the agent receives a reward or penalty based on the action it selected. The agent then updates its policy based on the observed reward and the new state.

The key challenge in reinforcement learning is balancing exploration and exploitation. The agent needs to explore the environment to learn about the rewards associated with different actions, but it also needs to exploit its current knowledge to maximize its reward. Reinforcement learning algorithms use different techniques, such as epsilon-greedy policies or upper-confidence-bound exploration, to balance exploration and exploitation.

Reinforcement learning has been successfully applied to a wide range of problems, including game playing, robotics, and autonomous driving. Some popular reinforcement learning algorithms include Q-learning, SARSA, and Deep Q-Networks (DQN).

Batch and Online Learning

1. Batch learning

Batch learning, also known as offline learning, is a type of machine learning where a model is trained on a fixed dataset, and the training process is complete before the model is deployed for prediction.

In batch learning, the entire dataset is processed as a single batch, and the model updates its parameters based on the error between its predictions and the actual target values. This process is repeated for a fixed number of iterations or until the error converges to a satisfactory level.

Batch learning algorithms are commonly used when the entire dataset is available at once, and the training process can be completed in a reasonable amount of time. This approach is suitable for applications such as image classification, natural language processing, and speech recognition.

One of the main advantages of batch learning is that it can be more computationally efficient than online learning algorithms. By processing the entire dataset at once, batch learning algorithms can make use of optimizations such as parallel processing and vectorized operations.

However, batch learning algorithms can be slower to adapt to changes in the data distribution over time. If the data changes significantly after the initial training, the model may need to be retrained on a new dataset to maintain its accuracy. In contrast, online learning algorithms can adapt to changes in the data distribution over time by updating the model parameters as new data arrives.

2. Online Learning

Online learning is a type of machine learning where a model is trained incrementally as new data becomes available. In online learning, the model updates its parameters based on each new observation, rather than training on a fixed dataset as in batch learning.

The key advantage of online learning is its ability to adapt to changes in data distribution over time. Online learning algorithms can adjust their model parameters as new data arrives, which can lead to better performance compared to batch learning algorithms that require retraining on the entire dataset.

Online learning can be particularly useful in situations where the data is too large to fit in memory or where the data distribution is constantly changing. Some common applications of online learning include fraud detection, recommendation systems, and anomaly detection.

Some popular online learning algorithms include stochastic gradient descent (SGD), online decision trees, and online random forests. These algorithms are designed to update the model parameters based on each new observation, using techniques such as mini-batch updates or adaptive learning rates to improve convergence speed and stability.

Applications of Machine Learning:-

Machine learning has a wide range of applications, including:

  • Image and speech recognition: Machine learning algorithms can be used to recognize images and speech, which can be used in various applications such as autonomous driving, facial recognition, and voice assistants.
  • Natural language processing: Machine learning algorithms can be used to understand and interpret human language, which can be used in chatbots, virtual assistants, and sentiment analysis.
  • Predictive maintenance: Machine learning algorithms can be used to detect potential equipment failures before they occur, which can save companies money and prevent downtime.
  • Fraud detection: Machine learning algorithms can be used to identify fraudulent transactions, which can save companies money and prevent losses.
  • Recommender systems: Machine learning algorithms can be used to recommend products or services to customers based on their previous behavior or preferences.


Machine learning is a powerful technology that has the ability to enable computer systems to learn and improve from experience without being explicitly programmed to do so. It has a wide range of applications in various fields and is playing a significant role in the development of new products and services.

Understanding the different types of machine learning, their applications, and popular machine learning algorithms is crucial for businesses looking to leverage this technology to their advantage.