Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
7 views8 pages

Unit 3 Material

The document provides an overview of machine learning, defining it as a subset of AI that enables computers to learn from data and make predictions. It discusses the main types of machine learning: supervised, unsupervised, and reinforcement learning, along with their applications and examples. Additionally, it details the processes and categories within supervised and unsupervised learning, including classification, regression, clustering, and association.
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)
7 views8 pages

Unit 3 Material

The document provides an overview of machine learning, defining it as a subset of AI that enables computers to learn from data and make predictions. It discusses the main types of machine learning: supervised, unsupervised, and reinforcement learning, along with their applications and examples. Additionally, it details the processes and categories within supervised and unsupervised learning, including classification, regression, clustering, and association.
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
You are on page 1/ 8

Unit 3.

Basics Of Machine Learning


Questions:
1. What is Machine Learning? Why we need Machine Learning? Give
examples for the same.
2. What Is Machine Learning? Explain types of Machine Learning with
examples.
3. Explain Supervised Learning and types of it.
4. Explain Unsupervised Learning and types of it.
Q-1. What is Machine Learning? Why we need Machine Learning? Give
examples for the same.
Ans. Machine learning is a subset of Artificial Intelligence (AI) that enables computers to
learn from data and make predictions without being explicitly programmed.

It involves feeding data into algorithms that can then identify patterns and make predictions
on new data.

Machine learning is used in a wide variety of applications, including image and speech
recognition, natural language processing, and recommender systems.

Machine Learning is a subset of AI which allows a machine to learn automatically from past
data without programming explicitly.

Machine learning is able to learn, train from data and solve/predict complex solutions which
cannot be done with traditional programming. It enables us with better decision making and
solve complex business problems in optimized time.

Machine learning has applications in various fields, like healthcare, finance, educations, sports
and more.

ML is a core form of AI that enable machine to learn from past data & make predictions.

Examples:
Image recognition: Uses ML to detect objects in digital images.

Face detection: Uses facial characteristics to identify a person.

Traffic alerts: Uses ML to provide traffic data and instructions.

Chatbots: Uses ML to create automated responses to user inputs.

Medical diagnosis: Uses ML to analyze medical data, monitor patients, and manage disease
Q-2. What Is Machine Learning? Explain types of Machine Learning with
examples.
Ans. Machine learning is a subset of Artificial Intelligence (AI) that enables computers to
learn from data and make predictions without being explicitly programmed.

It involves feeding data into algorithms that can then identify patterns and make predictions
on new data.

Types Of Machine Learning:

1. Supervised Machine Learning


2. Unsupervised Machine Learning
3. Reinforcement Machine Learning

Supervised Machine Learning:

It involves training a model using labeled data, where each input comes with a corresponding
correct output.

The process is like a teacher guiding a student—hence the term “supervised” learning.

The goal of supervised learning is to make accurate predictions when given new, unseen data.

Supervised learning can be applied in various forms, including “supervised learning


classification” and “supervised learning regression”.

There are two main categories of supervised learning that are mentioned below:

• Classification
• Regression

Working of Supervised Machine Learning:

Training Data: The model is provided with a training dataset that includes input data (features)
and corresponding output data (labels or target variables).

Learning Process: The algorithm processes the training data, learning the relationships
between the input features and the output labels. This is achieved by adjusting the model’s
parameters to minimize the difference between its predictions and the actual labels.

Example(s):

Image Classification: Images are labeled with the objects they contain (e.g., "cat", "dog",
"car"), it forms the basis of a supervised learning problem in computer vision. Supervised
learning involves training a model on a labeled dataset, where each input (in this case, an
image) is associated with a corresponding output label (the object in the image). The goal is
for the model to learn a mapping from inputs to outputs so that, given a new, unseen image,
it can accurately predict or classify the object it contains.
Unsupervised Machine Learning:

Machine learning that takes place in the absence of human supervision is known as
unsupervised machine learning.

Unsupervised learning is a branch of machine learning that deals with unlabeled data.

The training model has only input parameter values and discovers the groups or patterns on
its own.

The Unsupervised learning deals with the data that has no labeled outcomes.

Since there are no labels, the model doesn’t receive direct feedback or guidance on what the
correct output should be.

There are two main categories of unsupervised learning that are mentioned below:

• Clustering
• Association

Working of Unsupervised Machine Learning:

Unsupervised learning works by analyzing unlabeled data to identify patterns and


relationships.

The data is not labeled with any predefined categories or outcomes, so the algorithm must
find these patterns and relationships on its own.

Example(s):

Medical Diagnosis: Unsupervised learning algorithms can get involved in the analysis of
patient medical records and identify the clusters of patients having similar symptoms which
can be very helpful in the early diagnosis of a patient or the treatment planning.

Reinforcement Machine Learning:

Reinforcement learning is the closest machine learning type to how humans learn.

It is a type of machine learning where an agent learns to make decisions by interacting with
an environment.

Unlike supervised learning, where the model learns from labeled data, in RL, the agent learns
through trial and error by receiving feedback from the environment.
Example(s):

Autonomous Vehicles: Companies like Tesla and Waymo use RL techniques to train self-
driving cars. These cars need to make decisions in real time based on dynamic environments
(e.g., road conditions, traffic, pedestrians).

Healthcare and Drug Discovery: RL can be applied in personalized medicine, where the agent
(a virtual healthcare provider) learns to suggest treatment plans based on patient data (e.g.,
symptoms, medical history) to maximize health outcomes.

Q-3. Explain Supervised Learning and types of it.

Ans. It involves training a model using labeled data, where each input comes with a
corresponding correct output.

The process is like a teacher guiding a student—hence the term “supervised” learning.

The goal of supervised learning is to make accurate predictions when given new, unseen data.

There are two main categories of supervised learning that are mentioned below:

• Classification
• Regression

Classification:

Classification algorithms are used to predict/Classify the discrete values such as True or False,
Spam or Not Spam, etc.

The best example to understand the Classification problem is Email Spam Detection.

The model is trained on the basis of millions of emails on different parameters, and whenever
it receives a new email, it identifies whether the email is spam or not.

Types of Classification Models:

➢ Binary Classification: This is the simplest kind of classification. In binary classification,


the goal is to sort the data into two distinct categories. Imagine a system that sorts
emails into either spam or not spam. It works by looking at different features of the
email like certain keywords or sender details, and decides whether it’s spam or not.
➢ Multiclass Classification: Instead of just two categories, the data needs to be sorted
into more than two categories. The model picks the one that best matches the input.
Think of an image recognition system that sorts pictures of animals into categories like
cat, dog, and bird.
➢ Logistic regression: is used to solve the classification problems in machine learning.
They are similar to linear regression but used to predict the categorical variables. It can
predict the output in either Yes or No, 0 or 1, True or False, etc. However, rather than
giving the exact values, it provides the probabilistic values between 0 & 1.

➢ Support Vector Machine (SVM): It is one of the most popular Supervised Learning
algorithms, which is used for Classification as well as Regression problems. The goal of
the SVM algorithm is to create the best line or decision boundary that can segregate
n-dimensional space into classes so that we can easily put the new data point in the
correct category in the future. This best decision boundary is called a hyperplane. The
best hyperplane is that plane that has the maximum distance from both the classes.
SVM chooses the extreme points/vectors that help in creating the hyperplane. These
extreme cases are called as support vectors, and hence algorithm is termed as Support
Vector Machine.

➢ K-Nearest Neighbor (K-NN): K-Nearest Neighbors (KNN) is a simple way to classify


things by looking at what’s nearby. K-Nearest Neighbors is also called as a lazy
learner algorithm because it does not learn from the training set immediately instead
it stores the dataset and at the time of classification it performs an action on the
dataset. In the k-Nearest Neighbors (k-NN) algorithm k is just a number that tells the
algorithm how many nearby points (neighbors) to look at when it makes a decision.
➢ Decision Tree: Decision Trees are a type of Supervised Machine Learning where the
data is continuously split according to a certain parameter. The tree can be explained
by two entities, namely decision nodes and leaves. The leaves are the decisions or
the final outcomes. And the decision nodes are where the data is split.

Regression:

Regression algorithms are used to predict the continuous values such as price, salary, age,
etc.

Regression is a process of finding the correlations between dependent and independent


variables.

For example, suppose we want to do weather forecasting, so for this, we will use the
Regression algorithm. In weather prediction, the model is trained on the past data, and once
the training is completed, it can easily predict the weather for future days.

Types of Regression Models:

➢ Simple Linear Regression: It is a type of supervised machine learning algorithm that


computes the linear relationship between one dependent variable and one
independent features by fitting a linear equation to observed data. Linear regression
makes predictions for continuous/real or numeric variables such as sales, salary, age,
product price, etc.

➢ Multi Linear Regression: It is a type of supervised machine learning algorithm that


computes the linear relationship between the dependent variable and one or more
independent features by fitting a linear equation to observed data. A common
example is predicting the price of a house based on its square footage and location,
where the price is the continuous outcome and the square footage and location are
the independent variables.

➢ Polynomial Regression: A type of linear regression where the relationship between


input features and the target is modeled as a polynomial, allowing for curved
relationships. For example, predicting car speed based on time, where the
relationship might not be linear.
Q-4. Explain Unsupervised Learning and types of it.

Ans. Machine learning that takes place in the absence of human supervision is known as
unsupervised machine learning.

Unsupervised learning is a branch of machine learning that deals with unlabeled data.

The training model has only input parameter values and discovers the groups or patterns on
its own.

There are two main categories of unsupervised learning that are mentioned below:

• Clustering
• Association

Clustering:

The task of grouping data points based on their similarity with each other is called Clustering
or Cluster Analysis.

This method is defined under the branch of unsupervised learning, which aims at gaining
insights from unlabeled data points.

➢ Hierarchical Clustering: Hierarchical clustering is a technique used to group similar


data points together based on their similarity creating a hierarchy or tree-like
structure. Hierarchical clustering is an unsupervised machine-learning clustering
strategy.
There are two types of hierarchal clustering:
1. Agglomerative clustering
2. Divisive Clustering

Agglomerative Clustering: It is also known as the bottom-up approach. It starts with


individual data points and progressively merging them into larger clusters.

Divisive Clustering: It is also known as a top-down approach. The algorithm starts


with all data points in a single cluster and recursively splits the cluster into smaller
clusters
➢ K-Means Clustering: This algorithm divides the dataset into K clusters by minimizing
the variance within each cluster. The number of clusters K needs to be predefined.
For example, grouping customers based on purchasing behavior. For instance, a retail
store could segment customers into K clusters (e.g., budget shoppers, high-end
shoppers, frequent buyers).

Association:

Association rule learning is used to find interesting relationships (associations) between


variables in large datasets. It is most commonly used for market basket analysis, where
the goal is to discover associations between items bought together.

You might also like