Generative Modeling
Introduce Data That Never Exist!!!
Consider yourself as an eye witness for a crime. but the video that was presented to the judicial shows that the witness was eating Quesadilla in a restaurant on the hour of that incident. Surprised!!! yes, this can be achieved using Generative modeling.
A generative model can do even more than we conceive. It can generate fake faces that are never existed, photo editing, Text-to-Image Translation many more.
A generative model is a model of the conditional probability of the observable X, given a target y, symbolically, P(X|Y=y)
The main goal of a generative model is to generate a set of features that resembles the observation on which it was trained on. that is, consider a training set which consists of images, and each image pixels are the features on which the generative model trained on. Now the task of this model is to generate a new set of features as if it was generated using the reference of the training images which makes the output image is as the original image but in a different distribution. So this makes generative models an example for unsupervised learning which is way far different from the discriminative models which are an example of supervised learning.
Discriminative model
Consider a training set consist of 100 observation which describes whether a car is a sedan or SUV and their features are (BHP, Car_length, Car_width, Tyre_size)
Using a discriminative model we can predict whether a given new instance is a sedan or an SUV. Discriminative models learns the patterns from those features(BHP, Car_length, Car_width, Tyre_size) for a given 100 observations. when a new instance is passed it finds for a pattern in the observation and predicts the class.
Discriminative models are examples of supervised learning which only train on observations that have a target variable. In this case, sedan or SUV. If we want a model to generated a new car image using a reference of those 100 observations discriminative models will fail to generate.
Generative model
The Generative model is trained on 100 car images where each pixel is a feature that is, consider each image is 25*25 which means there is a total of 625 features. Now the model is trained on these 100 car images and sampled to generate new images. The generative model works on conditional probability because if it is deterministic it generates the same output image every time.
The main disadvantage of generative models are the computational expense
Then Generative models are more useful than discriminative models!?
No both Discriminative and Generative models are useful but it only depends on how we want to solve the problem that is if our task is to just predict whether a given new instance fall under sedan or SUV the discriminative model play a role because we are only concern on predicting the class not to generate a sedan or an SUV.
Thank you