The models described in Supervised Learning are discriminative models. These make an output prediction from real-world measurements .

Another approach is to build a generative model , in which the real-world measurements are computed as a function of the output . The disadvantage of this is that we don’t directly predict . To perform inference, we must invert the generative equation as , and this may be difficult. However, generative models have the advantage that we can build in prior knowledge about how the data were created. For example, if we wanted to predict the 3D position and orientation of a car in an image , then we could build knowledge about car shape, 3D geometry, and light transport into the function .

Most modern machine learning models are still discriminative; the advantage gained from exploiting prior knowledge in generative models is usually trumped by learning very flexible discriminative models with large amounts of training data.