Machine Learning for Beginners

Professor Stanley H. Chan, Purdue University, Summer 2022

What is this program?

i2Lab's educational outreach program aims at providing STEM educational enrichment to students in the United States and overseas. We are very thankful for the generous supports from the National Science Foundation.

The program is designed for 10th-12th grader and college year 1 students who are interested in programming and mathematics.


Program Day: June 6, 2022 - Jun 10, 2022.
Time: 8:30am-11am Eastern Time

Zoom synchronous meeting

Fee: $200

Course Information

Instructor: Professor Stanley H. Chan

Teaching Assistant:
Nick Chimitt,


  • High school algebra 2. Calculus 1 is recommended, but not required.

  • Interested in mathematics and programming.

  • No background in programming is required. We will teach you from scratch.

  • Have access to a comptuer and internet.

  • Have a Google account. We will use Google Colab for all our homework.

Lecture Note

Course materials are restricted to participating students.

  • Day 1 Introduction

    • What is machine learning? What can be learned, and what cannot be learned?

    • Python basics. Defining variables. Data types. If-then-else, for-loop, while-loop.

    • Plotting functions in Python. How to define a function in Python? How to evaluate a function? How to visualize a function?

  • Day 2 Linear regression: Fitting data with a line

    • Concept of a line: slope and y-intercept. Concept of noisy data points drawn from a line.

    • Basic concepts about arrays, matrices and vectors.

    • How to write the line fitting problem in the form of matrix and vector? How to visualize the data fitting problem?

  • Day 3 Minimizing a function

    • What is minimization? We will visualize the process without using calculus.

    • How to apply the minimization technique to fit data?

    • Why is a single-layer neural network the same as a line fitting problem?

  • Day 4 Pattern recognition

    • What is inner product and cosine angle? How can they be used to classify a two-class dataset?

    • How to implement a simple pattern recognition method?

  • Day 5 Image processing

    • What are images? What are colors?

    • How to read and write images?

    • How to do filtering on images?

    • How to extract feature from images?

Learning Outcomes

  • Students completing the course will be able to

    • Use Python to do the most basic scientific computing, such as plotting, and processing images.

    • Understand what it means for statistics, linear algebra, and optimization.

    • Use non-technical language to explain a few ideas such as line fitting, feature extraction, and classification.

    • Say machine learning is fun.

  • Our goals are realistic. The followings are not the purpose of this course:

    • Demonstrate proficient in programming, nor writing a complete Python program on their own.

    • Be able to develope an app or software.

    • Be able to program a robot and make it move.

    • Can bypass the normal high school math syllabus.