0% found this document useful (0 votes)
13 views6 pages

Machine Learning Concepts Explained

Machine Learning (ML) is a subset of AI that enables machines to learn from data and improve over time, utilizing algorithms to analyze patterns and make predictions. Key concepts include labeled and unlabeled data, training and testing datasets, and various types of ML such as supervised and unsupervised learning, which further divide into classification and regression models. Applications of ML range from spam detection to customer recommendations based on purchasing patterns.

Uploaded by

ifrazkhan214
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views6 pages

Machine Learning Concepts Explained

Machine Learning (ML) is a subset of AI that enables machines to learn from data and improve over time, utilizing algorithms to analyze patterns and make predictions. Key concepts include labeled and unlabeled data, training and testing datasets, and various types of ML such as supervised and unsupervised learning, which further divide into classification and regression models. Applications of ML range from spam detection to customer recommendations based on purchasing patterns.

Uploaded by

ifrazkhan214
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Chapter 2 Notes

Machine Learning

Machine Learning
Machine Learning, or ML, is a subset of AI that focuses on the development of algorithms and models
that enables machines to learn from data and improve at tasks with experience. The machine learns
from its mistakes and takes them into consideration in the next execution. ML algorithms are designed
to analyze vast amount of data, identify meaningful patterns and make predictions or take actions.
Ex: ML is used in email spam filters, fraud detection systems

Ex: Labelled images of apples and strawberries are given as input to the ML model. The model learns
from the input data to classify between apples and strawberries and predicts the correct output as
shown.

Common terminologies used with data

Data
▪ Data is information in any form
▪ For e.g. A table with information about fruits is data
▪ Each row will contain information about different fruits
▪ Each fruit is described by certain features.
Features
• Columns of the tables are called features
• In the fruit dataset example, features may be name, color,
size, etc.
• Some features are special, they are called labels.

Labels
• Data Labeling is the process of attaching meaning to data.
• It depends on the context of the problem we are trying to
solve
• For e.g. if we are trying to predict what fruit it is based on
the color of the fruit, then color is the feature, and fruit name
is the label.
• Data can be of two types – Labeled and Unlabeled.

Labeled Data - Data to which some tag/label is attached. For e.g. Name, type, number, etc.
Unlabeled Data - The raw form of data to which no tag is attached.

Training data set


▪ The training data set is a collection of examples given to the model to analyze and learn.
▪ Just like how a teacher teaches a topic to the class through a lot of examples and illustrations.
▪ Similarly, a set of labeled data is used to train the AI model.

Testing data set


▪ The testing data set is used to test the accuracy of the model.
▪ Just like how a teacher takes a class test related to a topic to evaluate the understanding level of
students.
▪ Test is performed without labeled data and then verify results with labels.
Modelling
AI Modelling refers to developing algorithms, also called models which can be trained to get intelligent
outputs. That is, writing codes to make a machine artificially intelligent.

Types of AI Models

Rule Based Approach


In the rule-based approach, the developer defines specific rules and input data to guide the machine’s
behaviour. Ex: A customer service chatbot on an e-commerce website might follow a rule such as “If the
user inputs ‘track order’, display tracking details from the database.”

Machine Learning Based Approach


The learning-based approach enables machines to develop their own algorithms by analyzing examples
and feedback. Ex: A spam email filter processes a dataset of labelled (‘spam’, ‘not spam’) emails during
training and identifies patterns such as use of frequent words like ‘free’ or ‘win’, and uses these
patterns to classify new messages.
Types of Machine Learning
1. Supervised Learning
2. Unsupervised Learning
3. Reinforcement Learning

1. Supervised Learning
In Supervised learning, the model is trained with labelled data. In other words, the dataset is known to
the person who is training the machine. Ex: In Teachable Machines, we can train a model using our own
classes of labelled datasets. In supervised learning, the model learns a mathematical relationship
between the inputs and outputs using the labelled data as a guidance for learning. Once the model is
trained, we can provide new input values and it will use the learned relationship to predict the output.

Supervised Learning – Example 1


Problem Statement: Build a model to predict the coin based on its weight.
Dataset is the currency coins having different weights.
▪ 1 Euro weighs 5 grams
▪ 1 Dirham weighs 7grams
▪ 1 Dollar weighs 3grams
▪ 1 Rupee weighs 4 grams

Supervised Learning – Example 2


Social Media platforms identify your friend in a picture from an album of tagged photographs. The social
media platform is using tagged photos to recognize the person. Therefore, the tagged photos become
the labels of the pictures and when the machine is learning from labeled data, it is supervised learning.
Supervised Learning Models are divided into Classification and Regression models.

Classification Model
Here the model learns to classify the input data into one of several
categories or ‘classes’. One trained, the model gives the output as the
unique label of the class.

For example, a computer program that can tell the difference between
apples and oranges. The data input is the images of ‘apple’ and ‘orange’
labeled correctly. The program looks at the images and recognizes
features like colour, shape, etc. The program then builds a model which helps it classify future images.
When the model is given a new image, it classifies the image based on its learning and gives the output
as the classification label.

Another example is classifying emails. The model is trained by showing many emails which are “spam”
and “not spam”. The model looks at the features that makes a spam email, like suspicious sender
addresses, poorly framed emails, unexpected attachments, words like ‘win’, ‘prizes’, etc. Once trained
the model classifies your emails in different folders like inbox, spam, etc.

Regression Model
A regression model tries to find a mathematical
connection between different input variables and an
output variable. Regression algorithms predict a
continuous value based on the input variables.

For example, a model which predicts the price of a house.


Here we are trying to predict the price of the house
(dependent variable) based on the size, location, number
of rooms, garage area, etc (independent variables). The model creates an equation which describes how
the house details and location are related to its price. When we have details of a new house, we input
this into the model and the model predicts its likely selling price.

Another example is a program used in predicting stock markets. It analyzes a lot of historical data to
predict the price of a stock in the future. Regression models are also used in predicting sales, weather
forecast, medical research, etc.
2. Unsupervised Learning
In Unsupervised learning, the model works on unlabeled datasets. That means the model learns from
the input data without any labels or guidance. The unsupervised learning models are used to identify
relationships, patterns and trends out of the data which is fed into it.

Unsupervised learning is divided into Clustering and Association.

Clustering Model
The clustering model takes input data and automatically groups data points into similar groups or
clusters based on the similarity between them. The aim of clustering is to find groups in the data that
may not be immediately obvious without guidance.

For example, consider the raw input data of birds and animals with no class labels (unlabeled data). The
unsupervised learning model is able to divide this data into two clusters based on clustering. The two
clusters have been formed based on the similarity of characteristics. The first cluster comprises all the
animals, and the second cluster comprises all the birds.

Social media companies use clustering to group together users who have similar interests so that they
can provide recommendations.

Association Model
Association is an unsupervised learning method that is used to find interesting relationships between
variables from the database. An association model looks for rules or patterns that describe how
different items or events are connected. These rules are called Association Rules. Clustering is used for
customer segmentation, image segmentation, etc.

For example, consider the example of a supermarket. Based on the purchase pattern of other
customers, we can predict that there is a high probability that any customer ‘x’ who buys bread will
most probably buy butter. Therefore, such meaningful associations can be useful to recommend items
to customers.

E-commerce companies like Amazon use association models to provide product recommendations
based on past purchases.

You might also like