In machine learning, models can be classified in various categories.In this article we will be looking the difference between generative and discriminative models.
Generative Models:
Under this type of machine learning, model will be trained to generate new data set which is similar to the sample dataset given to train the model.For example if we provide sample images of an elephant and ask the system to learn from it and then model itself will generate a brand new image of elephant which does not exists in the sample data provided.
Generative models are quite challenging to create since model has to recreate a new data set which does not exists in the sample data.If we talk about our example of re-creating an image of elephant which does not exists in the sample images then model has to identify the underlying distribution of sample data and create a new image from scratch.Until few years back, these models were considered very difficult to model but with the advancement of machine learning technology these days not only feasible but also is being used in accomplishing many use cases.
Discriminative Models:
In discriminative models, focus is on identifying the boundaries of the classes in dataset.Unlike generative models, these models are not capable of generating new datasets.For example, we provide various images of animals to the model and label them as elephant or dog as per the animal property.Then based on the model will easily identify if provided image is of elephant or not.But unlike Generative model, this model does not draw any image.Problems which are discriminative in nature are most suited for such models.These models are easier to prepare since it does not create a new data set since goal is to find the decision boundary of the provided data set.Discriminative models are more robust as compared to Generative models.