0% found this document useful (0 votes)
16 views17 pages

Lecture-07 & 08 (New)

Uploaded by

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

Lecture-07 & 08 (New)

Uploaded by

f23mmg06
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 17

MACHINE LEARNING – A

CASE STUDY OF LINEAR


REGRESSION ALGORITHM
By: Aurangzeb Magsi
Lecture Contents

• Background
• Introduction
• Applications
• Types
• Supervised and Unsupervised Learning
• Supervised Learning – Regression
• Regression – Simple Linear regression: Case Study
• Conclusion
• Feedback
Machine Learning - Background

• 1960, George Devoll developed a robot


for General Motors.
• The robot shifts hot parts from one place
to another.
• Saved time and provided protection to
laborers.
• Scientists began thinking the
consequences of technological
advancements.
Figure 1. Robot Arm
Machine Learning - Background
• 1990, IBM developed the Chess Game using Artificial Intelligence (AI) and
Big Data approaches.
• Gary Kasparov (GrandMaster of Chess Game) was invited against Deep Blue
computer in 1996.
• Kasparov won 4 out 6 rounds.
• 1997, IBM updated the machine and
challenged Kasparov again.
• Kasparov conceded his defeat after 19 moves
only.
• First time in the history ever machine beat
human intelligence.
• The term was then coined as ‘Machine Figure 2. Kasparov v/s Deep Blue
Learning’.
Introduction
What is Machine Learning and How does it
work?

• The process of bring machines up to the level where they may recognize
objects like human being.
• Subfield of AI focused on building computer systems that learn from data.
• Involves different algorithms such as Neural Network, Regression etc to learn
from large amounts of data, making them effective for complex tasks such as
Classification and Prediction.
• The goal is to enable computers to learn and improve from experience
without being explicitly programmed for each task.
Introduction
History of Machine Learning

• 1950s: Early AI and neural networks research.


• 1980s: Introduction of more complex algorithms like Decision Trees and
Support Vector Machines (SVM).
• 2000s: Growth of large datasets and computing power, leading to the rise of
deep learning.
• 2010s and Beyond: Advances in deep learning, reinforcement learning, and
widespread application in various fields.
Machine Learning - Uses
• Healthcare: Medical Imaging, Personalized Medicine, Drug Discovery.
• Finance: Fraud Detection, Algorithmic Trading, Risk Management.
• Retail: Prize Optimization, Customer Sentiment Analysis, Inventory
Management.
• Manufacturing: Predictive Maintenance, Quality Control, Robotics &
Automation
• Transportation: Autonomous Vehicle, Traffic Prediction and Management,
Route Optimization
• Agriculture: Precision Farming, Crop Disease Detection, Yield Prediction,
Automated Irrigation.
• Education: Personalized Learning, Intelligent Tutoring Systems, Students
Performing Prediction, Administrative Task.
Machine Learning - Types
Supervised Unsupervised
• Input data is provided along with • Only input data is provided to the
output. model.
• Trained using labelled data. • Trained using unlabeled data.
• Takes direct feedback to check if it • Does not take any feedback.
is predicting correct output or not.
• Find hidden patterns and useful
• Train the model so that it can insights form unknown dataset.
predict output when it is given new
data. • Divided into clustering and
association
• Divided into regression and
classification
Machine Learning - Types

Machine Learning
Supervised Unsupervised
Linear Regression K-Means Clustering
Neural Network DBSCAN
K.N.N PCA
Decision Tree GANs
S.V.M One-Class SVM
Supervised Learning - Regression
• Statistical method, helps us in understanding and predicting relationship
between variables.
• Two types of variables i.e. Dependent (To be Predicted), Independent
(provide foundation for prediction).
• Describe how one variable changes (dependent) as another variable changes
(independent).
• Dependent Variable: We are trying to predict or explain (Y)
• Independent Variable: Used to predict or explain changes in the dependent
variable (X).
• Example: Predicting employee salary based on the years of experience.
Supervised Learning - Regression
Employee Salary against Experience
35000

30000
Y-axis

25000

20000

15000

10000

5000

0
0 0.5 1 1.5 2 2.5

X-axis
Regression – Simple Linear Regression

• A basic form of regression analysis


• Models the relationship between two variables by fitting a linear equation to
observed data
• Goal is to determine a linear relationship between these two variables.
• Equation: Y=mX+b
• Y: Represents dependent variable
• X: Represents independent variable
• m: Slope of the line (shows how much ‘Y’ changes for a unit change in ‘X’)
• b: Intercept (value of ‘Y’ when ‘X’ is zero)
Linear Regression - Project
Lines Compil Mean Mean Deviati Deviati Produc Sum of Square
of ation (X) (Y) on (X) on (Y) t of Produc of
Code- Time- Y Deviati t of Deviati
X ons Deviati ons for
ons X
10 4 20 8 10 4 40 80 100

20 8 0 0 0 0

30 12 -10 -4 40 100

• Calculate m = Sum of product of deviations / Sum of square of deviation of X )


• m = 0.4
• Hence, 0.4 change in the value of ‘Y’ with one unit change in ‘X’
• Calculate b = Mean of Y – (m*Mean of X)
• b= 0
Linear Regression - Project
Project Visualization
14

12

10
Y-axis

0
5 10 15 20 25 30 35

X-axis
Conclusion
• Machine Learning: a subset of artificial intelligence, trains algorithms to learn
from data and make predictions autonomously.
• Widely applied in various fields such as Finance, Education, Medical etc.
• Its Two main types are supervised learning (using labeled data) and
unsupervised learning.
• Common algorithms include linear and logistic regression, support vector
machines for supervised learning, and k-means and hierarchical clustering for
unsupervised learning.
• Regression analysis, like simple linear regression, models relationships between
variables, such as predicting weight from height.
• Overall, Machine Learning empowers data-driven decision-making across
industries.
Feedback/Assignment

• Draw a complete table to predict the time taken by the compiler to compile a
1500 lines of code. Visualize the output in the graphical form.
• Implement the concept of simple Linear Regression in PYTHON programing
language and highlight the outcomes and challenges during the compilation.
THANK YOU!

You might also like