According to a recent study, machine learning algorithms are expected to replace 25% of the jobs across the world, in the next 10 years. With the rapid growth of big data and availability of programming tools like Python and R –machine learning is gaining mainstream presence for data scientists. Machine learning applications are highly automated and self-modifying which continue to improve over time with minimal human intervention as they learn with more data. For instance, Netflix’s recommendation algorithm learns more about the likes and dislikes of a viewer based on the shows every viewer watches. To address the complex nature of various real-world data problems, specialized machine learning algorithms have been developed that solve these problems perfectly. For beginners who are struggling to understand the basics of machine learning, here is a brief discussion on the top machine learning algorithms used by data scientists.

**What are machine learning algorithms?**

A machine learning algorithm can be related to any other algorithm in computer science. An ML algorithm is a procedure that runs on data and is used for building a production-ready machine learning model. If you think of machine learning as the train to accomplish a task then machine learning algorithms are the engines driving the accomplishment of the task. Which type of machine learning algorithm works best depends on the business problem you are solving, the nature of the dataset, and the resources available at hand.

**Types of Machine Learning Algorithms**

Machine Learning algorithms are classified as –

**1) Supervised Machine Learning Algorithms**

Machine learning algorithms that make predictions on a given set of samples. Supervised machine learning algorithm searches for patterns within the value labels assigned to data points. Some popular machine learning algorithms for supervised learning include SVM for classification problems, Linear Regression for regression problems, and Random forest for regression and classification problems.

**2) Unsupervised Machine Learning Algorithms**

There are no labels associated with data points. These machine learning algorithms organize the data into a group of clusters to describe its structure and make complex data look simple and organized for analysis.

**3) Reinforcement Machine Learning Algorithms**

These algorithms choose an action, based on each data point and later learn how good the decision was. Over time, the algorithm changes its strategy to learn better and achieve the best reward.

**List of Common Machine Learning Algorithms Every Engineer must know**

- Naive Bayes Classifier Algorithm
- K Means Clustering Algorithm
- Support Vector Machine Algorithm
- Apriori Algorithm
- Linear Regression
- Logistic Regression
- Decision Tree
- Random Forest
- Artificial Neural Networks
- Nearest Neighbours
- Gradient Boosting Algorithms

**Common Machine Learning Algorithms Infographic **

## 1. Naive Bayes Classifier Algorithm

It would be difficult and practically impossible to classify a web page, a document, an email, or any other lengthy text notes manually. This is where the Naïve Bayes Classifier machine learning algorithm comes to the rescue. A classifier is a function that allocates a population’s element value from one of the available categories. For instance, Spam Filtering and weather forecast are some of the popular applications of the Naïve Bayes algorithm. Spam filter here is a classifier that assigns a label “Spam” or “Not Spam” to all the emails.

Naïve Bayes Classifier is amongst the most popular learning method grouped by similarities, that works on the popular Bayes Theorem of Probability- to build machine learning models particularly for disease prediction and document classification. It is a simple classification of words based on the Bayes Probability Theorem for subjective analysis of content. This classification algorithm uses probabilities using the Bayes theorem. The basic assumption for Naive Bayesian algorithms is that all the features are considered to be independent of each other. It is a very simple algorithm and it is easy to implement. It is particularly useful for large datasets and can be implemented for text datasets.

Bayes theorem gives a way to calculate posterior probability P(A|B) from P(A), P(B) and P(B|A).

The formula is given by: P(A|B) = P(B|A) * P(A) / P(B)

Where P(A|B) is the posterior probability of A given B, P(A) is the prior probability, P(B|A) is the likelihood which is the probability of B given A and P(B) is the prior probability of B.

**1.1. When to use the Naive Bayes Classifier algorithm?**

- If you have a moderate or large training data set.
- If the instances have several attributes.
- Given the classification parameter, attributes that describe the instances should be conditionally independent.