A Complete Introduction to Machine Learning Concepts

Vinuri Piyathilake
New Writers Welcome
7 min readNov 19, 2021
Image by author

Hey Guys šŸ‘‹ So, this article is for the ones who are completely new to Machine Learning. If youā€™re a student in IT, Computer Science or any other related field, most of you may have probably heard of terms like Machine Learning, AI, and Deep Learning etc. but did you have a proper understanding about what Machine Learning is and how it relates to AI and Deep Learning? As a student, I had to struggle a lot to truly understand the concept of machine learning with the complicated definitions on the internet. Therefore, through this article Iā€™m trying to provide you with a simple yet complete introduction to Machine Learning, and Iā€™m hoping to continue this as an article series covering all of the key topics of ML. Well, letā€™s get started!

What is Machine Learning ?

ā€œMachine learning is the study of computer algorithms that can improve automatically through experience and by the use of data. It is seen as a part of artificial intelligence.ā€ ~ Wikipedia

You may have come across many definitions of machine learning on the internet, such as the one above, but Iā€™m sure that most of you will not grasp it from such technical definitions. So Iā€™ll try to explain the concept using a real world scenario. Do you aware that machine learning is used in many of the activities we do in our day-to-day life? We use email, social media networks, Google Maps, Netflix, and other such apps every day, but you may not realize that they are driven by ML. Since we are all familiar with emails, let me explain the idea of machine learning using email spam filtering. You might have noted that some of your emails are automatically sent to the spam folder without your assistance. Have you thought how this happens? That is Machine Learning. Your email program monitors which emails you do or do not mark as spam, and based on that learns how to better filter spam. So basically, itā€™s the field of study that allows computer programs to learn without being explicitly programmed. This is effectively explained by Tom Mitchell in the following definition.

ā€œA computer program is said to learn from experience E with respect to some task T and some performance measure P, if its performance on T, as measured by P, improves with experience E.ā€ ~ Tom Mitchell (1998)

According to the above definition, the ultimate Task in spam filtering is to classify emails as spam or not spam, the Experience is watching you label emails as spam or not spam, and the Performance is the number (or fraction) of emails correctly classified as spam/not spam. So, I hope you now have a good sense of machine learning than before. Some people misunderstand machine learning with data analytics, but data analytics only focuses on using data to generate insights, while machine learning focuses on creating and training algorithms through data so that they can function independently.

Artificial Intelligence vs. Machine Learning vs. Deep Learning?

https://d1jnx9ba8s6j9r.cloudfront.net/blog/wp-content/uploads/2018/03/AI-vs-ML-vs-Deep-Learning.png

Machine Learning is a subset of Artificial Intelligence and again Deep Learning is a subset of Machine Learning. Artificial Intelligence is a technique which allows the machines to act like humans by replicating their behavior and nature, and itā€™s a very broader concept. Deep Learning is inspired by the structure and function of the brain called artificial neural networks. This ANN (Artificial Neural Network) algorithm structure, the lower need for human intervention, and the larger data requirements are what defines deep learning special within the field of machine learning. Iā€™m not going to elaborate deeply about these topics since this article is mainly focusing on machine learning. I believe you now have a fundamental understanding of how machine learning relates to AI and DL. So, letā€™s dive a little more into machine learning.

Machine Learning Algorithms

Machine learning includes the use of machine learning algorithms and models. Some takes machine learning algorithms and models as the same and thatā€™s totally wrong. Machine learning algorithms are the engines of machine learning. It is similar to any other algorithm in computer science. What it makes different from the traditional algorithm is that it takes an input and an output and develop some logic which can then be used to work with a fresh input to generate an output. Traditional algorithms take input and some logic and gives the output. Machine learning algorithms perform pattern recognition. They learn from data, or are fit on a dataset.

A model is the output of a machine learning algorithm run on data. It is comprised of model data and a prediction algorithm.

Image by author

Okay, weā€™ve cleared up our concerns about machine learning algorithms and models. So, letā€™s discover about the different forms of machine learning algorithms. We can categorize ML algorithms into two broader classes, which are as follows.

- Supervised learning
- Unsupervised learning

Others include reinforcement learning, recommender systems, and so on.

Supervised Learning

Here, the algorithm learns to map a given input to a desired output, such that it can map an unforeseen input to an output. It is called supervised learning because this can be thought of as a teacher supervising the learning process. Simply said, you have input variable X and an output variable Y (right answers given), and you use an algorithm to learn the mapping function from the input to the output.

Y = f(X)

This is based on function approximation and in the end of the process we pick the function that best describes the input data, the one that produces the best estimate of y for a given X. When the algorithm achieves an acceptable level of performance, the learning process comes to an end.

Again, supervised learning can be categorized as Classification and Regression.

Regression

This predicts continuous/real value outputs such as temperature, age, salary, price, etc. Let me explain it simply by using the most famous housing price prediction problem. Suppose you have a dataset on the housesā€™ size(in sq feet) and its price(in dollars) and you want to predict the prices for any given size. Here the house size is the independent variable(x) and housing price is the dependent variable(y). So, you can plot the data like the following and pick the function that best describes the input data.

https://slideplayer.com/slide/9537512/30/images/23/Simple+Linear+Regression+Example%3A+Graphical+Representation.jpg

Here, we only considered one variable regarding the housing prices and it is called simple linear regression. You can use Multivariate Linear Regression if you consider more than one variable.

Support Vector Regression and Poisson Regression are some other popular regression algorithms besides the linear regression.

Classification

Classification algorithms are used to predict/classify the discrete values such as Male or Female, True or False etc. It is the process of finding a function that helps in dividing the dataset into classes based on different parameters. As an example, take the email spam filtering process discussed in the beginning. There were two known categories: spam and non-spam. Since this is a supervised process, the categories are always known, and we solely need to classify the dataset based on their parameters to those known categories.

https://miro.medium.com/max/1164/1*589X2eXJJkatGRG-z-s_oA.png

Unsupervised learning

Unsupervised learning occurs when there is only input data (X) and no corresponding output variables. That means, there are no correct answers and thereā€™s no teacher to supervise as in supervised learning procedure. Some real-world examples are recommender systems, customer segmentation, and medical imaging.

https://miro.medium.com/max/1400/1*BKvYt1EHtzHOd_HWjm-Jrw.png

So, thatā€™s it. I know this is a pretty long article, but I hope it covers you with the fundamental knowledge you need to get started with machine learning. Your feedback is highly appreciated. Letā€™s catch up soon with the upcoming articles in the series. Keep reading šŸ–¤

References

[1] Theobald, Oliver. Machine Learning for Absolute Beginners, 2021.
[2] Burkov, Andriy. The Hundred-Page Machine Learning Book, 2019.

Check out my other recent articles šŸ‘‡

--

--