You are on page 1of 33

Introduction to AI, ML and DL

Dr. Manjubala Bisi

Assistant Professor
Department of Computer Science and Engineering
National Institute of Technology Warangal
manjubalabisi@nitw.ac.in

May 02 2023

Dr. Manjubala Bisi Department of CSE, NIT Warangal May 02 2023 1 / 33


Outline

1 Introduction to AI, ML and DL

2 Types of Machine Learning

3 Regression and Classification Problem

4 Performance measures in Machine Learning

5 Applications of Machine Learning

Dr. Manjubala Bisi Department of CSE, NIT Warangal May 02 2023 2 / 33


Introduction to AI, ML and DL

Dr. Manjubala Bisi Department of CSE, NIT Warangal May 02 2023 3 / 33


Introduction to AI

Artificial intelligence is the ability of a computer to perform tasks


commonly associated with intelligent beings.
Applications:
Game Playing
Robotics
Natural Language Procesing
Expert system
Neural Networks

Dr. Manjubala Bisi Department of CSE, NIT Warangal May 02 2023 4 / 33


What is ML ?

Machine learning is the study of algorithms that learn from examples


and experience instead of relying on hard-coded rules and make
predictions on new data.

Dr. Manjubala Bisi Department of CSE, NIT Warangal May 02 2023 5 / 33


What is DL ?

Deep learning is a subfield of machine learning focusing on learning


data representations as successive layers of increasingly meaningful
representations.

Dr. Manjubala Bisi Department of CSE, NIT Warangal May 02 2023 6 / 33


Timeline of Technologies

Dr. Manjubala Bisi Department of CSE, NIT Warangal May 02 2023 7 / 33


Limitations of ML

One of the big challenge in ML is that Feature Extraction For


complex problems such as Object recognition and Handwriting
recognition, this is a huge challenge
Deep learning models are capable of focus on the right features by
themselves, requiring little guidance from the programmer, These
models can also solve partially the dimensionality problem
Idea behind DL is to build Learning algorithms that mimic brain

Dr. Manjubala Bisi Department of CSE, NIT Warangal May 02 2023 8 / 33


Anatomy of a deep neural network
Layers
Input data and targets
Loss function
Optimizer

Dr. Manjubala Bisi Department of CSE, NIT Warangal May 02 2023 9 / 33


ML

Machine Learning (ML) is the most in-demand technology in today’s


market. Its applications range from self-driving cars to predicting
deadly diseases.
Ever since the technical revolution, we’ve been generating an
immeasurable amount of data.
With the availability of so much data, it is finally possible to build
predictive models that can study and analyze complex data to find
useful insights and deliver more accurate results.
Top Tier companies such as Netflix and Amazon build such Machine
Learning models by using tons of data in order to identify profitable
opportunities and avoid unwanted risks.

Dr. Manjubala Bisi Department of CSE, NIT Warangal May 02 2023 10 / 33


Importance of ML

Increase in Data Generation


Improve Decision Making
Uncover patterns trends in data
Solve complex problems

Dr. Manjubala Bisi Department of CSE, NIT Warangal May 02 2023 11 / 33


Formal Definition of ML

The very first formal definition was given by Tom M. Mitchell: “A


computer program is said to learn from experience E with respect to
some class of tasks T and performance measure P if its performance
at tasks in T, as measured by P, improves with experience E”.
In simple terms,Machine learning is a subset of Artificial Intelligence
(AI) which provides machines the ability to learn automatically
improve from experience without being explicitly programmed to do
so.

Dr. Manjubala Bisi Department of CSE, NIT Warangal May 02 2023 12 / 33


Components in ML

Algorithm
Model
Predictor Variable
Response Variable
Training Data
Testing Data

Dr. Manjubala Bisi Department of CSE, NIT Warangal May 02 2023 13 / 33


ML Process

Dr. Manjubala Bisi Department of CSE, NIT Warangal May 02 2023 14 / 33


Types of ML

Supervised Learning
Unsupervised Learning
Semi-supervised learning
Reinforcement Learning

Dr. Manjubala Bisi Department of CSE, NIT Warangal May 02 2023 15 / 33


Supervised Learning

Supervised learning is a technique in which we teach or train the


machine using data which is well labeled.
Every instance data X, it’s output is given.
We will build a model so that given an observation Xnew, the model
should predict it’s output Ynew .

Dr. Manjubala Bisi Department of CSE, NIT Warangal May 02 2023 16 / 33


Unsupervised Learning

Unsupervised learning involves training by using unlabeled data and


allowing the model to act on that information without guidance.
Given a set of X’s , cluster or summarize them.
Every instance X, there is no label.

Dr. Manjubala Bisi Department of CSE, NIT Warangal May 02 2023 17 / 33


Semi-supervised Learning
Combination of both supervised and Unsupervised learning.
Some labelled training data.
larger amount of unbalanced training data.
The basic procedure involved is that first, the programmer will cluster
similar data using an unsupervised learning algorithm and then use
the existing labeled data to label the rest of the unlabelled data.
The acquisition of unlabelled data is relatively cheap while labeling
the said data is very expensive.
Speech Analysis: Since labeling of audio files is a very intensive task,
Semi-Supervised learning is a very natural approach to solve this
problem.
Internet Content Classification: Labeling each webpage is an
impractical and unfeasible process and thus uses Semi-Supervised
learning algorithms. Even the Google search algorithm uses a variant
of Semi-Supervised learning to rank the relevance of a webpage for a
given query.
Dr. Manjubala Bisi Department of CSE, NIT Warangal May 02 2023 18 / 33
Reinforcement Learning

Reinforcement Learning is a part of Machine learning where an agent


is put in an environment and he learns to behave in this environment
by performing certain actions and observing the rewards which it gets
from those actions.
You have an agent who is acting in an environment and you want to
figure out what actions the agent must take at each step.
It depends upon the reward or penalty it receives from environment.

Dr. Manjubala Bisi Department of CSE, NIT Warangal May 02 2023 19 / 33


Types of Problem in ML

Dr. Manjubala Bisi Department of CSE, NIT Warangal May 02 2023 20 / 33


Classification models in ML

Naive Bayes classifier


Decision tree
Artificial neural networks
Support vector machine
K-nearest neighbour

Dr. Manjubala Bisi Department of CSE, NIT Warangal May 02 2023 21 / 33


Regression models in ML

Linear Regression
Ridge Regression
Neural Network Regression
Lasso Regression
Decision Tree Regression
Random Forest
KNN Model
Support Vector Machines (SVM)
Gaussian Regression
Polynomial Regression

Dr. Manjubala Bisi Department of CSE, NIT Warangal May 02 2023 22 / 33


Features

The individual observations are analyzed into a set of quantifiable


properties which are called features.
Categorical ( ”A”, ”B”, ”AB”, ”O”)
Ordinal (”large”, ”medium”, ”small”)
Integer value
Real value

Dr. Manjubala Bisi Department of CSE, NIT Warangal May 02 2023 23 / 33


Classification Learning

Task T
Input : A set of instances d1, d2, ....dn (An instance has a set of
features and we can represent an instance as a vector d =
(x1,x2,....xn))
Output: A set of predictions (y1, y2,.....yn)
Experience E
A set of labelled examples (X, Y) , where Y is the true label for X
Example should be sampled from some fixed distribution D

Dr. Manjubala Bisi Department of CSE, NIT Warangal May 02 2023 24 / 33


Hypothesis Space

A supervised learning is a system that explores a ”hypothesis space”


Each setting of the parameters in the system is a different hypothesis
about the function that maps input vectors to output vectors.

Dr. Manjubala Bisi Department of CSE, NIT Warangal May 02 2023 25 / 33


Evaluation and Cross validation

How to evaluate learning algorithm?


Typical choices for performance measures: Error, Accuracy, Precision,
Recall
Typical choice for sampling methods: Train / Test sets, K-fold cross
validation

Dr. Manjubala Bisi Department of CSE, NIT Warangal May 02 2023 26 / 33


Trade- off

There is always a trade-off between


Complex hypothesis that fit the training data well, but they have a
tendency to over-fit the training data and may work poorly on the test
data.
Simpler hypothesis that generalize better but they may not be able to
represent complex function.

Dr. Manjubala Bisi Department of CSE, NIT Warangal May 02 2023 27 / 33


Performance measures in classification problem
Confusion Matrix

Dr. Manjubala Bisi Department of CSE, NIT Warangal May 02 2023 28 / 33


Performance metric

Accuracy is not the best metric to use when evaluating imbalanced


datasets as it can be misleading
Confusion Matrix
Precision is a measure of a classifier’s exactness
Recall is a measure of a classifier’s completeness
F1-Score is the the weighted average of precision and recall
Area Under ROC Curve (AUROC) represents the likelihood of the
model distinguishing observations from two classes

Dr. Manjubala Bisi Department of CSE, NIT Warangal May 02 2023 29 / 33


Area Under the Curve (AUC)

AUC is the measure of the ability of a classifier to distinguish between


classes and it compares TP rate vs FP rate
The higher the AUC, the better the performance of the model at
distinguishing between the positive and negative classes
When AUC = 1, then the classifier is able to perfectly distinguish
between all the Positive and the Negative class points correctly
When AUC = 0, then the classifier would be predicting all Negatives
as Positives, and all Positives as Negatives

Dr. Manjubala Bisi Department of CSE, NIT Warangal May 02 2023 30 / 33


Performance measures in regression problem

Dr. Manjubala Bisi Department of CSE, NIT Warangal May 02 2023 31 / 33


Applications of ML

Traffic Alerts
Social Media
Transportation and Commuting
Products Recommendations
Self Driving Cars
Google Translate
Online Video Streaming
Fraud Detection

Dr. Manjubala Bisi Department of CSE, NIT Warangal May 02 2023 32 / 33


Thank You !

Dr. Manjubala Bisi Department of CSE, NIT Warangal May 02 2023 33 / 33

You might also like