Machine Learning
Nouman Ali
Information Technology University of the Punjab, Lahore
Fall 2025
Nouman Ali (ITU) Artificial Intelligence (SE310T) Fall 2025 1 / 21
Agenda for Today
What We’ll Cover:
What is Artificial Intelligence, Machine Learning
and Deep Learning?
Why Machine Learning is Important?
Types of Machine Learning:
Supervised Learning (Overview)
Unsupervised Learning (Overview)
Common Machine Learning Tasks
Real-world Applications of ML
The Basic Machine Learning Workflow
Nouman Ali (ITU) Artificial Intelligence (SE310T) Fall 2025 2 / 21
The Big Picture
Artificial Intelligence (AI)
Broad science of creating machines that can reason,
learn, and act with human-like intelligence.
Aims to solve problems and perform tasks that
typically require human intellect (e.g., planning,
understanding language).
Like creating a thinking machine: the foundation
for all other intelligent systems.
Nouman Ali (ITU) Artificial Intelligence (SE310T) Fall 2025 3 / 21
The Learning Engine
Machine Learning (ML)
ML enables systems to learn from data and
improve over time without being explicitly
programmed.
Algorithms find patterns and make predictions or
decisions.
Like teaching a child: Show examples and let the
system infer rules.
Nouman Ali (ITU) Artificial Intelligence (SE310T) Fall 2025 4 / 21
The Neural Network Core
Deep Learning (DL)
A specific subset of ML that uses a powerful,
multi-layered approach.
Employs artificial neural networks with multiple
hidden layers to find intricate patterns.
Like a brain’s visual cortex: learns to recognize
complex, hierarchical features from raw data.
Nouman Ali (ITU) Artificial Intelligence (SE310T) Fall 2025 5 / 21
How Does ML Learn?
Experience (E) — Data used to train the model
Task (T) — What the model is trying to do
Performance (P) — How well it’s doing (e.g.,
accuracy)
Nouman Ali (ITU) Artificial Intelligence (SE310T) Fall 2025 6 / 21
Formal Definition of Learning (Tom Mitchell)
Tom Mitchell’s Definition
”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.”
E (Experience): Historical data or training examples
T (Task): What you’re trying to achieve (e.g., spam filtering)
P (Performance): How well you’re doing (e.g., accuracy)
Nouman Ali (ITU) Artificial Intelligence (SE310T) Fall 2025 7 / 21
Why Machine Learning Now?
Key Drivers Behind ML’s Rise
Data Explosion Faster Computing Smarter Algorithms
Tons of data from web, GPUs, TPUs, and cloud Modern tools and frameworks
sensors, and devices enables computing make ML training make ML powerful and
learning. feasible. accessible.
Nouman Ali (ITU) Artificial Intelligence (SE310T) Fall 2025 8 / 21
Types of Machine Learning
A Broad Classification
Supervised Learning Unsupervised Reinforcement Semi-Supervised
Learning Learning Learning
Nouman Ali (ITU) Artificial Intelligence (SE310T) Fall 2025 9 / 21
Supervised Learning
Learning with a Teacher
Learns from labeled data (input-output pairs).
Goal: Predict correct output for new inputs.
Tasks:
Classification – Categorical outputs (e.g., spam or
not).
Regression – Numerical outputs (e.g., house
prices).
Nouman Ali (ITU) Artificial Intelligence (SE310T) Fall 2025 10 / 21
Supervised Learning: Classification
Common Use Cases
Email Spam Detection Image Recognition Medical Diagnosis Customer Churn
(Spam or Not Spam) (Objects in images) (Disease: Yes / No) (Will customer leave?)
Nouman Ali (ITU) Artificial Intelligence (SE310T) Fall 2025 11 / 21
Supervised Learning: Regression
Common Use Cases
House Price Prediction Stock Price Forecast Age Estimation Product Sales
(Size, location, etc.) (Time series prediction) (From face images)
Prediction
(Future demand)
Nouman Ali (ITU) Artificial Intelligence (SE310T) Fall 2025 12 / 21
Unsupervised Learning
Discovering Hidden Patterns
Summary
Unsupervised Learning is used when the data has no
labels. The goal is to uncover hidden patterns or
groupings in the data, without any explicit guidance.
Key Techniques:
Clustering — e.g., grouping customers by
behavior
Dimensionality Reduction — e.g., compressing
data for visualization
Example: Clustering data into distinct groups without labels
Nouman Ali (ITU) Artificial Intelligence (SE310T) Fall 2025 13 / 21
Unsupervised Learning: Clustering
Customer Segmentation Document Analysis Anomaly Detection Biological Data Analysis
Grouping customers by behavior Grouping similar articles Detecting unusual patterns like fraud Grouping genes with similar
expression
Nouman Ali (ITU) Artificial Intelligence (SE310T) Fall 2025 14 / 21
Unsupervised Learning: Dimensionality Reduction
Data Visualization Feature Compression Noise Reduction
Reducing high-dimensional data for plotting Reducing storage and computation Filtering out irrelevant or random features
Nouman Ali (ITU) Artificial Intelligence (SE310T) Fall 2025 15 / 21
Common ML Tasks
What ML Models Do
Classification: Assigning data points to predefined
categories.
Regression: Predicting a continuous numerical
value.
Clustering: Grouping similar data points.
Anomaly Detection: Identifying rare or unusual
data points.
Natural Language Processing (NLP):
Understanding and generating human language.
Illustration of key ML tasks
Computer Vision: Enabling computers to ”see”
and interpret visual information.
Nouman Ali (ITU) Artificial Intelligence (SE310T) Fall 2025 16 / 21
Applications of Machine Learning
ML Everywhere
Image Recognition: Facial Recognition, Object
Detection (e.g., self-driving cars).
Natural Language Processing: Spam filters,
Machine Translation (Google Translate), Chatbots
Recommendation Systems: Movie
recommendations, Online Product Suggestions
Healthcare: Disease diagnosis, Drug discovery,
Personalized medicine.
Finance: Fraud detection
Marketing: Targeted advertising, Customer
segmentation. ML spans industries and domains
Robotics: Autonomous navigation, Human-robot
interaction.
Nouman Ali (ITU) Artificial Intelligence (SE310T) Fall 2025 17 / 21
Basic ML Workflow (1/2)
1. Problem Definition & Data Collection
What do you want the ML model to do?
Collect relevant data: quality > quantity!
2. Data Preparation & Preprocessing
Clean data (missing values, outliers).
Transform: scaling, encoding categorical features.
Feature engineering: create useful features.
3. Model Selection & Training
Pick the right algorithm for the task.
Train the model — this is where learning happens.
Nouman Ali (ITU) Artificial Intelligence (SE310T) Fall 2025 18 / 21
Basic ML Workflow (2/2)
4. Model Evaluation
Test model performance on unseen (test) data.
Use metrics like accuracy, precision, F1-score, etc.
5. Hyperparameter Tuning
Adjust settings like learning rate, depth, number of layers.
Techniques: grid search, random search, Bayesian tuning.
6. Deployment & Monitoring
Integrate the model into real apps or devices.
Monitor performance, retrain when necessary.
Nouman Ali (ITU) Artificial Intelligence (SE310T) Fall 2025 19 / 21
Data Splitting: Training and Testing
Ensuring Generalization
Why Split the Data?
To check how well the model performs on unseen data.
Avoids overfitting — where the model memorizes training data.
Training Set
Used to teach the model.
Model learns patterns from this portion.
Test Set
Kept separate until final evaluation.
Simulates real-world, unseen data.
Typical Split Ratio
70–80% for training & 20–30% for testing
Nouman Ali (ITU) Artificial Intelligence (SE310T) Fall 2025 20 / 21
Recap
What We Covered Today
What is Machine Learning?
Why it’s everywhere and how it’s changing industries.
Supervised vs Unsupervised Learning
Key differences and when to use each.
Common ML Tasks & Applications
Classification, Regression, Clustering — real-world examples.
Typical ML Workflow
From defining the problem to deployment.
Nouman Ali (ITU) Artificial Intelligence (SE310T) Fall 2025 21 / 21