ML for Structured Data
— Week 1—
Fall 2025
Dr. M. Shahid Iqbal
1
Recommended Background
The formal prerequisite for this course is an intro to
programming, database systems, and some familiarity with
Probability and Statistics.
If you don’t have background in these areas, you may still
sign up, but be aware that you will probably need to learn
some of these concepts as the class goes on (we will be
providing pointers to references)
Course Detail
Text Books:
Machine Learning, Tom, M., 1st Edition (1997)
McGraw Hill
Hands-On Machine Learning with Scikit-Learn and
TensorFlow Concepts, Tools, and Techniques to
Build Intelligent Systems Beijing Boston, by Aurélien
Géron (Atleast first edition)
Introduction to Machine Learning, Ethem Alpaydin,
2nd Edition (2010) MIT Press
Grading Policy
1. Grading details:
Four Assignments (at least) (15 Marks)
Four Quizzes (at least) (10 Marks)
May be a course project but not confirmed
Mid Term (25 marks)
Final Term (50 Marks)
2. Try your best to follow the deadlines and avoid copying.
3. Be punctual in the class.
4. Questions are always welcome.
Introduction
What Is Machine Learning?
What is the difference between Data Mining and Data
Science?
What is Datafication?
Structure vs Unstructured data?
Types of ML
Difference between classification and regression?
A real-life example
Why Use Machine Learning?
5
What is Machine Learning
The field of machine learning is concerned with the
question of how to construct computer programs that
automatically improve with experience (T. Mitchell).
OR
Principles, methods, and algorithms for learning and
prediction on the basis of past experience.
OR
In the broadest sense, any method that incorporates
information from training samples in the design of a
classifier employs learning.
6
What is Data Mining?
Many Definitions
Non-trivial extraction of implicit, previously unknown
and potentially useful information from data
Exploration & analysis, by automatic or semi-automatic
means, of large quantities of data in order to discover
meaningful patterns
Extraction of interesting (non-trivial, implicit, previously
unknown and potentially useful) patterns or knowledge
from huge amount of data (Knowledge discovery from
data
7
What is Data Science
Data science is lying at the intersection of computer
science, statistics, and substantive application domains.
It is the study of “Where information comes from, what it
represents and how it can be turned into a valuable
resource in the creation of business and IT strategies”
Data science is a "concept to unify/merge statistics,
data analysis, machine learning and their related
methods" in order to "understand and analyze actual
phenomena" with data”.
8
Difference b/w Data Mining and Data
Science
Data Mining Data Science
Data mining is a process of extracting Data science refers to the process of
useful information, patterns, and trends obtaining valuable insights from structured
from huge databases. and unstructured data by using various tools
and methods.
Data mining is a technique. Data science is a field.
Primarily used for business purposes. Primarily used for scientific purposes.
It is involved with the process. It emphasizes the science of the data.
Data mining aims to make data more The objective of data science is to create a
important and usable; it means extracting dominant data product.
only useful information.
Data mining is a technique that is a part of It is related to the field of study like
KDD (Knowledge discovery in database Mechanical engineering, Cloud architecture,
process). etc.
It primarily deals with structured data. It deals with any kind of data like structured,
semi-structured, and unstructured.
9
Datafication
When we browse the web, we are unintentionally, being
datafied through cookies that we might or might not be
aware of.
When we walk around in a store, or even on the street,
we are being datafied in a completely unintentional way,
via sensors, cameras, or Google glasses.
10
Properties of Data
Structured vs. Unstructured Data.
Quantitative vs. Categorical Data
11
What is Structured Data?
Data organized in rows and columns
Stored in relational databases (RDBMS)
Easy to search, query, and analyze with SQL
Examples: transaction records, customer details, sensor
logs
Visual Suggestion: Screenshot of a table (columns: ID,
Name, Age, Salary) to depict structured format.
12
What is Unstructured Data?
Data not organized in predefined format
Lacks rows/columns → difficult to analyze directly
Examples:
Text: emails, social media posts, articles
Multimedia: images, audio, video
Logs: web clickstreams, chat conversations
Requires NLP, computer vision, or advanced ML for
analysis
Visual Suggestion: Word cloud + image + video icons.
13
Different Types of Structured Data
Numeric Data: integers, decimals, financial data
Categorical Data: gender, country, product type
Date/Time Data: timestamps, event logs
Ordinal Data: rankings (e.g., survey responses: poor →
excellent)
Boolean Data: true/false, yes/no values
Visual Suggestion: Table with columns → Type |
Example
14
Quantitative vs. Categorical Data
Quantitative data: Consists of numerical values, like
height and weight.
Such data can be incorporated directly into algebraic
formulas and mathematical models, or can be displayed in
conventional graphs and charts.
Categorical data: Consists of categories describing the
properties of the objects under investigation, like gender,
hair color, and occupation.
Categorical data can usually be coded numerically. E.g.
gender might be represented as male = 0 and female = 1.
15
Types of Machine Learning
Supervised learning, where we get a set of training inputs
and outputs. The correct output for the training samples is
available
Unsupervised learning, where we are interested in
capturing inherent organization in the data. No specific
output values are supplied with the learning patterns
Reinforcement learning, where there are no exact outputs
supplied, but there is a reward (reinforcement) for
desirable behaviour
16
Classification and Regression
Classification: To assign a label to an item from a
discrete set of possibilities.
Such problems as predicting the winner of a particular
sporting contest (team A or team B?) or deciding the
genre of a given movie (comedy, drama, or animation?)
are classification problems.
17
Classification and Regression
Regression: To forecast a given numerical quantity.
Predicting a person's weight or how much snow we will
get this year is a regression problem.
Where we forecast the future value of a numerical
function in terms of previous values and other relevant
features.
18
Problem Analysis
Given a real-life problem
19
Problem Analysis
Set up a camera and take some training samples to
extract features
Length
Lightness
Width
Number and shape of fins
Position of the mouth, etc…
This is the set of all suggested features to explore for use
in our classifier!
Purpose:
To classify the future samples based on the data of
extracted features from the training samples
11/06/25 20
An Example
A classification problem: the grades of students taking this
course
Key Steps:
1. Data (what past experience can we rely on?)
2. Assumptions (what can we assume about the students or
the course?)
3. Representation (how do we “summarize” a student?)
4. Estimation (how do we construct mapping from students
to grades?)
5. Evaluation (how well are we predicting?)
6. Model Selection (perhaps we can do even better?)
21
An Example
1. Data: The data we have available may be:
- names and grades of students in past years ML courses
- academic record of past and current students
Student ML Course X Course Y
Peter A B A Training
David B A A data
Jack ? C A Current/Future
Kate ? A A data
22
An Example
2. Assumptions:
There are many assumptions we can make to facilitate
predictions
1. The course has remained same roughly over the years
2. Each student performs independently from others
23
An Example
3. Representation:
Academic records are rather diverse so we might limit the
summaries to select few courses
For example, we can summarize the ith student (say Bilal) with a
vector
Xi = [A C B]
where the grades may correspond to numerical values
24
An Example
3. Representation:
The available data in this representation is:
Training data Data for prediction
Student ML grade Student ML grade (Class)
X1t B X1p ?
X2t A X2p ?
… …
25
An Example
4. Estimation
Given the training data
Student ML grade
X1t B
X2t A
…
We need to find a mapping from “input vectors” x to “labels” y
encoding the grades for the ML course.
26
An Example
Possible solution (nearest neighbor classifier):
1. For any student x, find the “closest” student xi in the training
set
2. Predict yi, the grade of the closest student
27
An Example
5. Evaluation
How can we tell, how good our predictions are?
- we can wait untill the end of this course...
- we can try to assess the accuracy based on the data
we already have (training data)
Possible solution:
- divide the training set further into training and test
sets
- evaluate the classifier constructed on the basis of
the training set on the test set
28
An Example
6. Model Selection
• We can refine
- The estimation algorithm (e.g., using a classifier
other than the nearest neighbor classifier)
- The representation (e.g., base the summaries on a
different set of courses)
- The assumptions (e.g., perhaps students work in
groups) etc.
• We have to rely on the method of evaluating the accuracy
of our predictions to select among the possible refinements
29
An Example
Data can be
- Symbolic or Categorical (e.g. High Temperature)
- Numerical (e.g. 45 0C)
We will deal with both Symbolic and Numerical data
30
An Example
From the available data we can
- Model the system which has generated the data
- Find interesting patterns in the data
There are multiple modelling approaches. i.e. Rule based
modelling of the system from which the data was generated
The search for interesting patterns is considered to be the
domain of Data Mining
31
Why Use Machine Learning
First, there are problems for which there exist no
human experts.
Example: in modern automated manufacturing facilities,
there is a need to predict machine failures before they
occur by analyzing sensor readings. Because the
machines are new, there are no human experts who can
be interviewed by a programmer to provide the knowledge
necessary to build a computer system. A machine learning
system can study recorded data and subsequent machine
failures and learn prediction rules.
32
Why Use Machine Learning
Second, there are problems where human experts
exist, but they are unable to explain their expertise.
This is the case in many perceptual tasks, such as speech
recognition, hand-writing recognition, and natural language
understanding. Virtually all humans exhibit expert-level
abilities on these tasks, but none of them can describe the
detailed steps that they follow as they perform them.
Fortunately, humans can provide machines with examples
of the inputs and correct outputs for these tasks, so
machine learning algorithms can learn to map the inputs to
the outputs.
33
Why Use Machine Learning
34
Why Use Machine Learning
Third, there are problems where phenomena are
changing rapidly.
Example: people would like to predict the future behavior
of the stock market, of consumer purchases, or of
exchange rates. The rules and parameters governing
these behaviors change frequently, so that the computer
program for prediction would need to be rewritten
frequently.
35
Why Use Machine Learning
Fourth, there are applications that
need to be customized for each
computer user separately.
Example: a program to filter
unwanted electronic mail messages.
Different users will need different
filters.
36
Any Question
37