liveBook · Manning

Performance

As explained in Grokking AI Algorithms, Second Edition

An evaluation metric is a quantitative measure of a model's performance on specified data or outcomes.

Performance is a measure of how well something achieves its goal. The meaning changes with context: it can describe a solution’s quality, an algorithm’s effectiveness, or the computational effort required. section 4.2

Use the meaning that matches the question:

  • Measure computational efficiency by asking how quickly an algorithm runs as input grows. Big O notation describes this growth: O(1) stays roughly constant, O(n) grows with the input, and O(n²) grows much faster. section 2.2
  • Measure solution fitness by asking how good the answer is for the problem. In a knapsack problem, a solution with greater total value has higher fitness, regardless of how long it took to find. section 4.2
  • Measure a machine-learning model with evaluation metrics such as accuracy, while checking performance on unseen data rather than trusting training results alone. section 8.13

A knapsack decision

Suppose a knapsack has limited capacity and can hold valuable objects. Brute force checks every possible combination and selects the best valid one, but the number of combinations can become impractical as the dataset grows. An evolutionary algorithm may instead find an acceptable solution without guaranteeing the optimum. Comparing the solution’s value with the computation required separates fitness from computational efficiency. section 4.2

Figure 2.3 Big O complexity

Compare how constant, linear, and quadratic computation costs grow as the input becomes larger. section 2.2

How Grokking AI Algorithms, Second Edition covers it

How deep it goes
Defines several meanings, compares computational growth, and warns that training accuracy can misrepresent performance on unseen data.
Examples
Uses handshake analogies, knapsack combinations, brute-force benchmarks, and training-versus-unseen-data accuracy comparisons.
What you can do after
Evaluate algorithms and models by separating answer quality, computation cost, and generalization to unseen data.
How it connects
Connects Big O notation, computational efficiency, solution fitness, brute-force algorithms, evolutionary algorithms, evaluation metrics, and overfitting.

Also explained in

Compare how 40 books explain performance →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking AI Algorithms, Second Edition. The section links point to the parts of the book it draws on.