Data Preparation

Keep the rare sensor failures visible

Fewer healthy successes, more failures detected

Most sensors are healthy. A score dominated by that class can conceal missed failures, so Botie will calculate recall within each class first.

BOTIE

Compare [95, 0] correct out of [95, 5] with [80, 4] correct out of [95, 5]. Why can the second classifier have higher balanced accuracy?
The inputs we are comparing

Correct predictions per class

Always healthy

  1. 095
  2. 10

More failures detected

  1. 080
  2. 14

Total observations per class

Same in both cases

  1. 095
  2. 15
Result for always healthy
0.5
Choose an explanation to test
The rare class comes first

This check uses the pieces from “Give each class one recall in the average”.

BOTIE

The supplied class order now begins with the rare class. Predict the average of the two class recalls, giving each class equal influence.
Correct predictions per class
  1. 01
  2. 172
Total observations per class
  1. 02
  2. 190

Use a number, text, or an array matching the requested result. For a matrix, put each row in brackets. Saving your prediction runs your current construction on these inputs and checks the earlier examples too.

Build a construction in the workspace above first. This case will test those pieces.

Why does equal class weight not automatically express the real cost of missing a failure?

Separate class balance from decision costs. A metric can reveal ignored classes without settling the action policy.

All supplied class counts are positive. Balanced accuracy does not encode application-specific mistake costs.

Work through the Python challenges →
Continue the courseWhat Near Means →
← What Could We Know at Prediction Time?