Think Upon AI

Machine Learning (ML): A Beginner’s guide

Table of Contents

 

Are you a beginner in Machine Learning and don’t know where to start? Are you curious to learn the concepts that every ML engineer must know? If yes, then you are at the right place !!

 

Just about a year ago, I was in your shoes searching over the internet to find some really good beginner’s guide to this commonly used term “Machine Learning”  or simply ML. And this article is my effort to provide you with the most exhaustive but the most simple guide to Machine Learning for beginners. So let’s jump into it !!

Minion beginner

What is Machine Learning ?

Can you recognize this symbol “” ? This symbol is majorly used among Machine Learning experts and is called the “neuronic” operator. If you didn’t know about this symbol before, then I have just made a new connection between the neurons in your brain, that links the input “╘” to the name “neuronic”. And through this connection, you have memorized the new symbol.

 

But wait, I think there is something more to it. Can you tell me which symbol is this, “” ? You are correct, it is the same “neuronic” operator. Did you observe something? Your brain learned the pattern of the symbol instead of just memorizing the exact input ( ).  That’s why you could predict the symbol in the handwritten form as well, without being explicitly told about it. And that is where the crux of Machine Learning lies.

 

“Machine learning is the branch of AI, that enable machines to learn through examples to predict outputs without being explicitly programmed”

Note: There is no neuronic operator as such in literature. It is just a made up thing to make my point.

How can a Machine learn ?

Machine learning is just an attempt to imitate how humans learn. 


Let’s look at the most basic example. Suppose, the prices of your favorite chocolate are increasing year by year. Luckily, you have a good habit of collecting the price data every four years and you observe the chocolate prices from 1999 till 2019 to plot the results in a graph.

Graph: Regression

As you observe your data point by point, your brain simultaneously imagines a rising pattern inside the data. In the same way, if we use mathematical tools to create a trendline that best fits the above data, then we can say we have a learned model. Now, the machine can use this model to predict the prices for future years.

Graph: Regression

Machine learning is not magic !! “It is the way to represent any real world phenomenon with mathematical functions”

These mathematical functions can be as simple as a line equation that can predict our chocolate prices and as complex as a deep neural network that can detect your face while you try to unlock your phone.

 

Now, let’s see the variety of ML algorithms humans have already researched upon.

Types of Machine Learning

We can use variety of Machine Learning methods based on the type of problem that we are solving. 

Types of ML

1. Supervised Learning

Machine Learning: Supervised Learning

It is the type of learning when the labeled dataset (input features with correct output labels) is used to train the machine learning algorithms. Since the machine knows the outputs for given inputs, it can supervise or improve its mathematical model to minimize the error between its predicted outputs and the correct outputs. Supervised machine learning can solve two types of problems – Regression and Classification.

  • Regression Problem: When a model predicts a quantity.

Example – Our chocolate price problem above is a regression problem (linear), in which the linear model predicted the price (quantity) for the year as an input.

 
  • Classification Problem: When a model predicts a label.

Example – When the machine classifies your emails as Spam or not Spam (labels) based on the content of the mail as an input.

 

The most commonly used supervised learning algorithms are Linear Regression, Random Forests, and
Support Vector Machines(SVMs)

2. Unsupervised Learning

Machine Learning: Unsupervised Learning

Let us say, a machine is given a pile of images without telling what each image refers to. That means, the data given is unlabelled and the learning is unsupervised. Now, the machine has to learn “on its own”. In this type of learning, the machine learns the hidden structure or patterns from the data. These patterns can be used to either group similar data or find associations between the dataset. Mainly, two types of problems are targeted in unsupervised learning – Clustering and Association

  • Clustering Problem: Data is clustered together in groups based on the similarities between their characteristics.

ExampleE-commerce websites use clustering algorithms to group their customers based on their past buying behavior, and target those customers accordingly.

 
  • Association Problem: In this problem, certain association rules are discovered between the data points. If “A happens” then “B can happen with high probability” is one kind of association rule between A and B.

Example – When you try to buy something from an E-commerce website, they will use association algorithms to suggest you things that you are likely to buy next, based on the current items in your cart.

 
The most commonly used unsupervised learning algorithms are K-means (for clustering) and Apriori (for association rule)

3. Semi-supervised Learning

When we talk about data from the real world, a huge proportion of it is unlabeled. And labeling the data is a time-consuming and expensive process. So, to deal with this mixture of the labeled and unlabeled dataset, we require semi-supervised learning that lies somewhere between supervised and unsupervised learning. It can improve the performance of supervised models that fit only the labeled dataset, by identifying patterns that result in better predictions.

Example – A radiologist can analyze and label a small set of scans for tumors or diseases to help the model learn to recognize these features in larger unlabelled datasets.

4. Reinforcement Learning

Machine Learning: Reinforcement Learning

Remember, the last time when your school teacher gave you chocolate for performing well in class? (Of course, only if you performed well enough) You were suddenly motivated to perform well in the future as well. Or in other words, your brain got reinforced to do tasks that could win you chocolate again!

 

Reinforcement learning is a type of learning where a machine learns to perform tasks by interacting with the environment. And through interaction, machine gets a reward or a penalty for each action that it performs. Here, the machine always learns in a goal-oriented manner with the only goal to maximize its rewards or minimize its penalty. 

 

Now, we can define these rewards based on the tasks that we want the machine to learn. For example, if we want the machine to learn to play chess, then we can reward the machine for every good move that it plays. Or, we can reward it as soon as it wins the game. You can think of any possibilities !! Further, the machine will try to do more of the tasks that favor more rewards and in this way, it learns. 

Example AlphaGo, the first computer program to beat the world champion in the game of Go, is a great example of what reinforcement learning can do.

Diving Deeper 

Machine learning becomes really interesting as we go deeper.
Deep Learning

As we know now, Machine learning is a mathematical representation of real-world phenomena. Imagine, you have the data containing inputs and the corresponding output values. Now, you can use Machine learning to model an approximate function that best represents the relation between the input and output values of data. But, what if I give you a problem that is so complex that there is no direct relation between the input features to the outputs? Instead, there are some hidden complex combinations of these input features that relate to the output values. And we don’t know them!!

Here comes the role of Deep Learning.

“Deep Learning” is based on artificial Neural Networks in which multiple layers of processing are used to extract progressively higher-level features from the data.

Deep learning uses the deep web of Artificial Neural Networks (ANN) to learn these higher-level features. Now, when we give machines the freedom to choose their features, they can do things that we have not imagined possible. They can create new images based on the text description (DALL-E), they can write an essay or a poem for you (ChatGPT), they can talk to you like another human (Google LaMDA), and whatnot!

 

It would be out of the scope of this blog to discuss further details on Deep Learning. In near future, I would be writing blogs explaining the mathematics behind the Machine Learning models. But, you are always welcome to leave comments below if you have further interest or doubts about any specific topics.

Summary

In this blog, you learned –

  1. about the basics of Machine Learning and how a machine can learn the model with the simple example of the chocolate price data.
  2. about different types of Machine Learning algorithms for various application scenarios
    • Supervised Learning
    • Unsupervised Learning
    • Semi-supervised Learning
    • Reinforcement Learning
  3. about the main idea behind Deep Learning and its immense potential

At last, I would like to thank you for taking the time to read this blog. Hope this was helpful to you in getting the general idea behind Machine learning.

To read more about the history of AI and Machine Learning, refer to my other blog here

Share:

2 Responses

  1. Simply wish to say your article is as amazing The clearness in your post is just nice and i could assume youre an expert on this subject Well with your permission let me to grab your feed to keep updated with forthcoming post Thanks a million and please carry on the gratifying work

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts

What exactly is ChatGPT?

ChatGPT is the single fastest growing human application in the whole history. It had around 100 million users in just 2.5 months from its launch date. What exactly is about ChatGPT that made it widely popular?

Read More »