liveBook · Manning

Bias

As explained in Starting Data Analytics with Generative AI and Python

Bias is a systematic preference or assumption that can distort the selection or interpretation of information, including generative-model outputs.

Bias is a systematic preference or assumption that can distort what information is selected or how results are interpreted. In generative AI, biased outputs may unfairly favor some groups or reproduce prejudices. In analytics, they can lead to misguided decisions and perpetuate inequalities. section 8.5 section 5.5.2

Bias can enter a workflow at several points. A model may reflect its training data or design assumptions; even with a suitable model, skewed inputs or processing choices can affect the result. section 8.5 section 8.5.1

Look for these sources of bias:

  • Inherent bias is already present in the model, whether from its algorithm or training data. section 8.5.1
  • Data bias comes from unbalanced or nonrepresentative input data. section 8.5.1
  • Preprocessing bias can arise during cleaning or feature selection; label bias comes from subjective or biased labels. section 8.5.1

To identify and address bias, make checking an ongoing part of the workflow:

  • Monitor output patterns and compare performance across groups or subsets. Ask users and stakeholders what problems they have encountered. section 8.5.2
  • Where appropriate, use disparate impact analysis, confusion matrices, or residual analysis to look for disparities or patterns in errors. section 8.5.2
  • Consider adjusting outputs without retraining, but evaluate whether the adjustment itself skews results. It should not replace checking whether the model suits the task. section 8.5.2
  • If a pretrained model has an inherent bias that you cannot correct, communicate the problem to its developer or provider. section 8.5.1

Loan underwriting

A model estimating default probability for a residential loan can inform an underwriter’s decision. Check it carefully for biases arising from skewed historical training data, and compare performance across relevant groups where possible. section 8.5.2

Keyword searches

A slight preference in keyword selection can narrow a search and hide emerging topics. AI can suggest more keywords, but its knowledge may be out of date; use other methods if its suggestions seem unreliable. section 5.5.2

How Starting Data Analytics with Generative AI and Python covers it

How deep it goes
Classifies sources of bias and outlines monitoring and mitigation techniques, while noting that compensation is delicate and domain-specific.
Examples
Uses residential-loan underwriting and keyword generation to illustrate biased inputs and narrowed selection.
What you can do after
Evaluate model outputs for potential bias and consider mitigation without assuming adjustments make the model suitable.
How it connects
Connects bias to fairness, preprocessing, disparate impact analysis, confusion matrices, and residual analysis.

Also explained in

Compare how 29 books explain bias →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Starting Data Analytics with Generative AI and Python. The section links point to the parts of the book it draws on.