Skip to content
Truth Academy.
Truth Academy
← All modules
The Math UnderneathAdvanced45 min

Optimization for Data Science

Finding the best option among trillions: the engine that schedules airlines, prices markets, and trains models.

AI tutor is turned off for this class

Use the MS&E211DS lectures, notes, and assignments below to keep learning.

Big Idea

The Math Underneath

Grade bands

K-2 · 3-5 · 6-8 · 9-12

View on the ladder →

Lesson overview

Finding the best option among trillions: the engine that schedules airlines, prices markets, and trains models.

Teacher script · 45 min

  1. 0–5

    Hook

    Optimization is just: get the most of what you want while obeying limits. Most profit, given a budget. Shortest route, given the roads. Once you can write down your goal and your constraints clearly, math can often find the best answer.

  2. 5–15

    Explore

    Students do the activity in pairs: Graph 'x + y <= 10' and 'x, y >= 0,' then find the point maximizing x + 2y. It's a corner.

  3. 15–30

    Explain

    Some problems are 'convex': bowl-shaped, with one bottom you can reliably roll down to. Others are bumpy, full of false bottoms (local minima) that trap you. Knowing whether your problem is convex tells you whether 'just go downhill' will find the true best answer or fool you. ML lives squarely in the bumpy world, which is why training is hard.

  4. 30–40

    Connect to the summit

    Read aloud the "From the summit" section below. Ask students which ideas from today they recognize in it.

  5. 40–45

    Check

    Run the formative check below. Anyone who can explain a key term in their own words has it.

Student activity

Graph 'x + y <= 10' and 'x, y >= 0,' then find the point maximizing x + 2y. It's a corner.

Slides

1Title: Optimization for Data Science
2Hook: Best, given the rules
3Do it: Draw the feasible region
4How it works: Convexity is the dividing line
5Key idea: Objective function
6Key idea: Constraint
7Key idea: Convexity
8From the summit: the Stanford course

Formative check

  • 1.In your own words, what is "Objective function"? (Looking for: The single quantity you're trying to make as large or small as possible.)
  • 2.In your own words, what is "Constraint"? (Looking for: A rule the solution must obey, like a budget or capacity limit.)
  • 3.In your own words, what is "Convexity"? (Looking for: A bowl-shaped problem with one true bottom, so 'go downhill' always works.)

Carry-away concepts

Objective function
The single quantity you're trying to make as large or small as possible.
Constraint
A rule the solution must obey, like a budget or capacity limit.
Convexity
A bowl-shaped problem with one true bottom, so 'go downhill' always works.
Duality
A mirror version of a problem that reveals the value of each constraint.

From the summit · the Stanford source

You formulate and solve linear, convex, and integer optimization problems, and connect duality and gradient methods to data science.

This module is based on a Stanford course.