  A supervised machine learning algorithm determines a model from a learning
sample that will be used to predict new observations. To this end, it
aggregates individual characteristics of the observations of the learning
sample. But this information aggregation does not consider any potential
selection on unobservables and any status-quo biases which may be contained in
the training sample. The latter bias has raised concerns around the so-called
\textit{fairness} of machine learning algorithms, especially towards
disadvantaged groups. In this chapter, we review the issue of fairness in
machine learning through the lenses of structural econometrics models in which
the unknown index is the solution of a functional equation and issues of
endogeneity are explicitly accounted for. We model fairness as a linear
operator whose null space contains the set of strictly {\it fair} indexes. A
{\it fair} solution is obtained by projecting the unconstrained index into the
null space of this operator or by directly finding the closest solution of the
functional equation into this null space. We also acknowledge that policymakers
may incur a cost when moving away from the status quo. Achieving
\textit{approximate fairness} is obtained by introducing a fairness penalty in
the learning procedure and balancing more or less heavily the influence between
the status quo and a full fair solution.
