In this post, we will discuss about the various Machine Learning Algorithm. The main objective of this blog is to give you a basic level of understanding on what are the different types of Machine Learning Algorithm present.

There are many algorithms and it might seem a bit overwhelming to see a bunch of them, but trust me, this will be a good one and fun to learn as well!!

Machine Learning Algorithm are usually used in varied number of applications such as fraud detection, computer vision, autonomous vehicles, where it is not computationally feasible to develop conventional algorithms to fulfil the required

To better understand what these different Machine Learning Algorithm are, let’s just take a step back and see the broader umbrellas which is otherwise called the **learning style** [1] under which these algorithms are categorized.

The **Learning Style **is important as it defines how a Machine Learning Algorithm can model a problem.

It is always important to first understand the Learning style that an algorithm can have. This will help us to model the data in a more efficient manner and select the most appropriate algorithm which will provide us the best results.

__Machine Learning Algorithm based on Learning Styles__

__Machine Learning Algorithm based on Learning Styles__

Now let’s look on the different **Learning Styles **generally used in **Machine Learning **algorithms. We will go into greater detail on each of the Learning styles in our upcoming post.

**Supervised Learning**

As the name suggests, the model will be supervised to train in order to produce results. What that means is, the input data that we will have will be the training data and will have a output label.

The model will be trained on this training data and is required to make predictions. Based on the accuracy of the predictions, the model is further trained until it achieves a desired level of accuracy on the training data.

Some of supervised learning problems include **classification **and **Regression **problems.

Example: Linear Regression, Logistic Regression.

For more details on Supervised Learning, please visit this post.

**Unsupervised Learning**

In case of unsupervised learning, the input data does not have any kind of label. Based on the structures and patterns in the input data, the model is created.

The created model can be prepared either through identifying patterns within the input data or through extracting general rules or through some mathematical derivations or simply organizing data based on similarity.

Some of the examples for Unsupervised learning is clustering, dimensionality reduction and association rule mining.

Example of Unsupervised algorithm is K-Means clustering, the Apriori algorithm.

**Semi-supervised Learning**

Semi-supervised learning involves few components.

- Model (Classification or Regression model) – The above figure shows a classification model. The model is first trained with labelled training data.
- After the classifier is trained on the labelled data, the model is provided with several unlabeled data to classify them. Once the model classifies the unlabeled data, it is further combined with the originally available labelled data to further retrain the classifier model to improve the accuracy of the model.

Example of Semi-supervised algorithm includes the classification and regression problems.

__Machine Learning Algorithm based on Functions__

__Machine Learning Algorithm based on Functions__

The above categorization was the grouping of Algorithm based on the Learning Styles. Now let’s drill down a bit more and group them based on their specific functions.

Grouping by function involves consolidating the different Machine Learning Algorithms based on how they work.

Example: There are many types of Regression Algorithms. Here we will group them under one umbrella of Regression Algorithms.

__Regression Machine Learning Algorithm__

__Regression Machine Learning Algorithm__

Regression is the process of estimating the relationship between a dependent variable(label) and one or more independent variable (features). The most used regression algorithm is Linear Regression.

For in-depth understanding on how Regression Algorithm work, please refer this post.

Some of the most commonly used Regression Algorithms are:

- Linear Regression
- Logistic Regression
- Ordinary Least Squares Regression (OLS)
- Stepwise Regression
- Multivariate Adaptive Regression Splines (MARS)
- Locally Estimated Scatter Plot Smoothing (LOESS)
- Polynomial Regression

__Instance based Machine Learning Algorithm__

__Instance based Machine Learning Algorithm__

The ability of a ML model to perform well on new unseen instances of data is known as generalization.

Usually the main aim of a Machine Learning model is to make accurate predictions. Having a good performance/accuracy on trained data is good, but the true goal is to perform well on new unseen instances.

There are 2 main approaches to Generalization: Instance based Learning, Model based Learning.

Instance Based learning also known as memory-based learning is a type of machine learning approach where instead of performing generalization, the algorithm compares new instances of data with the instances seen/learnt during training which are stored on the memory.

Some of the commonly used Instance based Learning Algorithms are [2]:

- k-Nearest Neighbor(kNN)
- Decision Tree
- Support Vector Machine (SVM)
- Self-Organizing Map (SOM)
- Locally Weighted Learning (LWL)
- Learning Vector Quantization (LVQ)

__Regularization based Machine Learning Algorithm__

__Regularization based Machine Learning Algorithm__

Regularization is a form of regression that penalizes the coefficient estimates towards zero. This technique mostly prevents the model learning more complex and flexible model thereby avoiding the overfitting situation.

Some commonly used regularization algorithms are:

- Ridge Regression
- Lasso (Least Absolute Shrinkage and Selection Operator) Regression
- ElasticNet Regression
- Least-Angle Regression (LARS)

__Decision Tree based Machine Learning Algorithm__

__Decision Tree based Machine Learning Algorithm__

In case of Decision tree, a model of decision is constructed based on the attribute values of the data. The decisions keep branching out until a prediction decision is made for a given record.

Decision trees are usually pretty fast and have good accuracy and are often trained for classification and Regression problems.

Some of the commonly used decision tree algorithms are:

- C4.5 and C5.0
- M5
- Classification and Regression Tree
- Decision Stump
- Chi-squared Automatic Interaction Detection (CHAID)
- Conditional Decision Tree
- Iterative Dichotomiser 3 (ID3)

__Clustering based Machine Learning Algorithms__

__Clustering based Machine Learning Algorithms__

Clustering is a machine learning technique through which we could group data points. Given a dataset containing a variety of data points, we can use a clustering algorithm to classify each data point into a specific group. Based on the theoretical understanding, data points which belong to the same group have similar properties. Clustering falls under the umbrella of unsupervised learning algorithms.

Some commonly used Clustering Algorithms are:

- K-means clustering
- Mean-shift clustering
- Agglomerative Hierarchical clustering
- K-medians
- Density -Based Spatial clustering of Applications with Noisec(DBSCAN)
- Expectation- Maximization (EM) clustering using Gaussian Mixture models (GMM)

__Association Rule based Machine Learning Algorithms__

__Association Rule based Machine Learning Algorithms__

It is a rule-based machine learning method which is useful in discovering relation between different features in a large dataset.

As shown in the above figure, given the sale of items, every time a customer buys bread, he also buys milk. Same happens with Soda, where he buys chips along with it.

It basically finds patterns in data which might include:

- Co-occurring features
- Correlated features

Some commonly used Association rule learning algorithms are

- Eclat algorithm
- Apriori algorithm

For more in-depth on Association Mining, please refer this post

__Bayesian Algorithms__

__Bayesian Algorithms__

Bayesian Algorithms are the one which follow the principle of Bayes theorem for solving problems of Classification and Regression.

The Bayes theorem describes the probability of an even based on prior understanding of events and occurrences that might be related to the event.

Let’s consider that the chances of developing some kind of health conditions increases with age.

Based on this prior knowledge of health condition relation with age, Bayes theorem accesses an individual more accurately by conditioning it on their age.

Some of the commonly used Bayesian Algorithms are:

- Naïve Bayes
- Gaussian Naïve Bayes
- Bayesian Network
- Bayesian Belief Network
- Multinomial Naïve Bayes
- Average One-Dependence Estimators (AODE)

__Artificial Neural Network__

__Artificial Neural Network__

Artificial Neural Network is a branch or AI that tries to replicate the functioning of the human brain.

An Artificial Neural Network is a collection of connected units or nodes which are considered as artificial neurons. This structure if loosely modeled depicts the connected neurons in a biological brain.

The most important part of ANN are the neurons. As the human brain has the cells, similarly an ANN consists of a collection of Neurons that are interconnected.

__Components of an ANN__

__Components of an ANN__

- As discussed above, an ANN has 3 categories of Neurons – Input Neuron, Hidden Neuron, Output neuron.
- The other component of ANN is the activation function which is used to generate the output from the hidden neuron to the output neuron. This output generated through the activation function can be passed on to the subsequent neuron which will later become the input to those neurons.

Some commonly used Artificial Neural Network Algorithms are:

- Feed-Forward Neural Network
- Radial Basis Function Network (RBFN)
- Kohonen self-organizing neural network
- Perceptron
- Multi-Layer Perceptron
- Back-Propagation
- Stochastic Gradient Descent
- Modular Neural Networks (MNN)
- Hopfield Network

__Deep Learning Algorithms__

__Deep Learning Algorithms__

Deep Learning is a branch of Artificial Neural Network which ate computationally more powerful and are capable of solving real complex problems which involves building larger and complex neural networks.

Some of the commonly used Deep Learning Algorithms are:

- Convolutional Neural Networks (CNN)
- Recurrent Neural Networks (RNN)
- Long Short-Term Memory Network (LSTM)
- Generative Adversarial Networks (GANs)
- Deep Belief Networks (DBNs)
- Autoencoders
- Restricted Boltzmann Machines (RBMs)

**Dimensionality Reduction Algorithms**

Dimensionality reduction is a technique of transforming the data from a high-dimensional space to a low dimension space in such a way that the low dimensional data still retains the meaningful properties of the original data.

Dimensionality Reduction algorithm basically exploit the structure of the data in an unsupervised manner or order to summarize or describe the data using lesser data or features.

Some of the commonly used Dimensionality Reduction Algorithms are:

- Principal component analysis (PCA)
- Non-negative matrix factorization (NMF)
- Kernel PCA
- Linear Discriminant Analysis (LDA)
- Generalized Discriminant Analysis (GDA)
- Autoencoder
- t-SNE (T-distributed Stochastic Neighbor Embedding)
- UMAP (Uniform Manifold Approximation and Projection)
- Principal component Regression (PCR)
- Partial Least Squares Regression (PLSR)
- Sammon Mapping
- Multidimensional Scaling (MDS)
- Projection Pursuit
- Mixture Discriminant Analysis (MDA)
- Quadratic Discriminant Analysis (QDA)
- Flexible Discriminant Analysis (FDA)

__Ensemble Algorithms__

__Ensemble Algorithms__

Ensemble technique are those which involve use of multiple models to obtain better accuracy on predictive performance which could not be obtained by using either of the algorithms alone.

Some of the commonly used algorithms are:

- Boosting
- Bootstrapped Aggregation (Bagging)
- AdaBoost
- Weighted Average (Blending)
- Stacked Generalization (Stacking)
- Gradient Boosting Machines (GBM)
- Gradient Boosted Regression Trees (GBRT)
- Random Forest

**Reference**:

- https://machinelearningmastery.com/a-tour-of-machine-learning-algorithms/
- https://www.geeksforgeeks.org/instance-based-learning/
- https://en.wikipedia.org/wiki/Regularization_(mathematics)
- https://www.digitaltrends.com/cool-tech/what-is-an-artificial-neural-network/
- https://www.researchgate.net/figure/Principle-of-semi-supervised-learning-1-a-model-eg-CSP-LDA-classifier-is-first_fig4_277605013
- https://www.kdnuggets.com/2019/01/ensemble-learning-5-main-approaches.html
- https://en.wikipedia.org/wiki/Dimensionality_reduction
- https://towardsdatascience.com/an-illustrated-guide-to-artificial-neural-networks-f149a549ba74
- https://en.wikipedia.org/wiki/Bayes%27_theorem
- https://towardsdatascience.com/association-rule-mining-be4122fc1793
- https://medium.com/@sanidhyaagrawal08/what-is-instance-based-and-model-based-learning-s1e10-8e68364ae084
- https://www.analyticsvidhya.com/blog/2015/08/comprehensive-guide-regression/