Skip to content
Learn Python with BNHR

Debugging drill D2 · Intermediate

Debugging drill: a detector that flags the wrong rows

Debugging drill D2 of Python for Survey Statistics, after module 9: six bugs that make an anomaly detector flag the wrong rows, to predict, trace, fix and explain.

Extra D2Level Intermediate
On this page
  1. Overview
  2. What you do
  3. Its notebooks
  4. Certification and support

Six detectors on the survey, each with one mistake that makes it flag the wrong rows: the weight used as a feature, features of different scales given to LOF, contamination set from the wrong table, duplicates fitted twice, an id column read as a number and learned from, and ECOD scored chunk by chunk. Each check starts red.

For each one you predict what the detector flags, run it, trace the line that makes the difference, fix it, and say in one sentence what the mistake was. None of them raises an error: a detector with a mistake still returns a list of rows, and only the check tells you it is the wrong list. The companion has each fix and why it works.

  1. A detector that flags the wrong rows: six bugs to find and fix

The notebooks are in your course folder; here you can read them without running anything. For reference in any module: primer: from r to python and primer: survey sampling in one page and glossary.

Saved in this browser only

Certification and support

We offer additional resources, certificates, ongoing support, and other perks to those who join our instructor-led training.

Join an upcoming training to take this as an instructor-led course, or contact us to arrange one for your team or organization.

Something new

Identify results
LayerExplore a debugging drill
Debugging drill D2Debugging drill: the report that goes wrong
AboutThe second debugging drill of Arrays & DataFrames, after module 5: five mistakes that put wrong numbers in a survey report, to predict, trace, fix and explain.
CourseArrays & DataFrames, free