liveBook · Manning

Macro average

As explained in Build AI Drug Discovery Pipelines

Macro averaging calculates a metric separately for each class and then gives every class equal weight in the mean.

Macro averaging calculates a metric independently for each class, then takes the simple mean. Every class receives equal weight, regardless of how many examples it contains. This makes macro averages useful when performance on minority classes matters as much as performance on common biological activities. section 5.4.2

Macro versus micro precision

For three classes with precisions of 0.90, 0.60, and 0.80, macro precision is (0.90 + 0.60 + 0.80) / 3 ≈ 0.77. Micro precision pools the counts first and produces 0.80, because the larger high-precision class contributes more instances. Use macro precision when weak performance on rare activities should remain visible. section 5.4.2

How Build AI Drug Discovery Pipelines covers it

How deep it goes
Defines class-wise averaging and works through a precision calculation, while stopping short of implementation details.
Examples
Uses three class-level precision values and compares their macro mean with pooled micro precision.
What you can do after
Evaluate model performance while retaining visibility into minority-class behavior.
How it connects
Contrasts with micro averaging and connects to F1 score, precision, multilabel classification, and class imbalance.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build AI Drug Discovery Pipelines. The section links point to the parts of the book it draws on.