Rajiv Gandhi University of Knowledge Technologies
Catering to the Educational Needs of Gifted Rural Youth of Andhra Pradesh
(Established by the Govt. of Andhra Pradesh and recognized as per Section 2(f) of UGC Act, 1956)
Rajiv Knowledge Valley Campus
Department of Computer Science and Engineering
Machine Learning
Day-2
Presented by
R Sreenivas
Assistant Professor
RGUKT RK Valley
Agenda
Types of Machine Learning
Supervised Learning
Unsupervised Learning
Reinforcement Learning
Quote of the Day
Aptitude & Coding
Types of Machine Learning Types of Machine Learning
Machine Learning algorithms can be trained many ways, and Each method
follow a different approach based on problem statement. Based on the methods
and way of learning machine learning is divided into mainly four 4 types.
Supervised Learning Unsupervised Learning Semi-supervised Learning Reinforcement Learning
new data new data reward
Red Unsupervised actions
Semi- Environment
Green supervised
Red Red
black ML Model
Supervised agent
ML Model
a l go r i t h m s a l go r i t h m s penalty
Supervised Learning
Supervised learning is a type of machine learning in which machines are
trained using “well labelled training dataset”, and on basis of that data, machines
Supervised Learning
can predict the outputs. The labelled dataset specifies that input and it’s
corresponding output labels are mapped of each the example.
labels
feature1 feature2 feature3 feature4
Sepal Petal
Sepal Petal Width
Width Length Species
Length Cm Cm
new data Cm Cm
Example 5.1 3.5 1.4 0.2 setosa
Red training
4.9 3.0 1.4 0.2 setosa
Green 7.0 3.2 4.7 1.4 versicolor
Red 6.4 3.2 4.5 1.5 versicolor
ML Model
black 6.5 3.0 5.2 2.0 virginica
algorithms 5.9 3.0 5.1 1.8 virginica
Dependent
Independent features features
Supervised Learning Supervised Learning
Supervised Learning
Regression Classification
Regression
➢ Regression is supervised learning
techniques.
Supervised Learning
➢ It finds the relationship between the
dependent(Y) and independent
variables(X).
Regression
➢ A regression problem is used when
the output variable is a real or Advertisement Sales(in rupees)
continuous value. 5 700
10 1500
➢ Example : House price, weather
25 4000
temperature, sales forecasting …etc
15 2500
50 10000
Regression
Algorithms
Supervised Learning
• Linear Regression
• Polynomial Regression
• Support Vector Regression
Regression
• Ridge Regression
• Lasso Regression Advertisement Sales(in rupees)
5 700
• Random forest Regression
10 1500
• KNN Regression 25 4000
15 2500
50 10000
Classification
➢ Classification is a type of
supervised learning technique.
Supervised Learning
➢ Classification is a process of
identifying and grouping objects
Classification
into predetermined categories.
Sepal Petal Petal
➢ A classification problem is used Sepal
Width Length Width Species
Length Cm
Cm Cm Cm
when the output variable is a 5.1 3.5 1.4 0.2 setosa
4.9 3.0 1.4 0.2 setosa
categorical.
7.0 3.2 4.7 1.4 versicolor
➢ Example : Boolean values, 6.4 3.2 4.5 1.5 versicolor
6.5 3.0 5.2 2.0 virginica
Gender, List of colours …etc 5.9 3.0 5.1 1.8 virginica
Classification
Algorithms
• Logistic Regression
Supervised Learning
• K- Nearest Neighbours
• Decision Tree
• Support Vector Machine Classification
• Naive Bayes
Sepal Petal Petal
Sepal
• Random Forest Length Cm
Width
Cm
Length
Cm
Width
Cm
Species
• Gaussian Naive Bayes Classifier 5.1 3.5 1.4 0.2 setosa
4.9 3.0 1.4 0.2 setosa
7.0 3.2 4.7 1.4 versicolor
6.4 3.2 4.5 1.5 versicolor
6.5 3.0 5.2 2.0 virginica
5.9 3.0 5.1 1.8 virginica
Applications of Supervised Learning
Spam Fraud
Supervised Learning
Detection Detection
Credit
Disease
Scoring
classification
Image
Weather
classification
forecasting
Sports Medical
analytics Diagnosis
10
Unsupervised Learning
Unsupervised learning is a type of machine learning in which models are
trained using unlabeled dataset. The goal of unsupervised learning is to find the
Unsupervised Learning
underlying structure of dataset, group that dataset according to similarities.
new data
Sepal Petal
Sepal Petal Width
Width Length
Length Cm Cm
Cm Cm
training 5.1 3.5 1.4 0.2
4.9 3.0 1.4 0.2
Red 7.0 3.2 4.7 1.4
ML Model 6.4 3.2 4.5 1.5
algorithms 6.5 3.0 5.2 2.0
5.9 3.0 5.1 1.8
Unsupervised Learning Unsupervised Learning
Unsupervised Learning
cluster1 cluster2
Product1
v
associate
Product2
Product4
Product3
4x4 4x2
cluster3
Clustering Association Dimensionality
Reduction
Clustering
cluster2
➢ Clustering is a type of unsupervised cluster1
Unsupervised Learning
learning technique. v
➢ It is process of grouping the objects into
clusters such that object with most
cluster3
similarities remains into a same group
Sepal Petal
Sepal Petal Width
Width Length
and has less or no similarities with the Length Cm
Cm Cm
Cm
5.1 3.5 1.4 0.2
object of another group .
4.9 3.0 1.4 0.2
➢ This technique is useful for identifying 7.0 3.2 4.7 1.4
6.4 3.2 4.5 1.5
patterns and relationships in data 6.5 3.0 5.2 2.0
5.9 3.0 5.1 1.8
without the need for labeled examples.
Clustering
cluster1 cluster2
Unsupervised Learning
Algorithms v
• K- Means clustering
• Hierarchical clustering
cluster3
• DBSCAN clustering
Sepal Petal
Sepal Petal Width
• Gaussian Mixture Model Length Cm
Width
Cm
Length
Cm
Cm
• BIRCH algorithm 5.1 3.5 1.4 0.2
4.9 3.0 1.4 0.2
• Mean-Shift clustering 7.0 3.2 4.7 1.4
6.4 3.2 4.5 1.5
• Agglomerative algorithm 6.5 3.0 5.2 2.0
5.9 3.0 5.1 1.8
Association
➢ Association is a type of unsupervised Product1
associate
Unsupervised Learning
learning technique. Product2
Product4
Product3
➢ It is a technique for discovering
relationships between items in a dataset.
➢ It identifies rules that indicate the presence
Customer_id Product1 Product2 Recommended
of one item implies the presence of 1 Pencil Eraser Sharpener
2 Notebook Blue Pen Red Pen
another item with a specific probability. 3 Mobile Pouch Headset
phone
Algorithms
• Apriori algorithm
• FP-Growth
• eclat
Dimensionality Reduction
➢ Dimensionality is a type of unsupervised
Unsupervised Learning
learning technique.
➢ It is the process of converting a set of 4x4 4x2
data having large dimensions into
Feature1 Feature2 New PC
smaller dimensions. It means removing
4 11 4
unwanted features from the dataset. 8 4 8
13 5 13
Algorithms
7 14 7
• Principal Component Analysis
• Linear Discriminant Analysis 4x2 4x1
• Kernel PCA
• Single Value Decomposition
Unsupervised Learning Applications of Unsupervised Learning
Clustering Anomaly
data Detection
Customer behavior
Dimentionality
analysis
Reduction
Image
Recommendation
Segmentation
Systems
Community detection Content
in Social media Recommendation
17
Semi-supervised Learning
Semi-Supervised learning is a type of Machine Learning algorithm that lies
Semi-supervised Learning
between Supervised and Unsupervised machine learning. It represents the
intermediate ground between Supervised and Unsupervised learning algorithms
and uses the combination of labeled and unlabeled datasets during the training
period.
new data
input
training
Unsupervised
Semi-
Red
supervised
Red ML Model
Supervised algorithms
Green
Partial labels
Semi-supervised Learning Applications of Semi-supervised Learning
Image Natural Language
classification Processing
Speech Recognition
Healthcare &
Medical Imagining
Recommendation
Agriculture
System
Education Image Reconition
19
Reinforcement Learning
Reinforcement learning is a feed back based machine learning technique in which
Reinforcement Learning
an agent learns to behave in an environment by performing actions , on seeing the
result of actions.
Algorithms
reward
• Q-Learning
• SARSA (State Action Reward State Action) actions
Environment
• Deep Q-Network
• Markov Decision Processes agent
• DDPG (Deep Deterministic Policy
Gradient)
Reinforcement Learning Applications of Reinforcement Learning
Game Robotic
Playing Navigation
Autonomous
Healthcare
Vehicles
Agriculture
Game AI
Education AR and VR
21
Which of the following is NOT supervised learning?
In class assignments
A) Decision Tree
B) Linear Regression
C) PCA
D) Naive Bayesian
Which of the following is supervised learning algorithm’s?
In class assignments
A) Support Vector Machine
B) K - Means
C) K NN
D) A & C only
E) A, B, C only
Which of the following is/are classification learning algorithm’s?
In class assignments
A) Logistic Regression
B) K - Means
C) Q-learning
D) DBSCAN
E) None of the above
In the 1983 movie WarGames, the computer learns how to master
the game of chess by playing against itself. What machine learning
method was the computer using?
In class assignments
A) Supervised learning
B) Unsupervised learning
C) Binary learning
D) Reinforcement learning
Your machine learning system is using labelled examples to try to predict future
data, compare that data to the predicted result, and then the model. What is the
best description of this machine learning method?
In class assignments
A) Unsupervised learning
B) Semi-supervised learning
C) Supervised learning
D) Reinforcement learning
To predict a quantity value. use ___
In class assignments
A) Regression
B) Clustering
C) Classification
D) Dimensionality reduction
Your organization allows people to create online professional profiles. A key
feature is the ability to create clusters of people who are professionally
connected to one another. What type of machine learning method is used to
create these clusters?
In class assignments
A) Unsupervised machine learning
B) Supervised machine learning
C) Reinforcement learning
D) Binary classification
Quote of the Day
Don’t take rest after your first victory.
Because if you fail in the second, more lips are waiting to
say that Your first victory was just by luck
Coding & Aptitude
189. Rotate Array
Daily Assignments
Input : nums = [1,2,3,4,5,6,7] , k=3 Output: [5,6,7,1,2,3,4]
The cost price of 20 articles is the same as the selling price
of x articles. If the profit is 25%, then the value of x is:
Thank
You