0% found this document useful (0 votes)
24 views

Ai Chapter 5

1. Supervised learning uses labeled data to train machine learning models to map inputs to outputs. It involves both input variables (features) and output variables (labels). 2. Supervised learning problems include regression to predict continuous values and classification to predict discrete categories. Regression finds correlations while classification divides data into classes. 3. Common supervised learning algorithms include linear regression, logistic regression, decision trees, random forests, support vector machines, k-nearest neighbors, and naïve Bayes. These can be used for both regression and classification tasks.

Uploaded by

Aschalew Ayele
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)
24 views

Ai Chapter 5

1. Supervised learning uses labeled data to train machine learning models to map inputs to outputs. It involves both input variables (features) and output variables (labels). 2. Supervised learning problems include regression to predict continuous values and classification to predict discrete categories. Regression finds correlations while classification divides data into classes. 3. Common supervised learning algorithms include linear regression, logistic regression, decision trees, random forests, support vector machines, k-nearest neighbors, and naïve Bayes. These can be used for both regression and classification tasks.

Uploaded by

Aschalew Ayele
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/ 45

CHAPTER 5

LEARNING

1
OUTLINE
1. Learning

2. Learning from Examples/Observation

3. Inductive learning

4. Decision trees

5. Neural Networks

2
INTRODUCTION TO LEARNING
 Machine Learning is an application of Artificial Intelligence (AI) which enables a

program(software) to learn from the experiences and improve their self at a task
without being explicitly programmed. Machine learning was introduced by
Arthur Samuel in 1959.
 Machine Learning is the study of making machines more human-like in their

behavior and decision making by giving them the ability to learn with minimum
human intervention, i.e., no explicit programming.
 To any software (program) to attain any experience and learn data is the main

requirement. Data is also called the fuel for Machine Learning and we can safely
say that there is no machine learning without data.
3
INTRODUCTION TO LEARNING
 In ML, when agents are exposed to new data, they learn, grow, change, and

develop by themselves.
 Machine learning involves finding insightful information without being told

where to look. Instead, they do this by leveraging algorithms that learn from data
in an iterative process.
 The main focus of machine learning is to allow the computers learn automatically

without human intervention.

How such learning can be started and done?:


 It can be started with the observations of data. The data can be examples,

instruction or some direct experiences. Then on the basis of this input, machine
makes better decision by looking for some patterns in data.
4
INTRODUCTION TO LEARNING
 Machine Learning: Data and output is run on the computer to create a program.

Machine learning is like farming or gardening. Seeds are the algorithms, nutrients
are the data, the gardener is you and plants are the programs.

5
HOW CAN MACHINE LEARN?
 The Machine Learning process starts with inputting training data into the selected

algorithm. New input data is fed into the machine learning algorithm to test
whether the algorithm works correctly. The prediction and results are then
checked against each other.
 If the prediction and results don’t match, the algorithm is re-trained multiple

times until it gets the desired outcome. This enables the machine learning
algorithm to continually learn on its own and produce the optimal answer,
gradually increasing in accuracy over time.
 The accuracy of these models would depend on the quality and amount of input

data. A large amount of data will help build a better model which predicts the
output more accurately. 6
Cont.…
 Formally, 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.

 Thus a learning system is characterized by:

• Task T

• Experience E, and

• Performance measure P

7
LEARNING COMPONENTS
 The learning system consists of the following components:

 Goal: Defined with respect to the task to be performed by the system

 Model: A mathematical function which maps perception to actions

 Learning rules: Which update the model parameters with new experience

such that the performance measures with respect to the goals is optimized

 Experience: A set of perception (and possibly the corresponding actions)

8
LEARNING PROBLEM
 Spam filtering for emails learning problem

 A spam filter is software that detects unsolicited and undesired email and

prevents it from reaching the inbox of a user.


 T: Identifying whether or not an email is spam.

 P: The percentage of emails correctly categorized as spam or non spam.

 E: Observing how you categorize emails as spam or non spam.

 Face Recognition learning problem

 T: Predicting distinct sorts of faces.

 P: Ability to anticipate the largest number of different sorts of faces.

 E: train the system with as many datasets of varied facial photos as possible.

9
MACHINE LEARNING TYPES
 AI machine learning models can be classified as:

 Supervised Learning

 Unsupervised Learning

 Reinforcement Learning

10
SUPERVISED LEARNING
 Supervised Learning: we use known or labeled data for the training. Since

the data is known, the learning is, therefore, supervised, i.e., directed into

successful execution. Once the model is trained based on the known data, you can

use unknown data into the model and get a new response.

 It uses external feedback to learning functions that map inputs to output

observations. In those models the external environment acts as a “teacher” of the

AI algorithms.

11
SUPERVISED LEARNING
 Example: the model tries to figure out whether the data is an apple or another

fruit. Once the model has been trained well, it will identify that the data is an
apple and give the desired response.

12
SUPERVISED LEARNING
 In Supervised Learning, we have two sets of variables called the target variable,

or labels (the variable we want to predict) and features(variables that help us


to predict target variables).
 We show the program(model) the features and the label associated with these

features and then the program is able to find the underlying pattern in the data.
Take this example of the dataset where we want to predict the price of the house
given its size. The price which is a target variable depends upon the size which is
a feature.
Number of • Input variables (x), and an output variable (y).
Price
rooms
• An algorithm identifies the mapping function
1 $100
between the input and output variables.
3 $300
• The relationship is y = f(x).
5 $500
13
SUPERVISED LEARNING
 We can group the supervised learning problems as:

 Regression problems: used to predict future values and the model is trained

with the historical data. Regression algorithms are used to predict the
continuous values such as, salary, age, Predicting the future price of a house.
 Classification problems: various labels train the algorithm to identify items

within a specific category. It is used to predict/Classify the discrete values


such as Male or Female, Dog or cat, Apple or an orange, Beer or wine or
water.
 The important difference between classification and regression problems, is,

classification is about predicting a label and regression is about predicting a


quantity.
14
SUPERVISED LEARNING
 Regression is a process of finding the correlations between dependent and

independent variables. Classification is a process of finding a function which


helps in dividing the dataset into classes based on different parameters.

15
SUPERVISED LEARNING
 Difference between regression and classification algorithm.

Regression Algorithm Classification Algorithm

The output variable must be of continuous The output variable must be a discrete value.
nature. Used with continuous data (data that Used with discrete data.
can take any value).

The task is to map the input value (x) with the The task is to map the input value(x) with
continuous output variable(y). the discrete output variable(y).

Find the best fit line, which can predict the Find the decision boundary, which can
output more accurately. divide the dataset into different classes.

 There are many algorithm for regression and classification problems. Some of

the algorithms can be used for both of the problems.

16
SUPERVISED LEARNING
 Types of algorithm

Regression Algorithm: Classification Algorithm


Simple Linear Regression Logistic Regression

Multiple Linear Regression K-Nearest Neighbors

Polynomial Regression Support Vector Machines

Support Vector Regression Naïve Bayes

Decision Tree Regression Decision Tree Classification

Random Forest Regression Random Forest Classification

17
SUPERVISED LEARNING: CLASSIFICATION
 Classification Algorithms can be further divided into two category:

 Linear Models

 Logistic Regression

 Support Vector Machines

 Non-linear Models

 K-Nearest Neighbors

 Kernel SVM

 Naïve Bayes

 Decision Tree Classification

 Random Forest Classification

18
EXERCISE
 Example: Suppose there is a marketing company A, who does various

advertisement every year and get sales on that. The below list shows the
advertisement made by the company in the last 5 years and the corresponding
sales:
Advertisement Sales Advertisement Sales
90 1000 90 Low
120 1500 120 Medium
150 2000 150 High
100 1300 100 Medium
130 1600 130 High
200 ?? 200 ??

The type of problem: Regression The type of problem:


19
Classification
UNSUPERVISED LEARNING
 Unsupervised Learning: is a machine learning technique in which models are not

supervised using training dataset. Instead, models itself find the hidden patterns

and insights from the given data. It can be compared to learning which takes

place in the human brain while learning new things.

20
UNSUPERVISED LEARNING
 Unsupervised approach is the one where we have no target variables, and we

have only the input variable(features) at hand. The algorithm learns by itself and

discovers an impressive structure in the data. The goal is to decipher the

underlying distribution in the data to gain more knowledge about the data.

 We can group the unsupervised learning problems as:

 Clustering: this means bundling the input variables with the same

characteristics together. E.g., grouping users based on search history

 Association: discover the rules that govern meaningful associations among

the data set. E.g., People who watch ‘X’ will also watch ‘Y’. 21
UNSUPERVISED LEARNING
 Some example of unsupervised learning algorithms:

 K-means clustering

 KNN (k-nearest neighbors)

 Principle Component Analysis

 Independent Component Analysis

 Singular value decomposition

22
REINFORCEMENT LEARNING
 Reinforcement Learning: works on a feedback-based process, in which an

agent automatically explore its surrounding by trail, taking action, learning from
experiences, and improving its performance.
 Agent gets rewarded for each good action and get punished for each bad action;

hence the goal of reinforcement learning agent is to maximize the rewards.


 Positive Reinforcement Learning: specifies increasing the tendency that the

required behavior would occur again by adding something. It enhances the


strength of the behavior of the agent and positively impacts it.
 Negative Reinforcement Learning: works exactly opposite to the positive RL.

It increases the tendency that the specific behavior would occur again by
avoiding the negative condition. 23
NEURAL NETWORKS
 The term Artificial neural network refers to a biologically inspired sub-field of

artificial intelligence modeled after the brain..

 Artificial Neural Network attempts to mimic the network of neurons makes up a

human brain so that computers will have an option to understand things and

make decisions in a human-like manner.

 Similar to a human brain has neurons interconnected to each other, artificial

neural networks also have neurons that are linked to each other in various layers

of the networks. These neurons are known as nodes.


24
NEURAL NETWORKS
 In the human brain, a typical neuron collects signals from others through a host

of fine structures called dendrites, neuron sends out spikes of electrical activity
through a long, thin stand known as an axon, synapse converts the activity from
the axon into electrical effects to the connected neurons.

25
ARTIFICIAL NEURAL NETWORKS : PERCEPTRON
 Perceptron: it consists of a single neuron with multiple inputs and a single output.

It has restricted information processing capability.


 A perceptron draws a hyperplane as the decision boundary over the input space.

26
ANN: MULTILAYER PERCEPTRON
 Multilayer Perceptron: consists of more than one perception which is grouped

together to form a multiple layer neural network. In contrast to perceptron,


multilayer networks can learn not only multiple decision boundaries, but the
boundaries may be nonlinear.

27
LEARNING IN ANN
 Learning a perceptron means finding the right values for W.

 The perceptron learning algorithm can be stated as below.

1. Assign random values to the weight vector

2. Apply the weight update rule to every training example

3. Are all training examples correctly classified?

a. Yes. Quit

b. No. Go back to Step 2.

28
LEARNING IN ANN
 Learning means minimizing the error term. In the Neural Network, we take the

computed loss value back to each layer so that it updates the weights in such a

way that minimizes the loss.

 This way of first adjusting the weights in the output is known as Backward

Propagation. On the other hand, the process of going from left to right i.e from

the Input layer to the Output Layer for the adjustment is known as the Forward

Propagation.

29
LEARNING IN ANN
 Forward Propagation is the way to move from the Input layer (left) to the

Output layer (right) in the neural network. The process of moving from the
right to left i.e backward from the Output to the Input layer is called the
Backward Propagation.

30
DEEP LEARNING
 It is a subfield of Machine Learning, inspired by the biological neurons of a

brain. Most deep learning methods use neural network architectures, which is

why deep learning models are often referred to as deep neural networks.

 When the volume of data increases, Machine learning techniques, no matter

how optimized, starts to become inefficient in terms of performance and

accuracy, whereas Deep learning performs much better in such cases.

 Deep learning algorithms work with almost any kind of data and require large

amounts of computing power and information to solve complicated issues.


31
DEEP LEARNING
 The term deep usually refers to the number of hidden layers in the neural

network. Traditional neural networks only contain 2-3 hidden layers, while deep
networks can have as many as 150.

32
DEEP LEARNING

33
DEEP LEARNING
 The most popular deep learning algorithms are:

 Convolutional Neural Networks (CNNs)

 Long Short Term Memory Networks (LSTMs)

 Recurrent Neural Networks (RNNs)

 Generative Adversarial Networks (GANs)

 Self Organizing Maps (SOMs)

 Deep Belief Networks (DBNs)

 Restricted Boltzmann Machines( RBMs)

 Autoencoders

34
DEEP LEARNING
 Convolutional Neural Networks (CNNs): also known as ConvNets, consist of

multiple layers and are mainly used for image processing and object detection.
Yann LeCun developed the first CNN in 1988 when it was called LeNet.
 CNN's are widely used to identify satellite images, process medical images,

forecast time series, and detect anomalies.

35
DEEP LEARNING
 Recurrent Neural Networks(RNNs): consist of some directed connections that

form a cycle that allow the output provided to be used as input in the current
phase of RNNs. RNNs are mostly used in captioning the image, time series
analysis, recognizing handwritten data, and translating data to machines.

36
DEEP LEARNING
 LSTMs are a type of Recurrent Neural Network (RNN) that can learn and

memorize long-term dependencies. Recalling past information for long periods


is the default behavior.

37
GENERALIZATION AND OVERFITTING
 The cause of poor performance in machine learning is either overfitting or

underfitting the data.

 The situation where any given model is performing too well on the training data

but the performance drops significantly over the test set is called an over fitting

model. Good performance on the training data, poor generalization to other

data.

 If the model is performing poorly over the test and the train set, then we call that

an underfitting model. Poor performance on the training data and poor


38
generalization to other data
GENERALIZATION AND OVERFITTING

39
GENERALIZATION AND OVERFITTING

40
GENERALIZATION AND OVERFITTING

41
APPLICATIONS OF NEURAL NETWORKS
 Neural networks have broad applicability to real world business problems. They

have already been successfully applied in many industries. Since neural networks
are best at identifying patterns or trends in data, they are well suited for
prediction or forecasting needs including:

• Sales forecasting, industrial process control

• customer research, data validation

• risk management, target marketing


 Neural networks are also used in a number of other applications which are too

hard to model using classical techniques. These include, computer vision, NLP,
path planning and etc.
42
APPLICATIONS OF NEURAL NETWORKS
 Recently, learning is widely used in a number of application areas including,

• Data mining and knowledge discovery

• Speech/image/video (pattern) recognition

• Autonomous vehicles/robots

• Decision support systems, Bioinformatics, WWW

43
MACHINES INTELLIGENCE
 In the world of AI, for a machine to be considered intelligent, it must pass the

Turing Test.
 A test developed by Alan Turing in the 1950s, which competes humans against

the machine.
 To pass the test, a human evaluator will interact with a machine and another

human at the same time, each in a different room.


 If the evaluator is not able to reliably tell the difference between the response

generated by the machine and the other human, then the machine passes the test
and is considered to be exhibiting “intelligent” behavior.

44
THE END
?

45

You might also like