The 21st century has witnessed a fascinating and fast-evolving realm of research: Machine Learning (ML) and Deep Learning (DL). With these technological advancements, robots can now process historical data to make foresights about future scenarios with great efficiency.

Machine learning (ML) and deep learning (DL) are built on the idea of utilizing human intelligence and prior experiences to guide our present and future choices. Though these tools have already been implemented in numerous ways, their capacity to revolutionize our society is practically boundless.

As computers do not possess the same comprehension skills as humans, they rely on mathematics, algorithms, and data pipelines to extract intelligence from raw information. To enhance performance, two methods can be employed: enlarging the data pool or enhancing the accuracy of algorithms.

On a global level, an enormous number of data materials are generated every day, totalling billions of pieces. In order to make the best use of this vast quantity of data, it is necessary to cultivate fresh algorithms or boost the capacity of existing ones.

Models and algorithms are developed from mathematical concepts, encompassing fields such as calculus, probability, statistics, and similar areas. These can generally be sorted into two distinct groups that are easily distinguishable from one another.

### Models that possess discernment capabilities

### Models with the potential to create

This article will cover both approaches in detail. To gain a deeper understanding, we will first examine a brief story from their perspective.

## Top-Ranked Siblings

Zed and Zack, identical twins that are extremely close, bear an uncanny resemblance to each other. Both brothers possess exceptional genius, and they have managed to attain the top position in their class. Zed, in particular, has a rare gift – he can excel in any subject if given sufficient time and concentration. He is highly committed to his studies and puts in a lot of effort to comprehend subjects entirely. Despite his dedication, Zed often struggles with time constraints during exams, unlike his brother who generally has more time to prepare.

Zack has adopted a strategy of constructing a mental chart to help him organise his study materials. He starts by dissecting the big picture of a subject, then he can discern and identify the patterns within the details. By doing this, he improves his comprehension of the subject and becomes more adaptable in his thinking. Essentially, he can “learn” more effectively by recognising and appreciating the nuances.

Despite the fact that each brother possesses a distinctly different studying technique, their performances have remained exceptional, securing their place at the top of their class.

Drawing from this comparison, Zed is reflective of generative models, whereas Zack mirrors discriminative models.

Once the data produces estimated parameters, and Bayes’ theorem is employed to determine the posterior probability of P(Y|X), generative models establish a functional structure for both P(Y) and P(X|Y). Conversely, discriminative models compute the parameters directly from the provided data, while also taking into account a functional form of P(Y|X).

## Discriminative Models

Conditional models, more commonly known as discriminative models, find extensive application in supervised machine learning. With their ability to judiciously classify data points into separate groups, these models utilise probability estimates and maximum likelihood to determine the boundaries between such groups. They are incredibly effective in accomplishing their goal.

Discriminative models possess a high level of robustness against outliers. However, despite being more favourable over generative models, they may still encounter a considerable level of misclassification problems.

Below are some of the most frequently used varieties of discriminative models, as well as a brief explanation of each:

### Logistic Regression Analysis:

Linear and logistic regression models are two types of classification models that are often compared in terms of their usage. While linear regression is employed for predicting a continuous dependent variable, logistic regression is utilised to distinguish between two or more categories. Both models serve different purposes, and by recognising their differences, one can determine which model is best suited for a given scenario.### Support Vector Machines (SVMs) in AI:

In both regression and classification tasks, support vector machines (SVMs) form a potent and dependable learning technique. By utilising decision boundaries, SVMs are capable of categorising points in an n-dimensional data space, with the optimal boundary being a hyperplane.### Decision Trees:

Decision trees represent choices and their potential implications in a graphical, tree-like format. They function similarly to more sophisticated forms of “If-then” statements.

Some of the widely used examples, including neural networks, k-nearest neighbours, conditional random fields, and random forests, are exceptionally popular.

## Generative Models

As their name suggests, generative models are capable of producing new data points. They are frequently the most appropriate option for machine learning assignments that don’t necessitate direct human supervision.

Rather than simply modelling the cutoff for each category, generative models represent the complete distribution of data and assimilate different data points.

The primary drawback of generative models is their lack of proficiency in handling outliers compared to discriminative models. This machine learning technique works differently by estimating prior probability P(Y) and likelihood probability P(X|Y) to derive P(Y|X), rather than directly predicting the output. Additionally, the mathematical principles underlying generative models are relatively straightforward and easy to comprehend.

Using Bayes’ theorem’s formula, we can obtain an accurate estimate of P(Y|X) by plugging them into it.

The following is a list of examples and explanations of generative models.

### Bayesian Network:

This model, also known as a Bayes’ network, employs a directed acyclic graph (DAG) to carry out Bayesian inference of a collection of random variables, allowing for the computation of the probability of particular outcomes. It has various applications, including prediction, anomaly detection, and time series forecasting.### Autoregression Modelling:

It is particularly effective when it comes to time series modelling, as it employs historical data to forecast future events.### Adversarial Network (GAN) Generation:

This approach involves two submodels based on deep learning technology. The discriminator model is trained to differentiate between authentic and fake data points produced by the generator model.

Naive Bayes, Markov Random Field, Hidden Markov Model (HMM), Latent Dirichlet Allocation (LDA), and several others are additional examples.

## Discriminative or Generative – which task is better suited to Deep Learning?

Generative models have the ability to comprehend how data is distributed within a space, whereas discriminative models can determine the boundaries between various classes. These two methodologies, with their unique features, are suitable for various purposes.

Supervised machine learning techniques that are utilised in Deep Learning include Artificial Neural Networks (ANNs), Convolutional Neural Networks (CNNs), and Recurrent Neural Networks (RNNs). ANNs were the first of the three to utilise artificial neurons, backpropagation, weights, and biases to recognise patterns from inputs. CNNs, on the other hand, are frequently used for computer vision and image recognition tasks, and achieve results by combining relevant elements of an image. RNNs, which are the most recent of the three, are utilised in advanced applications such as natural language processing, handwriting recognition, and time series analysis.

Discriminative models excel in domains that require supervised tasks, which is where Deep Learning thrives.

Deep learning and neural networks can be employed to organise photographs by their similarities. Unsupervised deep learning techniques such as autoencoders, Boltzmann machines, and self-organising maps are commonly used. Generative models can be used for various tasks, including exploratory data analysis (EDA) of large datasets, noise reduction in images, image compression, anomaly detection, and even generating novel images.

The captivating website This Person Does Not Exist – Random Face Generator uses a generative model known as StyleGAN to produce incredibly lifelike human faces, despite the fact that the individuals featured in the images are not actual people.