Sitemap
5 min readJun 18, 2021

--

Machine learning Algorithms

INTRODUCTION

In a world where digitization is rapidly taking over and your computer is your new office, coding and algorithms are a necessity. A recent study hypothesizes that machine learning algorithms will replace 25% of jobs in the near future. Specialized machine learning algorithms have been developed to tackle complex problems of the real world. Machine learning’s automated learning and self-modifying features make it an essential tool. Remember Netflix suggestions personalized just for you? That’s a classic example of a machine learning algorithm. Netflix’s algorithm gathers data based on the shows you have viewed and curates a top picks list just for you.

Machine learning finds its application in a wide range of fields such as handwriting analysis, detecting credit card fraud, DNA sequencing, securities market analysis, robotics and gaming strategies, search engines, and medical diagnostics.

Beginners must know that there is no ideal ML algorithm. The type of ML to choose best depends on the type of problem you are looking to solve, the data set and the resources available. Since there are a variety of factors at play, there isn’t a specific algorithm for a specific problem. Selecting an algorithm, especially a predictive modelling algorithm involves plenty of experimenting. As you try different algorithms for a specific problem, set aside a “test data set” to evaluate the efficacy of each.

Without further ado, lets jump to the Basic Types of Machine learning algorithms:

Press enter or click to view image in full size
ML Algorithms Cheat Sheet

MACHINE LEARNING ALGORITHMS CLASSIFICATION

As per the way of learning, machine learning algorithm is classified as:

  • Supervised Learning: This predictive model algorithm establishes patterns in the input data. A learning process is established where the predicted results and the actual results of the input data are compared. The algorithm makes changes in the predictive model till the expected accuracy of the predicted results is obtained. A few examples include, decision trees, regression algorithms, and bayesian algorithms.
  • Unsupervised Learning: Input data has no tags. This algorithm organizes data into groups or clusters thereby making complex data look simpler and more organized. It does so by inferring intrinsic links of data, such as clustering and association rules. For instance, K-means, Apriori algorithms and independent component analysis are a few types.
  • Semi-supervised Learning: This is an extension of supervised learning when the input data is part tags and is commonly used for regression and classification. Laplecian support vector machines, graph theory inference algorithms are a few common examples.
  • Reinforcement Learning: This is perhaps the algorithm that resembles most to artificial intelligence in its literal sense. Here, input data acts as a feedback for the model, emphasizing how to adapt to the environment to obtain maximum benefits. The input/output need not be precisely correct. The algorithm model rather focuses on maintaining a balance between exploration and compliance.

TOP 5 ALGORITHMS YOU MUST KNOW

LINEAR REGRESSION MACHINE ALGORITHM:

It establishes a cause and effect relationship between two variables. For instance, we need to generate an algorithm studying the relationship between rainfall and the number of umbrellas sold in a particular region. Here, rainfall is the independent variable also known as explanatory variable. While the number of umbrellas sold is the dependent variable which is also called the factor of interest or predictor. Linear regression models are used to estimate real continuous values.

Its equation is represented as y= a*x+b

Get Mohammad Daoud’s stories in your inbox

Join Medium for free to get updates from this writer.

Where, y is the dependent variable(rainfall)

‘x’ is the independent variable(number of umbrellas sold)

‘a’ is the slope and b is the intercept. The graph formed is a straight line.

1. LOGISTIC REGRESSION

Although the name has ‘regression’ in it, this algorithm has more of a classification function. It is used to identify the dependent variable from a set of independent variables. The algorithm model finds the best fit for the parameters using probability function.

For instance, if you were to find the probability of a student passing or failing in a given examination. Here, since the outcome isn’t a continuous range of values, based on the parameters such as intelligence, preparation, difficulty of the exam; the algorithm would give an outcome in binary language.

2. NAÏVE BAYES CLASSIFIER ALGORITHM

The primary function of the algorithm is to classify data into available categories. It works on the Bayesian theorem that every category is mutually exclusive and independent of each other. It works extremely well with a large dataset. Remember the automatically sorted spam and promotion folder in your email. That is the function of the Naïve Bayes algorithm.

3. DECISION TREE ALGORITHM

Decision tree algorithm uses the branching methodology to elucidate all possible outcomes based on parameters for the input data. It produces a sequence of rules which is used to classify data and ultimately find the output variable. For instance, if you wanted to pick a restaurant to have dinner with your family, you’d ask a friend a bunch of questions like ‘Does the place serve buffet or a lá carté?’, ‘Does the diner serve liquor?’, etc. These questions or rules form a network and ultimately reach a conclusion.

4. RANDOM FOREST ALGORITHM

Random forest algorithm is multiple decision trees forming a complex web. Data is divided into subsets which average individual results to obtain a final output with new improved predictive accuracy. Building on the above example: instead of asking a single friend, you approach multiple friends individually presenting them with a series of questions with slightly different requirements to pick a restaurant. Your final choice in this case would be much better as you would analyze information from multiple sources a.k.a. Decision tree.

5. K-MEANS CLUSTERING ALGORITHM

This algorithm simply classifies data into pre-defined groups or clusters. Any new data point is grouped in accordance to its proximity to nearby clusters. For instance, if you look up the word ‘cell’, it would show information regarding cell as a synonym for ‘jail’; the basic functional unit of our body; synonym for a mobile phone; and a singular battery. Depending on other keywords in your search, data will be clustered as per the above groups. Due to the lack of specificity of this algorithm it falls under the ‘lazy learning’ type of algorithm.

CONCLUSION

Here was a quick peek into the world of machine learning algorithms. Stay tuned for more updates!

--

--

Mohammad Daoud
Mohammad Daoud

Written by Mohammad Daoud

Data Scientist and Trainer with strong math background and 10+ years of experience. Holds a Ph.D. degree in Computer Science .