Skip to content
Home » Machine Learning – Introduction

Machine Learning – Introduction

1. What is Machine Learning?

Machine Learning (ML) is a branch of Artificial Intelligence (AI) that enables computers to learn from data and make decisions or predictions without being explicitly programmed for every situation.

In simple words:

Machine Learning means teaching a computer using data so that it can learn patterns and make predictions or decisions.

\(\hat{y} = b_0 + b_1x\)

For example, instead of programming a computer with every possible rule for identifying spam emails, we give it many examples of spam and non-spam emails. The computer learns the pattern and then identifies new emails.


2. Traditional Programming vs Machine Learning

Traditional Programming

In traditional programming:

Data + Rules/Program → Output

For example:

Marks → Program rules → Pass/Fail

The programmer has to define the rules.

Machine Learning

In machine learning:

Data + Expected Results → Learning Algorithm → Model

The computer learns the rules/patterns from the data.

Simple Example

Suppose we want to predict whether a student will pass.

We provide historical data:

Study HoursAttendanceResult
260%Fail
475%Pass
685%Pass
150%Fail

The machine learning algorithm studies these examples and learns a pattern.

For a new student:

Study = 5 hours, Attendance = 80%

the model may predict:

Pass


3. Why Do We Need Machine Learning?

Traditional programming becomes difficult when the problem contains too many rules or changing patterns.

Machine learning is useful because it can:

  • Analyze large amounts of data.
  • Find hidden patterns.
  • Make predictions.
  • Automate decision-making.
  • Improve performance with more data.
  • Handle complex problems.

4. Basic Machine Learning Process

The basic process can be represented as:

        DATA
          ↓
   Data Preparation
          ↓
     ML Algorithm
          ↓
       Training
          ↓
        MODEL
          ↓
   New/Unknown Data
          ↓
      Prediction

Step 1: Collect Data

Data is collected from different sources such as:

  • Websites
  • Sensors
  • Databases
  • Social media
  • Applications

Step 2: Prepare Data

The data may contain errors or missing values. It is cleaned and prepared.

Step 3: Train the Model

The machine learning algorithm studies the available data and finds patterns.

Step 4: Test the Model

The model is tested using data that it has not seen before.

Step 5: Make Predictions

The trained model is used to make predictions on new data.


5. Important Terms in Machine Learning

1. Data

Data is the information given to a machine learning system.

Example:

Age, Salary, Experience, Location

2. Feature

A feature is an input variable used by the model.

For example, for house-price prediction:

  • Area
  • Number of bedrooms
  • Location
  • Age of house

are features.

3. Label

A label is the known output or answer in supervised learning.

Example:

Features → Area, Bedrooms, Location
Label    → House Price

4. Model

A model is the learned representation of patterns in the data.

5. Training

Training is the process in which the machine learning algorithm learns from data.

6. Prediction

Prediction is the output produced by the trained model for new data.


6. Types of Machine Learning

Machine Learning is mainly divided into:

1. Supervised Learning

The model learns from labelled data.

Example:

Study Hours → Marks

Applications:

  • House price prediction
  • Spam detection
  • Student result prediction

2. Unsupervised Learning

The model learns from unlabelled data and finds hidden patterns or groups.

Example:

Customer data → Customer groups

Applications:

  • Customer segmentation
  • Market analysis
  • Pattern discovery

3. Reinforcement Learning

The model learns through rewards and penalties.

Example:

A robot receives a reward when it performs the correct action and a penalty when it makes a mistake.


7. Applications of Machine Learning

Machine learning is used in many areas:

Healthcare

  • Disease prediction
  • Medical image analysis
  • Patient monitoring

Banking

  • Fraud detection
  • Credit scoring
  • Risk analysis

E-commerce

  • Product recommendations
  • Customer segmentation
  • Demand prediction

Social Media

  • Content recommendations
  • Face recognition
  • Advertisement targeting

Education

  • Student performance prediction
  • Personalized learning
  • Automated assessment

Transportation

  • Traffic prediction
  • Route optimization
  • Autonomous vehicles

Digital Marketing

Machine learning is especially useful in digital marketing for:

  • Customer segmentation
  • Ad targeting
  • Lead scoring
  • Conversion prediction
  • Recommendation systems
  • Customer behaviour analysis
  • Predictive analytics

8. Advantages of Machine Learning

  1. Automation – Reduces manual work.
  2. Handles large data – Can process huge datasets.
  3. Prediction – Helps predict future outcomes.
  4. Pattern recognition – Finds patterns that may be difficult for humans to identify.
  5. Improvement with data – Models can improve when trained with better data.
  6. Personalization – Provides customized recommendations and experiences.

9. Limitations of Machine Learning

  1. Requires good-quality data.
  2. Large amounts of data may be required.
  3. Training can require significant computing resources.
  4. Some models are difficult to understand or explain.
  5. Incorrect or biased data can produce incorrect or biased results.
  6. Machine learning does not guarantee 100% accurate predictions.

10. Simple Real-Life Example

Consider YouTube recommendations.

You watch several videos about:

  • Digital Marketing
  • AI
  • Python

The system observes your behaviour:

  • Videos watched
  • Watch duration
  • Likes
  • Searches
  • Subscriptions

The machine learning system identifies your interests and recommends similar videos.

Your Activity
     ↓
Data Collection
     ↓
Machine Learning Algorithm
     ↓
Learn Your Interests
     ↓
Recommendation Model
     ↓
Recommended Videos

11. Machine Learning and Artificial Intelligence

These terms are related but not exactly the same.

Artificial Intelligence
        ↓
   Machine Learning
        ↓
    Deep Learning

Artificial Intelligence

AI is the broader field of creating machines that can perform tasks requiring human-like intelligence.

Machine Learning

ML is a part of AI where machines learn from data.

Deep Learning

Deep Learning is a subset of ML that uses artificial neural networks with multiple layers.


Exam Definition

Machine Learning is a branch of Artificial Intelligence that enables computers to learn patterns from data and make predictions or decisions without being explicitly programmed for every task.

In an exam, remember these 5 points:

Machine Learning = Data + Learning + Pattern Recognition + Prediction + Decision Making