A factor is a function that maps a set of random variables to a real value. is called the scope of .

Factors are used to construct probability distributions involving random variables, but the factor itself doesnโ€™t have any constraintsโ€”it doesnโ€™t need to sum to one. In fact, constructing a probability distribution from factors often gives us an unnormalized distribution that must be normalized to be a valid distribution.

Operations

We can perform multiple operations on factors:

  1. Factor summation adds the corresponding pairs of outputs for a given input. For example, if our two scopes are and , then
  1. Factor product combines the scope of two factors and so that the output of a specific input is the product of the outputs of the two factors. For example, using the same setup as above,
  1. Factor marginalization reduces the scope of a factor by marginalizing over one of the random variables. For example, if we marginalize out of the scope , then
  1. Factor reduction removes a random variable from the scope by only considering outputs where the random variable is a specific value. For example, if our original scope is and we assume a constant value for , then
  1. Factor maximization removes the random variable by choosing the largest output that the random variable can give for the rest of the inputs. For example, using the same scope as above,