Skip to main content
Module 8 · Lesson 4 of 440/56 in the course~22 min
Module lessons (4/4)

Cost-sensitive decisions

Lesson preview5 hands-on exercises readyMachine Learning: from first principles to practice · Module 8 — Model selection and tuning

Choosing a threshold from the costs of mistakes or a recall target.

What you'll learn in this lesson

  • Turn the costs of the two kinds of mistake into a decision threshold.
  • Search for the threshold that minimises the expected cost.
  • Choose a threshold from a recall target with the precision-recall curve.

Overview

A model produces a probability. A business needs a decision: approve or reject the loan, test the patient or not, block the transaction or let it through. The threshold between them should come from what the mistakes cost, not from the default 0.5.

Suppose missing a fraud (a false negative) costs 100 and wrongly blocking a customer (a false positive) costs 5. Flagging many cases is then worth it: lower the threshold until the extra false alarms cost more than the frauds they catch.

Sections covered in this lesson

  1. 1The hook: the best model is not the best decision
  2. 2Decision-threshold strategies compared
  3. 3Try it again: threshold & cost explorer
  4. 4Progressive examples: optimising real business decisions
  5. 5Practice
  6. 6Check your understanding
Pro Lesson · Module 8 — Model selection and tuning

Unlock "Cost-sensitive decisions" and the full Machine Learning: from first principles to practice curriculum

Choosing a threshold from the costs of mistakes or a recall target.

Unlock all 5 hands-on exercises in this lesson plus every advanced WebAssembly module with automated checks.

  • Instant access to all advanced modules in Machine Learning: from first principles to practice plus 17 more courses
  • Hands-on browser exercises with automated test suites and solutions
  • 14-day money-back guarantee processed via Paddle.com

14-day guarantee · Cancel anytimeModule 1, all 18 interactive games, and cheatsheets are always free.