A Basic Guide to the Fundamentals of Machine Learning

Abhishek
4 min readDec 19, 2023

--

Introduction

Hey, curious minds! Have you ever wondered how computers can learn and make decisions like humans? How can they tell if a given picture is a dog or cat? This is where Machine Learning (ML) comes in to help Computers to predict whether a given picture is a cat or a dog. It’s like teaching your computer to think and make decisions for itself. Let’s dive into the exciting world of Machine Learning, where algorithms learn from data and help solve all kinds of problems!

Image source

What is Machine Learning?

Machine learning is a subset of artificial intelligence (AI) that focuses on creating systems that can learn from data and improve their performance over time without being explicitly programmed. Instead of following strict instructions, ML algorithms adapt and evolve based on patterns captured in the data.

Imagine teaching your pet tricks. First, you show them how to sit. Then they try it on their own until they get it right. Machine learning is exactly the same, but instead of pets, we train computers to do things without explicitly programming them every step of the way. They learn from examples like this!

AI Vs Machine Learning Vs Deep Learning

Types of Machine Learning:

  1. Supervised Learning: In supervised learning, input features are trained on labeled data with corresponding labels. The goal is to learn the map from inputs to outputs and then make predictions about new, unseen data.
    It’s like a teacher giving you examples and answers to learn from. The computer learns from labeled data to make predictions. If you were learning animals, they’d show you pictures and tell you what they are.
Supervised Learning

2. Unsupervised Learning: Unsupervised learning deals with unlabeled data, where the goal of the model is to identify hidden patterns or structures in the data. Clustering and dimensionality reduction are common unsupervised problems.
Here, Computer is learning on its own. A computer finds patterns in data. It’s like discovering a new species of animal without a name.

Unsupervised Learning

3. Reinforcement Learning: Reinforcement learning is a machine learning training method based on rewarding desirable behavior and punishing undesirable behavior.
In general, a reinforcement learning agent — the entity being trained — is capable of sensing and interpreting its environment, taking actions, and learning through trial and error.

Reinforcement Learning

Consider this scenario of teaching the dog to catch the ball, the dog acts as a learning agent in the environment. Here whenever the dog catches the ball, he gets rewarded with a bone and he doesn’t get anything if he didn’t catch the ball.
When the dog is put in the same circumstances again, he does a similar activity with more energy in the hopes of obtaining more reward.

This is how a dog learns to do a correct thing from it’s past experiences in order to achieve maximum reward.

Basic concepts in machine learning

What are the ingredients required in Machine learning.

  1. Data : The most important ingredient in ML is data, It needs data to learn from. Data can be numbers, images, text, or anything that a computer can understand. Quality data is essential for accurate learning and meaningful insights.
  2. Features and Labels: Imagine you want to teach a computer to tell whether a piece of fruit is an apple or an orange. So here features are attributes and things you see in a fruit, like color and size. The label is whether it’s an apple or an orange. The label is what computer is trying to predict through models.
  3. Training and Testing : A key aspect of ML involves dividing available data into training and test sets. It’s like training before the big game we give our machine learning model a lot of data to process which is our training data. Then we check with the new information whether it learned correctly or not. The dataset on which we tested our model here is termed as testing data.
  4. Algorithm: All the mathematics and learning of models happen at this stage of modelling. This is like a magic spell for computers. Algorithms help computers learn patterns from data. Different algorithms work different magic for different problems such as Random forest classifier for classification, Linear regression for regression and PCA for clustering.
  5. Model evaluation: We use metrics to see how our model is performing such as accuracy, precision, F1-score these scores tells that how well our models are performing. Imagine you are trying to teach your friend to dance. You’ll see them do it, and if they make a mistake, you’ll help them improve. Likewise, here we use these scores and improve our model.

That’s all for this section now you know the basic terms in Machine learning and if you found this helpful please upvote and follow.

Thanks!

--

--

Abhishek

Technical developer at Deloitte with 2 years of experience in data migration, enthusiast in field of ML and AI. Love to play chess and play musical instruments.