The training methods described above are discriminative training methods, because they seek to find a function g {\displaystyle g} that discriminates well between the different output values (see discriminative model). For the special case where f ( x , y ) = P ( x , y ) {\displaystyle f(x,y)=P(x,y)} is a joint probability distribution and the loss function is the negative log likelihood − ∑ i log ⁡ P ( x i , y i ) , {\displaystyle -\sum _{i}\log P(x_{i},y_{i}),} a risk minimization algorithm is said to perform generative training, because f {\displaystyle f} can be regarded as a generative model that explains how the data were generated. Generative training algorithms are often simpler and more computationally efficient than discriminative training algorithms.