Utility function
A utility function maps outcomes or alternatives to numerical values representing their desirability or preference for a decision maker or objective.
Grokking Bayes
A utility function maps possible outcomes or parameter values to numerical values representing their desirability.
- How it is used
- Turns preferences over uncertain outcomes into values that can be compared when choosing an action.
- How deep it goes
- Develops a continuous utility function from a small outcome table, then averages its values using sampling when direct integration is difficult.
- Examples
- Uses a website launch decision, a conversion-rate utility table, and NumPy samples from a Beta distribution.
- What you can do after
- Apply it via NumPy sampling to compare expected utilities for launching or retaining a website design.
Bayesian Optimization in Action
Utility is the value assigned to an outcome according to how desirable or useful it is for an optimization goal.
- How it is used
- Ranks candidate evaluations in Bayesian optimization by progress toward the objective optimum or information gained per query cost.
- How deep it goes
- Defines utility through incumbents, Gaussian-process predictions, information gain, and cost-aware ROI, but does not derive the full underlying models.
- Examples
- Uses objective values 2, 10, 20, and 21, plus ROI scores and low- versus high-fidelity query comparisons.
- What you can do after
- Apply it via Bayesian optimization to judge candidate queries by expected improvement or information gained per unit cost.
Read how Bayesian Optimization in Action explains utility function →
Timeless Algorithms, The Foundational Ideas
Utility is a numerical representation of the desirability or preference associated with an outcome.
- How it is used
- Frames utility as the preference measure that turns uncertain outcomes into choices among available acts.
- How deep it goes
- Defines utility and connects it to expected utility and opportunity loss through equations and a diagnostic decision.
- Examples
- Uses a physician’s treat-or-not decision across disease-present and disease-absent states.
- What you can do after
- Evaluate acts by weighting outcome utilities with state probabilities and choosing the act with greatest expected utility.
Read how Timeless Algorithms, The Foundational Ideas explains utility function →
Also covered in
- Privacy-Preserving Machine Learning
- Build a Robo-Advisor with Python (From Scratch)
- Authorization in Action
- Delivering Machine Learning Projects: From design to deployment
What to know first
- actionAn action is a choice or operation selected or performed by an actor that can affect a system, environment, or process.
- privacyPrivacy is the protection of information about people or other sensitive subjects from inappropriate collection, access, use, or disclosure, including control over how it is handled.
Related concepts
- expected utilityused by · Expected utility is the probability-weighted average of the utility values of possible outcomes associated with an action or decision.
- InverseCostWeightedUtilityimplemented by · InverseCostWeightedUtility is a BoTorch utility implementation that weights information or value by the inverse of evaluation cost.
- opportunity lossused by · Opportunity loss is the payoff or utility forgone by choosing an action rather than the best action for the realized state of the world.
Questions about utility function
What is utility function?
A utility function maps outcomes or alternatives to numerical values representing their desirability or preference for a decision maker or objective.
Which Manning books explain utility function?
Grokking Bayes, Bayesian Optimization in Action and Timeless Algorithms, The Foundational Ideas.
What should I know before learning utility function?
Manning books that teach utility function usually introduce action and privacy first.
What is the difference between utility function and data perturbation?
A utility function maps outcomes or alternatives to numerical values representing their desirability or preference for a decision maker or objective. Data perturbation is the deliberate modification or randomization of data or released results to reduce disclosure of original values while retaining analytical utility.
What kinds of utility function are there?
Kinds of utility function include concave utility function.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


