You are on page 1of 24

Introduction to Machine Learning

Dr. Shekha Rai

Department of Electrical Engineering


National Institute of Technology Rourkela
India

1 / 24
Contents

Supervised learning

Unsupervised learning

Reinforcement learning

2 / 24
Supervised learning

Learn from past information.

Training data is the past information on a specific task.

Example: In image segregation problem, the training data will


have past data on different features on a no of images, along with
a tag whether image is blue or green.

The tag is called label.

Training data is labelled in case of supervised learning.

3 / 24
Supervised learning

Figure: Supervised learning

Labelled training data containing past information → i/p


The m/c builds a predictive model
This model is used on test data to assign a label for each record
in the test data. 4 / 24
Examples of supervised learning

Predicting whether tumour is malignant or benign

Predicting the price of stocks

Are these 2 problems of the same nature?

5 / 24
Types of Supervised learning

Predicting whether tumour is malignant or benign

Predicting the price of stocks

Are these 2 problems of the same nature? No

E.g 1 → predicts which category an unknown data belongs.

E.g 2 → predicts an absolute value.

Predicting a categorical variable → classification problem.

Predicting a real valued variable → regression problem.

6 / 24
Types of Supervised learning
Classification

A target feature (categorial) is predicted for test data based on


information obtained by training data.

The target categorical feature → class

Examples → image classification, prediction of disease

In image classification, if the image is of blue color, it is put in


one category and if it is red it is assigned another category.

Standard algorithms include: Naive Bayes, KNN and Decison


tree.

7 / 24
Types of Supervised learning
Classification

8 / 24
Types of Supervised learning
Classification

9 / 24
Types of Supervised learning
Regression

Objective is to predict numerical features like real estate,


temperature, etc

The predictor and target variable are continuous in nature.

Examples → demand forecasting in retails, weather forecast etc.

In linear regression a straight line is fitted between predictor and


target variable using least squares.

The sum of square of error between actual and predicted values


of the target variable is minimized.

1 predictor variable → simple linear regression

Multiple predictor variable → multiple linear regression

y = α + βx (1)
x → predictor variable and y → target variable. 10 / 24
Supervised learning
Regression

11 / 24
Unsupervised learning

No labelled training data to learn from and no prediction to be


made.

Objective is to take a dataset as input and find patterns within the


data elements.

Unsupervised learning → descriptive model and the process →


pattern or knowledge discovery.

2 types-

Clustering

Association

12 / 24
Types of unsupervised learning
Clustering

Groups similar objects together.

Objective is to discover the intrinsic grouping of unlabelled data


and form clusters

Different measures of similarity is applied- distance measure


(distance-based clustering).

If distance between the data items is low, they belong to the same
cluster.

13 / 24
Types of unsupervised learning
Clustering

Figure: Clustering

14 / 24
Types of unsupervised learning
Association

Association between the data elements is identified.

E.g market basket analysis.

Transaction id Items bought


1 [Diaper, bread, milk, beer]
2 [Milk,chicken, beer, diaper]
3 [Bread, diaper, chicken, beer ]
....
Possible association: Diaper → beer

15 / 24
Reinforcement learning

No idea about the class or model of a particular data.


The model has to do the classification.
Get rewarded if the classification is correct.
Else punishment.

The model learns and updates itself through reward/punishment.

More complex to understand and apply.


Standard algorithms are
Q-learning
Sarsa

Applications
Self driving cars
Intelligent robots

16 / 24
Reinforcement learning

Figure: Reinforcement learning

17 / 24
Multiple-choice

Unsupervised learning is

1 learning without computers

2 problem based learning

3 learning from environment

4 learning from teachers

18 / 24
Multiple-choice

Unsupervised learning is

1 learning without computers

2 problem based learning

3 learning from environment

4 learning from teachers

Answer (3)

19 / 24
Multiple-choice

In supervised learning

1 classes are not predefined

2 classes are predefined

3 classes are not required

4 classification is not done

20 / 24
Multiple-choice

In supervised learning

1 classes are not predefined

2 classes are predefined

3 classes are not required

4 classification is not done

Answer (2)

21 / 24
Multiple-choice

Prediction of natural calamity falls under

1 Supervised-classification

2 Supervised-regression

3 Unsupervised-clustering

4 Unsupervised-association

22 / 24
Multiple-choice

Prediction of natural calamity falls under

1 Supervised-classification

2 Supervised-regression

3 Unsupervised-clustering

4 Unsupervised-association

Answer (1)

23 / 24
Thank You

24 / 24

You might also like