1 of 34

Module II

Introduction to Machine Learning

Introduction to Machine Learning

1

08/21/2025 08:37

2 of 34

AI vs Machine Learning vs Deep Learning: �Understanding the differences

Introduction to Machine Learning

2

08/21/2025 08:37

3 of 34

Artificial intelligence AI

  • Artificial intelligence (AI) refers to the simulation of human intelligence in machines that are programmed to think and learn like humans.

  • AI encompasses a wide range of technologies, including machine learning, deep learning, and natural language processing, and is used in various applications, from language translation and image recognition to autonomous vehicles and expert systems. 

Introduction to Machine Learning

3

08/21/2025 08:37

4 of 34

Machine Learning�

Lecture 0

4

08/21/2025 08:37

5 of 34

Introduction to ML

Machine Learning (ML) is a subset of artificial intelligence (AI) that enables systems to learn from data, identify patterns, and make decisions with minimal human intervention.

Introduction to Machine Learning

5

08/21/2025 08:37

6 of 34

What is Machine learning and how is it different from Deep learning ?�

  • Machine learning develop programs that can access data and learn from it.
  • Deep learning is the sub domain of the machine learning.
  • Deep learning supports automatic extraction of features from the raw data.

Introduction to Machine Learning

6

08/21/2025 08:37

7 of 34

Various kind of Problems tackled using ML

Introduction to Machine Learning

7

08/21/2025 08:37

8 of 34

Types of Machine Learning

  • Supervised Learning

  • Unsupervised Learning

  • Reinforcement Learning

Introduction to Machine Learning

8

08/21/2025 08:37

9 of 34

Supervised Learning

Supervised learning involves training a model on a labeled dataset, where the input data is paired with the correct output. The algorithm learns to map inputs to outputs by minimizing prediction errors.

Introduction to Machine Learning

9

08/21/2025 08:37

10 of 34

Advantages of Supervised Machine Learning

  • Supervised Learning models can have high accuracy as they are trained on labelled data.

  • The process of decision-making in supervised learning models is often interpretable.

  • It can often be used in pre-trained models which saves time and resources when developing new models from scratch.

Introduction to Machine Learning

10

08/21/2025 08:37

11 of 34

Disadvantages of Supervised Machine Learning

  • It has limitations in knowing patterns and may struggle with unseen or unexpected patterns that are not present in the training data.

  • It can be time-consuming and costly as it relies on labeled data only.

  • It may lead to poor generalizations based on new data.

Introduction to Machine Learning

11

08/21/2025 08:37

12 of 34

Applications of Supervised Learning

  • Image classification: Identify objects, faces, and other features in images.
  • Natural language processing: Extract information from text, such as sentiment, entities, and relationships.
  • Speech recognition: Convert spoken language into text.
  • Recommendation systems: Make personalized recommendations to users.
  • Predictive analytics: Predict outcomes, such as sales, customer churn, and stock prices.
  • Medical diagnosis: Detect diseases and other medical conditions.
  • Fraud detection: Identify fraudulent transactions.

Introduction to Machine Learning

12

08/21/2025 08:37

13 of 34

Applications of Supervised Learning contd..

  • Autonomous vehicles: Recognize and respond to objects in the environment.
  • Email spam detection: Classify emails as spam or not spam.
  • Quality control in manufacturing: Inspect products for defects.
  • Credit scoring: Assess the risk of a borrower defaulting on a loan.
  • Gaming: Recognize characters, analyze player behavior, and create NPCs.
  • Customer support: Automate customer support tasks.
  • Weather forecasting: Make predictions for temperature, precipitation, and other meteorological parameters.
  • Sports analytics: Analyze player performance, make game predictions, and optimize strategies.

Introduction to Machine Learning

13

08/21/2025 08:37

14 of 34

Unsupervised Learning�

Introduction to Machine Learning

14

08/21/2025 08:37

Note: The basic difference between the two is that Supervised Learning datasets have an output label associated with each tuple while Unsupervised Learning datasets do not. 

15 of 34

Advantages of unsupervised machine learning

  • Requires less manual data preparation (i.e., no hand labeling) than supervised machine learning.

  • Capable of finding previously unknown patterns in data, which is impossible with supervised machine learning models.

Introduction to Machine Learning

15

08/21/2025 08:37

16 of 34

Disadvantages of unsupervised machine learning

  • Results may be unpredictable or difficult to understand.

  • Difficult to measure accuracy or effectiveness due to lack of predefined answers during training

Introduction to Machine Learning

16

08/21/2025 08:37

17 of 34

Applications of Unsupervised learning

  • Customer Segmentation: Algorithms cluster customers based on purchasing behavior or demographics, enabling targeted marketing strategies.
  • Anomaly Detection: Identifies unusual patterns in data, aiding fraud detection, cybersecurity, and equipment failure prevention.
  • Recommendation Systems: Suggests products, movies, or music by analyzing user behavior and preferences.
  • Image and Text Clustering: Groups similar images or documents for tasks like organization, classification, or content recommendation.
  • Social Network Analysis: Detects communities or trends in user interactions on social media platforms.
  • Astronomy and Climate Science: Classifies galaxies or groups weather patterns to support scientific research

Introduction to Machine Learning

17

08/21/2025 08:37

18 of 34

Introduction to Machine Learning

18

08/21/2025 08:37

Supervised vs Unsupervised Machine Learning

Parameters

   Supervised machine learning

Unsupervised machine learning

Input Data  

They are trained on labeled data.

They are trained on unlabeled data.

Computational Complexity 

Simpler method

 Computationally complex

Accuracy

Highly accurate

Less accurate 

No. of classes

No. of classes is known

No. of classes is not known

Data Analysis

Uses offline analysis

Uses real-time analysis of data

Algorithms used

Linear and Logistics regression, KNN Random forest, multi-class classification, decision tree, Support Vector Machine, Neural Network etc.

K-Means clustering, Hierarchical clustering, Apriori algorithm etc.

Output 

Desired output is given.

Desired output is not given.

19 of 34

Introduction to Machine Learning

19

08/21/2025 08:37

Training data 

Use training data to infer model.

No training data is used.

Complex model 

It is not possible to learn larger and more complex models with supervised learning.

It is possible to learn larger and more complex models with unsupervised learning.

Model 

We can test our model.

We can not test our model.

Supervision

Supervised learning needs supervision to train the model.

Unsupervised learning does not need any supervision to train the model.

Classification

Divided into two types:

  1. Regression
  2. Classification

Divided into two types:

  1. Clustering
  2. Association

Feedback

It has feedback mechanism.

It has no feedback mechanism.

Example 

Optical character recognition.

Find a face in an image.

20 of 34

Reinforcement Learning Workflow�

Introduction to Machine Learning

20

08/21/2025 08:37

  1. Create the environment
  2. Define the reward
  3. Create the agent
  4. Train and validate the agent
  5. Deploy the policy

21 of 34

REINFORCEMENT LEARNING

It is a branch of machine learning that focuses on how agents can learn to make decisions through trial and error to maximize cumulative rewards

Introduction to Machine Learning

21

08/21/2025 08:37

Agent: The decision-maker that performs actions.

Environment: The world or system in which the agent operates.

State: The situation or condition the agent is currently in.

Action: The possible moves or decisions the agent can make.

Reward: The feedback or result from the environment based on the agent’s action

22 of 34

Reinforcement Learning Example: Navigating a Maze

Introduction to Machine Learning

22

08/21/2025 08:37

23 of 34

Types of Reinforcements in RL

  1. Positive Reinforcement

When an event, occurs due to a particular behavior, increases the strength and the frequency of the behavior. In other words, it has a positive effect on behavior. 

2. Negative Reinforcement

Negative Reinforcement is defined as strengthening of behavior because a negative condition is stopped or avoided. 

Introduction to Machine Learning

23

08/21/2025 08:37

24 of 34

Applications of RL

  • Robotics: 

  • Game Playing: 

  • Industrial Control: 

  • Personalized Training Systems: 

Introduction to Machine Learning

24

08/21/2025 08:37

25 of 34

Advantages of Reinforcement Learning

  • Solving Complex Problems: 

  • Error Correction: 

  • Direct Interaction with the Environment: 

  • Handling Non-Deterministic Environments: 

Introduction to Machine Learning

25

08/21/2025 08:37

26 of 34

Use-cases of ML.

1. Customer Service:

  • Chatbots:

ML-powered chatbots handle routine customer inquiries, freeing up human agents for complex issues. 

  • Personalized Recommendations:

ML analyzes customer data to suggest relevant products or content, enhancing the shopping experience. 

  • Sentiment Analysis:

ML identifies the emotional tone of customer feedback, helping businesses understand customer satisfaction and address concerns. 

 

Introduction to Machine Learning

26

08/21/2025 08:38

27 of 34

Use-cases of ML.

2. Healthcare:

  • Disease Detection:

ML algorithms analyze medical images (X-rays, scans) and patient data to identify diseases like cancer or pneumonia. 

  • Drug Discovery:

ML speeds up the process of finding new medications by predicting how different compounds will interact. 

  • Personalized Treatment:

ML helps tailor treatment plans based on individual patient characteristics and medical history. 

Introduction to Machine Learning

27

08/21/2025 08:38

28 of 34

Use-cases of ML.

3. Finance:

  • Fraud Detection: ML algorithms identify suspicious transactions and patterns to prevent fraudulent activities. 
  • Credit Risk Assessment: ML analyzes credit data to determine a customer's creditworthiness, enabling faster and more accurate loan approvals. 
  • Algorithmic Trading: ML powers automated trading strategies in stock markets. 

Introduction to Machine Learning

28

08/21/2025 08:39

29 of 34

Use-cases of ML.

4. Marketing and Sales:

  • Personalized Marketing Campaigns: ML targets specific customer segments with tailored marketing messages. 
  • Lead Scoring: ML identifies the most promising leads for sales teams to focus on. 
  • Sales Forecasting: ML predicts future sales trends, helping businesses optimize inventory and resource allocation. 

Introduction to Machine Learning

29

08/21/2025 08:39

30 of 34

Use-cases of ML.

5. Manufacturing:

  • Predictive Maintenance:

ML monitors equipment performance and predicts potential failures, preventing costly downtime. 

  • Quality Control:

ML automates the inspection process, identifying defects and improving product quality. 

  • Supply Chain Optimization:

ML optimizes inventory management and logistics, reducing costs and improving efficiency. 

 

 

Introduction to Machine Learning

30

08/21/2025 08:40

31 of 34

Use-cases of ML.

6. Cybersecurity:

  • Intrusion Detection: ML identifies and responds to cyberattacks by analyzing network traffic and system logs. 
  • Malware Detection: ML identifies and blocks malicious software, protecting systems from threats. 
  • Spam Filtering: ML filters out unwanted emails, ensuring users only see relevant messages. 

Introduction to Machine Learning

31

08/21/2025 08:40

32 of 34

Use-cases of ML.

7. Transportation:�

  • Self-Driving Cars: ML powers the autonomous driving capabilities of vehicles. 
  • Traffic Prediction: ML analyzes traffic patterns to optimize routes and reduce congestion. 

 

Introduction to Machine Learning

32

08/21/2025 08:41

33 of 34

Use-cases of ML.

8. Other Notable Use Cases:

  • Recommendation Systems:

ML powers personalized recommendations on platforms like Netflix and Spotify. 

  • Natural Language Processing (NLP):

ML enables machines to understand and process human language, powering applications like voice assistants and translation tools. 

  • Image Recognition:

ML algorithms identify objects and patterns in images, used in facial recognition, medical imaging, and more. 

  • Energy Consumption Forecasting:

ML predicts energy usage patterns, helping optimize energy distribution and reduce waste. 

  • Robotics:

ML is used to control and train robots for various tasks, from manufacturing to healthcare. 

Introduction to Machine Learning

33

08/21/2025 08:41

34 of 34

Machine Learning

34

08/21/2025 08:37