1 of 59

Introduction to Machine Learning

Based on:

Hands-On Machine Learning with Scikit-Learn and PyTorch (Aurélien Géron)

Ibrahim Said Ahmad, PhD

Week 1: Introduction to Machine Learning

2 of 59

Meet Your Instructor: Ibrahim Said Ahmad, PhD

Bridging AI research with practical education to empower the next generation of computing professionals

3 of 59

Academic Leadership and Global Experience

Assistant Professor

UW–Stevens Point

2025 - Present

Leading curriculum development and student mentorship in the Department of Computing and New Media Technologies.

Postdoctoral Research Fellow

Northeastern University

2023 - 2025

Conducting advanced research at the Institute for Experiential AI on NLP and computational social science.

Lecturer (~Assistant Professor)

Bayero University Kano

2014 - 2023

Teaching AI, Machine Learning, and Database Systems while mentoring graduate research projects.

4 of 59

Research at the Frontier of AI and Society

Natural Language Processing

Specializing in NLP techniques that address real-world challenges in understanding and processing human language.

​

​

Computational Social Science

Applying computational methods to understand social phenomena through sentiment analysis, hate speech detection, and emotion analysis.

​

​

Low-Resource Languages

Dedicated to addressing linguistic and cultural disparities in AI systems through dataset creation and cultural adaptation.

5 of 59

Award-Winning Research and Global Initiatives

Competitive Grants

    • Over $400,000 from Google Research, Lacuna Fund, and Oracle

​

Research Awards

    • Best Paper, ACII 2025
    • Best Resource Paper Award, ACL 2025 (BRIGHTER)
    • SemEval Best Task Award, ACL 2025
    • Honorable Mention, SemEval 2024

​

Global Initiatives

    • Co-founder, HausaNLP
    • Co-founder, ArewaDataScience

6 of 59

Hands-On Education

Expert instruction in Artificial Intelligence, Machine Learning, and Programming with emphasis on practical application.

​

Mentorship Through Research

Guiding students through research projects and real-world problem solving to develop critical thinking skills.

​

Student Success

Committed to empowering students with technical skills and knowledge needed for the modern AI landscape.

Teaching Philosophy: Bridging Theory and Practice

7 of 59

About the Course

8 of 59

What You'll Learn

Machine learning fundamentals

Core concepts, terminology, and ML categories

Python ML workflows

Data preprocessing, feature engineering, and complete pipelines

​

Classical ML algorithms

​

Classification, regression, clustering, and ensemble methods

​

Model evaluation

Interpret outputs, use metrics, and design ethical AI systems

9 of 59

Course Structure

20 points

Assignments

5 assignments on AI concepts

40 points

Course Project

Build an AI application

30 points

Exams & Quizzes

4 quizzes + midterm + final

10 points

Participation

Active engagement in class

Total: 100 points

10 of 59

Academic Integrity

All work must be original and individual

Unless collaboration is explicitly allowed in assignment instructions

AI Use Policy

  • Unauthorized use of generative AI is not permitted
  • Microsoft Copilot may be authorized for specific assignments
  • Always document AI use when permitted

​

Using third-party resources

Properly cite any code or materials you incorporate. Failure to cite is academic misconduct.

11 of 59

Late Submission Policy

25%

Late Penalty

25% of total points deduction per day late submission penalty

​

0

Points Awarded

For submissions more than 4 days late

​

Request extensions BEFORE the due date for legitimate reasons

12 of 59

Course Topics

Weeks 1-4

ML landscape & end-to-end projects

Weeks 5-6

Classification & model evaluation

Weeks 7-8

Linear models & regularization

Week 9

Support Vector Machines

Weeks 10

Decision Trees

Weeks 11

Ensemble methods (Random Forest, Boosting)

Weeks 12-13

Dimensionality reduction & clustering

Weeks 14-16

Integration, final project & presentations

13 of 59

Tools & Keys to Success

Tools We'll Use

Keys to Success

Attend class regularly

Start assignments early

Ask questions when stuck

Practice coding between classes

Python

Programming language

​

Google Collab

Free development environment

ML Libraries

NumPy, Pandas, Scikit-Learn, Matplotlib

14 of 59

  • Machine learning powers:
    • Search engines
    • Recommendation systems
    • Voice assistants
    • Chatbots
  • ML is no longer “behind the scenes”

Why This Course?

Goal: learn how ML systems are designed, trained, and evaluated

15 of 59

Learning Objectives

By the end of this week, you should be able to:

Define machine learning formally

Explain when ML is preferable to traditional programming

Classify ML systems

Describe a typical ML workflow

Identify common ML pitfalls

Understand model evaluation basics

16 of 59

  • Machine learning is the science (and art) of programming computers so they can learn from data.
  • Here is a slightly more general definition:

[Machine learning is the] field of study that gives computers the ability to learn

without being explicitly programmed.

—Arthur Samuel, 1959

  • And a 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

What Is Machine Learning?

17 of 59

A program learns from:

    • Experience (E)
    • With respect to Task (T)
    • As measured by Performance (P)

Formal Definition (Tom Mitchell)

Example:

    • Task: spam detection
    • Experience: labeled emails
    • Performance: accuracy

18 of 59

Key ML Terminology

Training Set

Training instance (sample)

Feature

Model

dataset

Accuracy (example metric)

Evaluation

19 of 59

  • Downloading data ≠ learning
  • Storing information ≠ intelligence

​

Learning requires:

  • Task
  • Feedback
  • Performance improvement

What ML Is Not

20 of 59

Traditional programming struggles when:

    • Rules are complex
    • Environments change
    • No known algorithm exists
    • Data is large and noisy

Why Use Machine Learning?

21 of 59

  • Hard-coded rules
  • Manually analyze patterns
  • Write detection rules
  • Maintain forever

Figure 1-1. The traditional approach

Traditional Programming Approach

22 of 59

  • Learn patterns from data
  • Shorter code
  • Easier maintenance
  • Better adaptability

Figure 1-2. ”The machine learning approach

Machine Learning Approach

23 of 59

  • ML systems retrain automatically
  • Detect new patterns without manual updates

Figure 1-3. Automatically adapting to change

Adapting to Change

24 of 59

Examples:

  • Speech recognition
  • Image recognition
  • Language translation
  • Why ML?
    • No scalable rule-based solution exists

ML for Hard Problems

25 of 59

  • Discover hidden patterns
  • Reveal correlations
  • Enable data mining

Figure 1-4. Machine learning can help humans learn

ML Can Help Humans Learn

26 of 59

ML is useful for:

  • Complex rule systems
  • Changing environments
  • Unknown algorithms
  • Insight discovery

Summary: Why ML?

27 of 59

  • Image classification
  • Tumor detection
  • Text classification
  • Fraud detection
  • Recommendation systems
  • Games and robotics

Examples of ML Applications

28 of 59

Three major axes:

    • Training supervision
    • Batch vs online learning
    • Instance-based vs model-based learning

How Can We Classify ML Systems?

29 of 59

  • Labeled data
    • Classification
    • Regression

​

Examples:

​

  • Spam detection
  • House price prediction

Figure 1-5. A labeled training set for spam classification

Supervised Learning

30 of 59

  • Predict numeric values

​

​

  • Output is continuous

Figure 1-6. A regression problem: predict a value, given an input feature

Regression Example

31 of 59

  • No labels
  • Discover structure
  • Patterns emerge automatically

​

Examples:

  • Clustering
  • Visualization
  • Anomaly detection

Unsupervised Learning

32 of 59

  • Group similar instances
  • No predefined categories

Figure 1-7. Clustering

Clustering

33 of 59

  • Reduce complexity
  • Preserve structure

Figure 1-8. Example of a t-SNE visualization highlighting semantic clusters

Visualization & Dimensionality Reduction

34 of 59

  • Identify unusual behavior
  • Fraud detection
  • Manufacturing defects

Figure 1-9. Anomaly detection

Anomaly Detection

35 of 59

  • Few labels
  • Many unlabeled examples
  • Combines supervised + unsupervised learning

Figure 1-10. Semi-supervised learning with two classes

Semi-Supervised Learning

36 of 59

  • Labels generated automatically
  • Foundation of modern deep learning
  • Pretraining → fine-tuning

Figure 1-11. Self-supervised learning example: input (left) and target (right)

Self-Supervised Learning

37 of 59

  • Agent
  • Environment
  • Actions
  • Rewards
  • Policy

Figure 1-12. Reinforcement learning

Reinforcement Learning

38 of 59

  • Train once on full dataset
  • Offline learning
  • Requires retraining to adapt

Batch Learning

39 of 59

  • Incremental updates
  • Mini-batches
  • Continuous learning

Figure 1-13. In online learning, a model is trained and launched into production, and then it keeps learning as new data comes in

Online Learning

40 of 59

  • Datasets too large for memory
  • Learn chunk by chunk

Figure 1-14. Using online learning to handle huge datasets

Out-of-Core Learning

41 of 59

Instance-Based Learning

  • Memorize examples
  • Similarity-based predictions

Figure 1-15. Instance-based learning: in this example we consider the class of the three nearest neighbors in the training set

Instance-Based Learning

42 of 59

  • Learn parameters
  • Build predictive model

Figure 1-16. Model-based learning

Model-Based Learning

43 of 59

  • Study the data
  • Select a model
  • Train the model
  • Make predictions

A Typical ML Workflow

44 of 59

  • Input: GDP per capita
  • Output: Life satisfaction
  • Model: linear regression

Figure 1-17. Do you see a trend here?

Example: GDP vs Life Satisfaction

45 of 59

  • Choose model type
  • Define parameters
  • Choose loss function

Figure 1-18. A few possible linear models

Model Selection

46 of 59

Training

  • Minimize loss
  • Fit training data

Figure 1-19. The linear model that fits the training data best

Training & Inference

Inference

  • Apply trained model
  • Predict on unseen data

47 of 59

Two big categories:

​

  • Bad data
  • Bad models

​

Main ML Challenges

48 of 59

  • ML needs lots of examples
  • Especially for complex tasks

Figure 1-21. The importance of data versus algorithms

Insufficient Training Data

49 of 59

  • Sampling bias
  • Nonresponse bias
  • Leads to poor generalization

Figure 1-22. A more representative training sample

Non-Representative Data

50 of 59

  • Noise
  • Missing values
  • Outliers
  • Irrelevant features

Poor-Quality Data

Image source: https://markkolier.com/wp-content/uploads/2016/11/bad-data1.png

51 of 59

Overfitting

  • Model too complex
  • Learns noise
  • Poor generalization

Overfitting and Underfitting

Underfitting

  • Model too simple
  • Misses patterns
  • Poor training performance

Balance

52 of 59

  • Constrain model complexity
  • Reduce overfitting

Figure 1-24. Regularization reduces the risk of overfitting

Regularization

53 of 59

  • Training set: learn
  • Test set: evaluate
  • Measure generalization error

Training vs Test Set

54 of 59

  • Tune hyperparameters
  • Avoid test set leakage

Figure 1-25. Model selection using holdout validation

Validation Set

55 of 59

  • Training data ≠ production data
  • Use train-dev set

Figure 1-26. Train-Dev Strategy

Data Mismatch

56 of 59

  • No universally best model
  • Assumptions matter
  • Evaluation is essential

No Free Lunch Theorem

57 of 59

  • ML learns from data
  • Many system types exist
  • Data quality matters
  • Evaluation is critical

Big Picture Summary

58 of 59

Next week:

  • End-to-end ML project
  • First hands-on coding
  • Scikit-Learn workflow

What’s Next?

59 of 59

  • Read Chapter 1
  • Review terminology
  • Install Python / Jupyter / Colab

Reading & Homework