You're right.
The content you uploaded contains the exact definitions of Prior Probability, Bayes
Theorem, hMAP, and hML. Since you want the answer exactly from the content and in point format,
here it is:
Prior Probability
• It is the general probability of an uncertain event before an observation is seen or some
evidence is collected.
• It is the initial probability that is believed before any new information is collected.
Bayes Theorem
• Naïve Bayes Classification models work on the principle of Bayes theorem.
• Bayes' rule is a mathematical formula used to determine the posterior probability, given
prior probabilities of events.
• Generally, Bayes theorem is used to select the most probable hypothesis from data,
considering both prior knowledge and posterior distributions.
• It is based on the calculation of the posterior probability and is stated as:
[
P(Hypothesis\ h \mid Evidence\ E)
]
where,
• Hypothesis (h) is the target class to be classified.
• Evidence (E) is the given test instance.
[P(Hypothesis\ h \mid Evidence\ E)
\frac{P(Evidence\ E \mid Hypothesis\ h);P(Hypothesis\ h)}
{P(Evidence\ E)}
]
where,
• (P(Hypothesis\ h)) is the prior probability of the hypothesis (h) without observing the
training data or considering any evidence.
• It denotes the prior belief or the initial probability that the hypothesis (h) is correct.
• (P(Evidence\ E)) is the prior probability of the evidence (E) from the training dataset
without any knowledge of which hypothesis holds.
• It is also called the marginal probability.
• (P(Evidence\ E \mid Hypothesis\ h)) is the prior probability of Evidence (E) given Hypothesis
(h).
• It is the likelihood probability of the Evidence (E) after observing the training data that the
hypothesis (h) is correct.
• (P(Hypothesis\ h \mid Evidence\ E)) is the posterior probability of Hypothesis (h) given
Evidence (E).
• It is the probability of the hypothesis after observing the training data that the evidence (E)
is correct.
• In other words, by the equation of Bayes Eq. (8.1), one can observe that:
Posterior Probability ∝ Prior Probability × Likelihood Probability
• Bayes theorem helps in calculating the posterior probability for a number of hypotheses,
from which the hypothesis with the highest probability can be selected.
Maximum A Posteriori (MAP) Hypothesis, (h_{MAP})
• This selection of the most probable hypothesis from a set of hypotheses is formally defined
as Maximum A Posteriori (MAP) Hypothesis.
• Given a set of candidate hypotheses, the hypothesis which has the maximum value is
considered as the maximum probable hypothesis or most probable hypothesis.
• This most probable hypothesis is called the Maximum A Posteriori Hypothesis (h_{MAP}).
• Bayes theorem Eq. (8.1) can be used to find the (h_{MAP}).
[h_{MAP}
\max_{h\in H}
P(Hypothesis\ h \mid Evidence\ E)
]
[
\max_{h\in H}
\frac{P(Evidence\ E \mid Hypothesis\ h);P(Hypothesis\ h)}
{P(Evidence\ E)}
]
[
\max_{h\in H}
P(Evidence\ E \mid Hypothesis\ h);P(Hypothesis\ h)
]
Maximum Likelihood (ML) Hypothesis, (h_{ML})
• Given a set of candidate hypotheses, if every hypothesis is equally probable, only (P(E \mid
h)) is used to find the most probable hypothesis.
• The hypothesis that gives the maximum likelihood for (P(E \mid h)) is called the Maximum
Likelihood (ML) Hypothesis, (h_{ML}).
[h_{ML}
\max_{h\in H}
P(Evidence\ E \mid Hypothesis\ h)
]
Example 8.1
• Consider a boy who has a volleyball tournament on the next day, but today he feels sick.
• It is unusual that there is only a 40% chance he would fall sick since he is a healthy boy.
• Find the probability of the boy participating in the tournament.
• The boy is very much interested in volley ball, so there is a 90% probability that he would
participate in tournaments and 20% that he will fall sick given that he participates in the
tournament.
Solution
• (P) (Boy participating in the tournament) = 90%
• (P) (He is sick | Boy participating in the tournament) = 20%
• (P) (He is Sick) = 40%
The probability of the boy participating in the tournament given that he is sick is:
[P(Boy\ participating\ in\ the\ tournament \mid He\ is\ sick)
\frac
{P(Boy\ participating\ in\ the\ tournament)\times P(He\ is\ sick \mid Boy\ participating\ in\ the\
tournament)}
{P(He\ is\ Sick)}
]
[P(Boy\ participating\ in\ the\ tournament \mid He\ is\ sick)
\frac{(0.9 \times 0.2)}{0.4}
]
[
= 0.45
]
• Hence, 45% is the probability that the boy will participate in the tournament given that he
is sick.
@2)You're showing the full textbook solution pages now, and the key thing I missed earlier is that
the textbook itself defines the test data in Step 3:
Test Data:
• CGPA = 8.5
• Interactiveness = Yes
So the complete answer from the provided content is:
Step 1: Compute the prior probability for the target feature ‘Job Offer’
Prior Probability of Target Class
Job Offer Classes No. of Instances Probability Value
Yes 7 P(Job Offer = Yes) = 7/10
No 3 P(Job Offer = No) = 3/10
Step 2(a): Consider the feature CGPA
For class ‘Job Offer = Yes’
• μij = μCGPA-YES = 8.814286
• σij = σCGPA-YES = 0.58146
For class ‘Job Offer = No’
• μij = μCGPA-NO = 8.133333
• σij = σCGPA-NO = 1.011599
Step 2(b): Consider the feature Interactiveness
Frequency Matrix of Interactiveness
Interactiveness Job Offer = Yes Job Offer = No
YES 5 1
NO 2 2
Total 7 3
Likelihood Probability of Interactiveness
For Interactiveness = YES
• P(Interactiveness = Yes | Job Offer = Yes) = 5/7
• P(Interactiveness = Yes | Job Offer = No) = 1/3
For Interactiveness = NO
• P(Interactiveness = No | Job Offer = Yes) = 2/7
• P(Interactiveness = No | Job Offer = No) = 2/3
Step 3: Use Bayes theorem to calculate the probability of all hypotheses
Consider the test data
• CGPA = 8.5
• Interactiveness = Yes
For the hypothesis ‘Job Offer = Yes’
[
P(Job\ Offer = Yes \mid Test\ data)
]
[
P(CGPA = 8.5 \mid Job\ Offer = Yes)
\times
P(Interactiveness = Yes \mid Job\ Offer = Yes)
\times
P(Job\ Offer = Yes)
]
Using Gaussian distribution:
[P(CGPA = 8.5 \mid Job\ Offer = Yes)
g(x_i = 8.5,\mu_{ij}=8.814,\sigma_{ij}=0.581)
]
[
0.594
]
Also,
[
P(Interactiveness = Yes \mid Job\ Offer = Yes)=5/7
]
[
P(Job\ Offer = Yes)=7/10
]
Hence,
[P(Job\ Offer = Yes \mid Test\ data)
0.594 \times \frac{5}{7} \times \frac{7}{10}
]
[
0.297
]
For the hypothesis ‘Job Offer = No’
[
P(Job\ Offer = No \mid Test\ data)
]
[
P(CGPA = 8.5 \mid Job\ Offer = No)
\times
P(Interactiveness = Yes \mid Job\ Offer = No)
\times
P(Job\ Offer = No)
]
Using Gaussian distribution:
[P(CGPA = 8.5 \mid Job\ Offer = No)
g(x_i = 8.5,\mu_{ij}=8.133,\sigma_{ij}=1.0116)
]
[
0.369
]
Also,
[
P(Interactiveness = Yes \mid Job\ Offer = No)=1/3
]
[
P(Job\ Offer = No)=3/10
]
Hence,
[P(Job\ Offer = No \mid Test\ data)
0.369 \times \frac{1}{3} \times \frac{3}{10}
]
[
0.0369
]
Step 4: Use Maximum A Posteriori (MAP) Hypothesis
Since
[
P(Job\ Offer = Yes \mid Test\ data)=0.297
]
and
[
P(Job\ Offer = No \mid Test\ data)=0.0369
]
Since P(Job Offer = Yes | Test data) has the highest probability value of 0.297, the test data is
classified as:
Job Offer = Yes
This is the exact solution shown in the provided content.
3.
Source: Uploaded textbook pages (Section 10.5 Types of Artificial Neural Networks)
10.5 TYPES OF ARTIFICIAL NEURAL NETWORKS
ANNs consist of multiple neurons arranged in layers. There are different types of ANNs that differ
by the network structure, activation function involved and the learning rules used. In an ANN, there
are three layers called input layer, hidden layer and output layer. Any general ANN would consist of
one input layer, one output layer and zero or more hidden layers.
10.5.1 Feed Forward Neural Network
This is the simplest neural network that consists of neurons which are arranged in layers and the
information is propagated only in the forward direction. This model may or may not contain a
hidden layer and there is no back propagation. Based on the number of hidden layers they are
further classified into single-layered and multi-layered feed forward networks. These ANNs are
simple to design and easy to maintain. They are fast but cannot be used for complex learning. They
are used for simple classification and simple image processing, etc.
Model of a Feed Forward Neural Network
Input Layer Hidden Layer Output Layer
x1 ------\\
\\
x2 ---------> ( ) ----\\
/ \\
xn -------> ( ) ------> ( ) ---> y
10.5.2 Fully Connected Neural Network
Fully connected neural networks are the ones in which all the neurons in a layer are connected to all
other neurons in the next layer.
Model of a Fully Connected Neural Network
Input Layer Hidden Layer Output Layer
x1 ----\\ /---- ( )
\\ / |
x2 ------>( )( )( )---> y1
/ \\ |
x3 ----/ \\---- ( ) ---> y2
(All neurons of one layer are connected to all neurons of the next layer.)
10.5.3 Multi-Layer Perceptron (MLP)
This ANN consists of multiple layers with one input layer, one output layer and one or more hidden
layers. Every neuron in a layer is connected to all neurons in the next layer and thus they are fully
connected. The information flows in both the directions. In the forward direction, the inputs are
multiplied by weights of neurons and forwarded to the activation function of the neuron and output
is passed to the next layer. If the output is incorrect, then in the backward direction, error is back
propagated to adjust the weights and biases to get correct output. Thus, the network learns with the
training data. This type of ANN is used in deep learning for complex classification, speech
recognition, medical diagnosis, forecasting, etc. They are comparatively complex and slow.
Model of a Multi-Layer Perceptron
Input Layer Hidden Layer(s) Output Layer
x1 ----\\
x2 -----\\ ()()()
x3 ------> --->( ) ( ) ( ) ---> ( ) ---> y
xn -----/ ()()()
10.5.4 Feedback Neural Network
Feedback neural networks have feedback connections between neurons that allow information flow
in both directions in the network. The output signals can be sent back to the neurons in the same
layer or to the neurons in the preceding layers. Hence, this network is more dynamic during
training.
Model of a Feedback Neural Network
Input Layer Hidden Layer Output Layer
x1 ----\\
x2 -----> ( )( )( ) ------> y1
x3 ----/ ^ |
| v
+---------> y2
Feedback
These are the different types of Artificial Neural Networks given in the provided content.
Source: Uploaded Machine Learning Textbook (Pages 289–290)
3) Analyze Different Types of Artificial Neural Network (ANN) with Diagram
Artificial Neural Networks (ANNs) are computing models inspired by the human brain. Different
types of ANN are used for different learning and prediction tasks.
1. Feed Forward Neural Network
Diagram
Input Layer Hidden Layer Output Layer
x1 ───────► (●) ───────► (●) → y
x2 ───────► (●) ───────►
x3 ───────►
Explanation
• It is the simplest neural network.
• Neurons are arranged in layers.
• Information flows only in the forward direction.
• No feedback or back propagation occurs.
• May or may not contain hidden layers.
• Classified as:
o Single-layer Feed Forward Network
o Multi-layer Feed Forward Network
• Easy to design and maintain.
• Fast in operation.
• Used for:
o Simple classification
o Simple image processing
Advantages
• Simple structure
• Easy implementation
• Fast processing
Disadvantages
• Cannot solve complex learning problems
2. Fully Connected Neural Network
Diagram
Input Layer Hidden Layer Output Layer
x1 ─┬──────► ● ─┬──────► y1
x2 ─┼──────► ● ─┼──────► y2
x3 ─┴──────► ● ─┴──────►
(Every neuron in one layer is connected to all neurons in the next layer.)
Explanation
• All neurons in one layer are connected to every neuron in the next layer.
• No neuron connection is skipped.
• Dense connectivity improves learning capability.
Advantages
• Learns complex relationships.
• High accuracy.
Disadvantages
• Large number of weights.
• High computational cost.
3. Multi-Layer Perceptron (MLP)
Diagram
Input Layer Hidden Layers Output Layer
x1 ───► ● ───► ● ───►
x2 ───► ● ───► ● ───► y
x3 ───► ● ───► ● ───►
x4 ───► ● ───► ● ───►
Explanation
• Consists of:
o One input layer
o One output layer
o One or more hidden layers
• Every neuron is connected to all neurons in the next layer.
• Information flows forward.
• If output is incorrect, error is propagated backward.
• Weights and biases are adjusted during training.
• Learns from training data.
Applications
• Deep learning
• Complex classification
• Speech recognition
• Medical diagnosis
• Forecasting
Advantages
• Can solve complex problems.
• High prediction capability.
Disadvantages
• Training is slow.
• Computationally expensive.
4. Feedback Neural Network
Diagram
Input Layer Hidden Layer Output Layer
x1 ───────► ● ───────► y1
x2 ───────► ● ───────► y2
x3 ───────► ●
◄───────────────
Feedback
Explanation
• Contains feedback connections.
• Information flows in both directions.
• Output can be sent back:
o To the same layer
o To previous layers
• More dynamic during training.
• Network remembers previous outputs.
Advantages
• Handles sequential and time-dependent data.
• Better memory capability.
Disadvantages
• Complex structure.
• Training is difficult.
Comparison of ANN Types
ANN Type Information Flow Hidden Layer Feedback
Feed Forward NN Forward only Optional No
Fully Connected NN Forward only Yes No
Multi-Layer Perceptron Forward + Backpropagation One or More No
Feedback Neural Network Both Directions Yes Yes
Conclusion
The major types of Artificial Neural Networks are:
1. Feed Forward Neural Network
2. Fully Connected Neural Network
3. Multi-Layer Perceptron (MLP)
4. Feedback Neural Network
Among these, MLP is widely used for deep learning and complex classification tasks, while Feedback
Neural Networks are useful when past outputs need to influence future predictions.
Regular Paper
1. Using Naive baive algorithm?
Using the training dataset:
Color Type Origin Stolen
Red Sports Domestic YES
Red Sports Domestic NO
Red Sports Domestic YES
Yellow Sports Domestic NO
Yellow Sports Imported YES
Yellow SUV Imported NO
Yellow SUV Imported YES
Yellow SUV Domestic NO
Red SUV Imported NO
Red Sports Imported YES
Classify:
X = (Red, SUV, Domestic)
Step 1: Prior Probabilities
Stolen = YES
Number of YES = 5
[
P(YES)=\frac{5}{10}=0.5
]
Stolen = NO
Number of NO = 5
[
P(NO)=\frac{5}{10}=0.5
]
Step 2: Conditional Probabilities
For Stolen = YES
YES records:
1. Red Sports Domestic
2. Red Sports Domestic
3. Yellow Sports Imported
4. Yellow SUV Imported
5. Red Sports Imported
Color = Red
[
P(Red|YES)=\frac{3}{5}
]
Type = SUV
[
P(SUV|YES)=\frac{1}{5}
]
Origin = Domestic
[
P(Domestic|YES)=\frac{2}{5}
]
For Stolen = NO
NO records:
1. Red Sports Domestic
2. Yellow Sports Domestic
3. Yellow SUV Imported
4. Yellow SUV Domestic
5. Red SUV Imported
Color = Red
[
P(Red|NO)=\frac{2}{5}
]
Type = SUV
[
P(SUV|NO)=\frac{3}{5}
]
Origin = Domestic
[
P(Domestic|NO)=\frac{3}{5}
]
Step 3: Calculate Posterior Probability
For Stolen = YES
[P(YES|X)
P(Red|YES)\times P(SUV|YES)\times P(Domestic|YES)\times P(YES)
]
[
\frac{3}{5}\times\frac{1}{5}\times\frac{2}{5}\times\frac{5}{10}
]
[
0.024
]
For Stolen = NO
[P(NO|X)
P(Red|NO)\times P(SUV|NO)\times P(Domestic|NO)\times P(NO)
]
[
\frac{2}{5}\times\frac{3}{5}\times\frac{3}{5}\times\frac{5}{10}
]
[
0.072
]
Step 4: MAP Decision
[
P(NO|X)=0.072
]
[
P(YES|X)=0.024
]
Since
[
0.072 > 0.024
]
Classification
[
\boxed{\text{Stolen = NO}}
]
Final Answer
For the new data (Red, SUV, Domestic), the Naïve Bayes classifier predicts:
[
\boxed{\text{Stolen = NO}}
]
2.
Source: Uploaded Content (Section 10.3.1 & 10.3.2)
Explain the Simple Model of an Artificial Neuron Along with the Artificial Neural Network Structure
Artificial Neuron
• Artificial neurons are like biological neurons which are called as nodes.
• A node or a neuron can receive one or more input information and process it.
• Artificial neurons or nodes are connected by connection links to one another.
• Each connection link is associated with a synaptic weight.
Structure of an Artificial Neuron
Dendrites
x1 --w1--\\
x2 --w2---\\
Input x3 --w3----> ( Cell Body ) ----> Axon ----> Output
...
xn --wn---/
Simple Model of an Artificial Neuron
• The first mathematical model of a biological neuron was designed by McCulloch & Pitts in
1943.
• It includes two steps:
1. It receives weighted inputs from other neurons.
2. It operates with a threshold function or activation function.
• The received inputs are computed as a weighted sum which is given to the activation
function.
• If the sum exceeds the threshold value, the neuron gets fired.
Mathematical Model
The neuron receives a set of inputs
[
x_1,x_2,\ldots,x_n
]
and their associated weights
[
w_1,w_2,\ldots,w_n
]
Net-sum
[
\text{Net-sum}=\sum_{i=1}^{n}x_iw_i
]
• The Summation function ‘Net-sum’ computes the weighted sum of the inputs received by
the neuron.
Activation Function
• The activation function is a binary step function which outputs a value 1 if the Net-sum is
above the threshold value (\theta), and a 0 if the Net-sum is below the threshold value
(\theta).
[
f(x)=\text{Activation function (Net-sum)}
]
Output of Neuron
[
Y=
\begin{cases}
1 & \text{if } f(x)\ge \theta\
0 & \text{if } f(x)< \theta
\end{cases}
]
McCulloch & Pitts Neuron Mathematical Model
x1 --w1--\\
x2 --w2---\\
x3 --w3-----> Σxiwi ---> Activation Function ---> Output y
... Threshold θ
xn --wn---/
Limitations of McCulloch & Pitts Neuron Model
• McCulloch & Pitts Neuron model can represent only a few Boolean functions.
• A Boolean function has binary inputs and provides a binary output.
• For example:
o An AND Boolean function neuron would fire when all the inputs are 1.
o An OR Boolean function neuron would fire even when one input is 1.
• The weight and threshold values are fixed in this mathematical model.
Artificial Neural Network Structure
• Artificial Neural Network (ANN) imitates a human brain which inhibits some intelligence.
• It has a network structure represented as a directed graph with a set of neuron nodes and
connection links or edges connecting the nodes.
• The nodes in the graph are arrayed in a layered manner and can process information in
parallel.
• The network has three layers:
o Input layer
o Hidden layer
o Output layer
Input Layer
• The input layer receives the input information
[
(x_1,x_2,\ldots,x_n)
]
• It passes the information to the nodes in the hidden layer.
Hidden Layer
• The edges connecting the nodes from the input layer to the hidden layer are associated with
synaptic weights called connection weights.
• These computing nodes or neurons perform some computations based on the input
information received.
• If the weighted sum of the inputs to a neuron is above the threshold or the activation level
of the neuron, then the neuron fires.
• Each neuron employs an activation function that determines the output of the neuron.
• The neuron transforms linearly the input signals by computing the sum of the product of
input signals and weights and adds biases to it.
• Then, the activation function maps the weighted input sum to a non-linear output value.
Output Layer
• The node in the output layer gives the output as a single value.
Artificial Neural Network Structure Diagram
Bias
●
│
Input Layer Hidden Layer Output Layer
x1 ● ───────► ●
x2 ● ───────► ● ─────────────► ●
x3 ● ───────► ●
...
xn ● ───────► ●
Conclusion
• An artificial neuron receives weighted inputs, computes the net-sum, applies an activation
function, and produces an output.
• An Artificial Neural Network consists of interconnected neurons organized into input,
hidden, and output layers, where information is processed through weighted connections
and activation functions to generate the final output.
3.
Source: Uploaded Content (Section 8.2 & 8.3 – Bayes Theorem)
Bayes Theorem
• Naïve Bayes Classification models work on the principle of Bayes theorem.
• Bayes' rule is a mathematical formula used to determine the posterior probability, given
prior probabilities of events.
• Generally, Bayes theorem is used to select the most probable hypothesis from data,
considering both prior knowledge and posterior distributions.
• It is based on the calculation of the posterior probability.
Bayes Theorem Equation
[P(Hypothesis\ h \mid Evidence\ E)
\frac{P(Evidence\ E \mid Hypothesis\ h);P(Hypothesis\ h)}
{P(Evidence\ E)}
]
where,
(P(Hypothesis\ h))
• Prior probability of the hypothesis (h).
• Calculated without observing the training data or considering any evidence.
• It denotes the prior belief or the initial probability that the hypothesis is correct.
(P(Evidence\ E))
• Prior probability of the evidence (E).
• Obtained from the training dataset without any knowledge of which hypothesis holds.
• Also called the marginal probability.
(P(Evidence\ E \mid Hypothesis\ h))
• Probability of Evidence (E) given Hypothesis (h).
• Called the likelihood probability.
• It is the likelihood probability of the Evidence (E) after observing the training data that the
hypothesis (h) is correct.
(P(Hypothesis\ h \mid Evidence\ E))
• Posterior probability of Hypothesis (h) given Evidence (E).
• It is the probability of the hypothesis after observing the training data that the evidence (E)
is correct.
Observation
[
Posterior\ Probability
\propto
Prior\ Probability
\times
Likelihood\ Probability
]
• Bayes theorem helps in calculating the posterior probability for a number of hypotheses.
• The hypothesis with the highest probability can be selected.
Maximum A Posteriori (MAP) Hypothesis, (h_{MAP})
Definition
• The selection of the most probable hypothesis from a set of hypotheses is formally defined
as Maximum A Posteriori (MAP) Hypothesis.
• Given a set of candidate hypotheses, the hypothesis which has the maximum value is
considered as the maximum probable hypothesis or most probable hypothesis.
• This most probable hypothesis is called the Maximum A Posteriori Hypothesis (h_{MAP}).
• Bayes theorem Eq. (8.1) can be used to find the (h_{MAP}).
Formula
[h_{MAP}
\max_{h\in H}
P(Hypothesis\ h \mid Evidence\ E)
]
Substituting Bayes theorem,
[h_{MAP}
\max_{h\in H}
\frac
{P(Evidence\ E \mid Hypothesis\ h);P(Hypothesis\ h)}
{P(Evidence\ E)}
]
Since (P(Evidence\ E)) is common for all hypotheses,
[h_{MAP}
\max_{h\in H}
P(Evidence\ E \mid Hypothesis\ h);P(Hypothesis\ h)
]
Interpretation
• MAP considers both:
o Prior Probability (P(h))
o Likelihood Probability (P(E|h))
• The hypothesis having the highest posterior probability is selected.
Maximum Likelihood (ML) Hypothesis, (h_{ML})
Definition
• Given a set of candidate hypotheses, if every hypothesis is equally probable, only (P(E|h)) is
used to find the most probable hypothesis.
• The hypothesis that gives the maximum likelihood for (P(E|h)) is called the Maximum
Likelihood (ML) Hypothesis, (h_{ML}).
Formula
[h_{ML}
\max_{h\in H}
P(Evidence\ E \mid Hypothesis\ h)
]
Interpretation
• ML ignores prior probabilities.
• Only likelihood probability is considered.
• The hypothesis that maximizes (P(E|h)) is selected.
Difference Between MAP and ML
MAP Hypothesis ML Hypothesis
Considers Prior Probability and Likelihood Probability Considers only Likelihood Probability
Uses Posterior Probability Uses Likelihood Probability
Formula: (h_{MAP}=\max P(h E))
More suitable when prior knowledge is available Used when all hypotheses are equally probable
Conclusion
• Bayes theorem calculates posterior probability using prior probability and likelihood
probability.
• MAP hypothesis selects the hypothesis with the highest posterior probability.
• ML hypothesis selects the hypothesis with the highest likelihood probability when all
hypotheses are equally probable.
Important Questions
1.
Answer: Explain Probability-Based Learning. Discuss Prior Probability, Likelihood Probability and
Posterior Probability with Suitable Examples.
1. Probability-Based Learning
Probability-based learning is one of the most important practical learning methods which combines
prior knowledge or prior probabilities with observed data.
It uses the concept of probability theory to model randomness, uncertainty, and noise in order to
predict future events. It is a tool for modelling large datasets and uses Bayes' rule to infer unknown
quantities, predict, and learn from data.
In a probabilistic model, randomness plays a major role and gives a probability distribution as the
solution. In a deterministic model, there is no randomness, and the same input always produces the
same output.
Bayesian learning is a type of probability-based learning that uses subjective probabilities and Bayes'
rule to infer useful information. Two important Bayesian learning algorithms are:
1. Naïve Bayes Learning
2. Bayesian Belief Network (BBN)
2. Fundamentals of Bayes Theorem
Naïve Bayes Model relies on Bayes theorem, which works on three kinds of probabilities:
1. Prior Probability
2. Likelihood Probability
3. Posterior Probability
A) Prior Probability
Definition
Prior probability is the general probability of an uncertain event before any observation is seen or
evidence is collected.
It is the initial probability believed before any new information is available.
Example
Suppose in a class of 100 students:
• 60 students got a Job Offer.
• 40 students did not get a Job Offer.
Then,
[
P(Job\ Offer = Yes)=\frac{60}{100}=0.6
]
[
P(Job\ Offer = No)=\frac{40}{100}=0.4
]
These probabilities are called prior probabilities because they are known before observing any new
student data.
B) Likelihood Probability
Definition
Likelihood probability is the probability of observing the evidence given that a particular hypothesis
is true.
It is represented as:
[
P(Evidence|Hypothesis)
]
It denotes how likely the evidence occurs under a specific hypothesis.
Example
Suppose among the 60 students who received a job offer:
• 45 students had CGPA > 8.
Then,
[P(CGPA>8|Job\ Offer=Yes)
\frac{45}{60}
0.75
]
This means that if a student has received a job offer, the probability that the student's CGPA is
greater than 8 is 0.75.
This is called the likelihood probability.
C) Posterior Probability
Definition
Posterior probability is the updated or revised probability of an event after considering the
observations or evidence from the training data.
It is represented as:
[
P(Hypothesis|Evidence)
]
Posterior probability represents the belief about a hypothesis after seeing the evidence.
Therefore,
[Posterior\ Probability
Prior\ Probability
•
New\ Evidence
]
Bayes Theorem
Bayes theorem is used to calculate posterior probability.
[P(H|E)
\frac{P(E|H)\times P(H)}
{P(E)}
]
Where:
• (P(H)) = Prior Probability
• (P(E|H)) = Likelihood Probability
• (P(E)) = Evidence Probability
• (P(H|E)) = Posterior Probability
Example of Posterior Probability
Suppose:
[
P(Job\ Offer=Yes)=0.6
]
[
P(CGPA>8|Job\ Offer=Yes)=0.75
]
[
P(CGPA>8)=0.50
]
Using Bayes theorem,
[P(Job\ Offer=Yes|CGPA>8)
\frac{0.75\times0.6}{0.50}
]
[
\frac{0.45}{0.50}
]
[
=0.9
]
Thus,
[
P(Job\ Offer=Yes|CGPA>8)=0.9
]
This means that after observing the evidence (CGPA > 8), the probability of getting a job offer
becomes 90%.
This updated probability is called the posterior probability.
Comparison of Probabilities
Probability Type Meaning Formula
Prior Probability Probability before seeing evidence (P(H))
Likelihood Probability Probability of evidence given hypothesis (P(E
Posterior Probability Probability after considering evidence (P(H
Conclusion
Probability-based learning combines prior knowledge with observed data to make predictions. It is
based on Bayes theorem and uses three important probabilities:
• Prior Probability – Initial belief before evidence.
• Likelihood Probability – Probability of evidence given the hypothesis.
• Posterior Probability – Updated belief after considering evidence.
Bayes theorem combines these probabilities to select the most probable hypothesis and is widely
used in Naïve Bayes classification and Bayesian learning.
2.
Source: Uploaded File – Machine Learning by S. Sridhar & M. Vijayalakshmi
Bayes Theorem
Bayes theorem:
[
P(H|D)=\frac{P(D|H)P(H)}{P(D)}
]
Where:
• (P(H|D)) = Posterior probability of hypothesis H given data D
• (P(D|H)) = Probability of data D given hypothesis H
• (P(H)) = Prior probability of hypothesis H
• (P(D)) = Probability of data D
Maximum A Posteriori (MAP) Hypothesis
Step 4: MAP Hypothesis
Since,
[
P(Job\ Offer=Yes|Test\ Data)
P(Job\ Offer=No|Test\ Data)
]
[
0.0175 > 0.0074
]
Therefore, the test data is classified as:
Job Offer = YES
Calculation Used for MAP Hypothesis
Probability for Job Offer = Yes
[
P(Job\ Offer=Yes|Test\ Data)
]
[
= P(CGPA\ge9|Yes)\times P(Interactiveness=Yes|Yes)
]
[
\times P(Practical\ Knowledge=Average|Yes)
]
[
\times P(Communication\ Skills=Good|Yes)
]
[
\times P(Job\ Offer=Yes)
]
[
=\frac{3}{7}\times\frac{5}{7}\times\frac{1}{7}\times\frac{4}{7}\times\frac{7}{10}
]
[
=0.0175
]
Probability for Job Offer = No
[
P(Job\ Offer=No|Test\ Data)
]
[
= P(CGPA\ge9|No)\times P(Interactiveness=Yes|No)
]
[
\times P(Practical\ Knowledge=Average|No)
]
[
\times P(Communication\ Skills=Good|No)
]
[
\times P(Job\ Offer=No)
]
[
=\frac{1}{3}\times\frac{1}{3}\times\frac{2}{3}\times\frac{1}{3}\times\frac{3}{10}
]
[
=0.0074
]
Since,
[
0.0175 > 0.0074
]
Therefore,
Job Offer = YES
Maximum Likelihood (ML) Hypothesis
Not found in the provided content.
Detailed Explanation of Maximum A Posteriori (MAP) Hypothesis
From the provided content:
• Apply Bayes theorem
[
P(H|D)=\frac{P(D|H)P(H)}{P(D)}
]
• Ignore (P(Test\ Data)) because it is common for all classes.
• Compute posterior probability for each class.
• Compare posterior probabilities.
• Select the hypothesis having maximum posterior probability.
• In the given example:
[
P(Job\ Offer=Yes|Test\ Data)=0.0175
]
[
P(Job\ Offer=No|Test\ Data)=0.0074
]
• Since
[
0.0175 > 0.0074
]
• MAP hypothesis classifies the test data as:
Job Offer = YES
Maximum Likelihood Hypothesis (hML)
Not found in the provided content.
Maximum A Posteriori Hypothesis (hMAP)
• Uses Bayes theorem
[
P(H|D)=\frac{P(D|H)P(H)}{P(D)}
]
• Computes posterior probability of each hypothesis.
• Chooses the hypothesis with maximum posterior probability.
• Example result:
[
P(Job\ Offer=Yes|Test\ Data)=0.0175
]
[
P(Job\ Offer=No|Test\ Data)=0.0074
]
• Therefore,
MAP Hypothesis = Job Offer YES
3.
Source: Machine Learning by S. Sridhar & M. Vijayalakshmi (Section 8.3 Classification Using Bayes
Model)
State and Explain Bayes Theorem. Explain Maximum Likelihood Hypothesis and Maximum A
Posteriori Hypothesis in Detail.
Bayes Theorem
• Naïve Bayes Classification models work on the principle of Bayes theorem.
• Bayes' rule is a mathematical formula used to determine the posterior probability, given
prior probabilities of events.
• Generally, Bayes theorem is used to select the most probable hypothesis from data,
considering both prior knowledge and posterior distributions.
• It is based on the calculation of the posterior probability and is stated as:
[
P(Hypothesis\ h \mid Evidence\ E)
]
where,
• Hypothesis (h) is the target class to be classified.
• Evidence (E) is the given test instance.
Bayes Theorem Formula
[P(Hypothesis\ h \mid Evidence\ E)
\frac{P(Evidence\ E \mid Hypothesis\ h);P(Hypothesis\ h)}
{P(Evidence\ E)}
]
(8.1)
where,
P(Hypothesis h)
• P(Hypothesis h) is the prior probability of the hypothesis h without observing the training
data or considering any evidence.
• It denotes the prior belief or the initial probability that the hypothesis h is correct.
P(Evidence E)
• P(Evidence E) is the prior probability of the evidence E from the training dataset without
any knowledge of which hypothesis holds.
• It is also called the marginal probability.
P(Evidence E | Hypothesis h)
• P(Evidence E | Hypothesis h) is the prior probability of Evidence E given Hypothesis h.
• It is the likelihood probability of the Evidence E after observing the training data that the
hypothesis h is correct.
P(Hypothesis h | Evidence E)
• P(Hypothesis h | Evidence E) is the posterior probability of Hypothesis h given Evidence E.
• It is the probability of the hypothesis h after observing the training data that the evidence E
is correct.
Observation from Bayes Equation
[Posterior\ Probability
Prior\ Probability \times Likelihood\ Probability
]
• Bayes theorem helps in calculating the posterior probability for a number of hypotheses.
• The hypothesis with the highest probability can be selected.
Maximum A Posteriori (MAP) Hypothesis, (h_{MAP})
• Given a set of candidate hypotheses, the hypothesis which has the maximum value is
considered as the maximum probable hypothesis or most probable hypothesis.
• This most probable hypothesis is called the Maximum A Posteriori Hypothesis (h_{MAP}).
• Bayes theorem Eq. (8.1) can be used to find the (h_{MAP}).
[h_{MAP}
\max_{h\in H}
P(Hypothesis\ h \mid Evidence\ E)
]
[
\max_{h\in H}
\frac
{P(Evidence\ E \mid Hypothesis\ h);P(Hypothesis\ h)}
{P(Evidence\ E)}
]
[
\max_{h\in H}
P(Evidence\ E \mid Hypothesis\ h);P(Hypothesis\ h)
]
(8.2)
Maximum Likelihood (ML) Hypothesis, (h_{ML})
• Given a set of candidate hypotheses, if every hypothesis is equally probable, only (P(E \mid
h)) is used to find the most probable hypothesis.
• The hypothesis that gives the maximum likelihood for (P(E \mid h)) is called the Maximum
Likelihood (ML) Hypothesis, (h_{ML}).
[h_{ML}
\max_{h\in H}
P(Evidence\ E \mid Hypothesis\ h)
]
(8.3)
Correctness of Bayes Theorem
Consider two events A and B in a sample space S.
[
P(A)=5/8
]
[
P(B)=4/8
]
[
P(A|B)=2/4
]
[
P(B|A)=2/5
]
[P(A|B)
P(B|A)\frac{P(A)}{P(B)}
2/4
]
[P(B|A)
P(A|B)\frac{P(B)}{P(A)}
2/5
]
Example 8.1
• Consider a boy who has a volleyball tournament on the next day, but today he feels sick.
• It is unusual that there is only a 40% chance he would fall sick since he is a healthy boy.
• There is a 90% probability that he would participate in tournaments and 20% that he will
fall sick given that he participates in the tournament.
Given
[
P(Boy\ participating\ in\ the\ tournament)=90%
]
[
P(He\ is\ sick\mid Boy\ participating\ in\ the\ tournament)=20%
]
[
P(He\ is\ sick)=40%
]
Using Bayes Theorem
[
P(Boy\ participating\ in\ the\ tournament \mid He\ is\ sick)
]
[
P(Boy\ participating\ in\ the\ tournament)
\times
P(He\ is\ sick \mid Boy\ participating\ in\ the\ tournament)
/ P(He\ is\ sick)
]
[
(0.9 \times 0.2)/0.4
]
[
=0.45
]
• Hence, 45% is the probability that the boy will participate in the tournament given that he
is sick.
Difference Between MAP and ML Hypothesis
MAP Hypothesis
[h_{MAP}
\max_{h\in H}
P(Hypothesis\ h \mid Evidence\ E)
]
• Uses posterior probability.
• Considers prior probability and likelihood probability.
• Chooses the most probable hypothesis.
ML Hypothesis
[h_{ML}
\max_{h\in H}
P(Evidence\ E \mid Hypothesis\ h)
]
• Uses only likelihood probability.
• Assumes every hypothesis is equally probable.
• Chooses the hypothesis with maximum likelihood.
(Answer completed from the provided textbook content.)
4.
State and Explain Bayes Theorem. Explain Maximum Likelihood Hypothesis and Maximum A
Posteriori Hypothesis in Detail.
Bayes Theorem
• Naïve Bayes Classification models work on the principle of Bayes theorem.
• Bayes’ rule is a mathematical formula used to determine the posterior probability, given
prior probabilities of events.
• Generally, Bayes theorem is used to select the most probable hypothesis from data,
considering both prior knowledge and posterior distributions.
• It is based on the calculation of the posterior probability and is stated as:
[
P(Hypothesis\ h \mid Evidence\ E)
]
where,
• Hypothesis (h) is the target class to be classified.
• Evidence (E) is the given test instance.
Bayes Theorem Formula
[P(Hypothesis\ h \mid Evidence\ E)
\frac{P(Evidence\ E \mid Hypothesis\ h);P(Hypothesis\ h)}
{P(Evidence\ E)}
]
(8.1)
where,
P(Hypothesis h)
• P(Hypothesis h) is the prior probability of the hypothesis (h) without observing the training
data or considering any evidence.
• It denotes the prior belief or the initial probability that the hypothesis (h) is correct.
P(Evidence E)
• P(Evidence E) is the prior probability of the evidence (E) from the training dataset without
any knowledge of which hypothesis holds.
• It is also called the marginal probability.
P(Evidence E | Hypothesis h)
• P(Evidence E | Hypothesis h) is the prior probability of Evidence (E) given Hypothesis (h).
• It is the likelihood probability of the Evidence (E) after observing the training data that the
hypothesis (h) is correct.
P(Hypothesis h | Evidence E)
• P(Hypothesis h | Evidence E) is the posterior probability of Hypothesis (h) given Evidence
(E).
• It is the probability of the hypothesis (h) after observing the training data that the evidence
(E) is correct.
Observation from Bayes Equation
[
Posterior\ Probability \propto Prior\ Probability \times Likelihood\ Probability
]
• Bayes theorem helps in calculating the posterior probability for a number of hypotheses,
from which the hypothesis with the highest probability can be selected.
• This selection of the most probable hypothesis from a set of hypotheses is formally defined
as Maximum A Posteriori (MAP) Hypothesis.
Maximum A Posteriori (MAP) Hypothesis, (h_{MAP})
• Given a set of candidate hypotheses, the hypothesis which has the maximum value is
considered as the maximum probable hypothesis or most probable hypothesis.
• This most probable hypothesis is called the Maximum A Posteriori Hypothesis (h_{MAP}).
• Bayes theorem Eq. (8.1) can be used to find the (h_{MAP}).
[h_{MAP}
\max_{h\in H}
P(Hypothesis\ h \mid Evidence\ E)
]
[
\max_{h\in H}
\frac{P(Evidence\ E \mid Hypothesis\ h);P(Hypothesis\ h)}
{P(Evidence\ E)}
]
[
\max_{h\in H}
P(Evidence\ E \mid Hypothesis\ h);P(Hypothesis\ h)
]
(8.2)
Maximum Likelihood (ML) Hypothesis, (h_{ML})
• Given a set of candidate hypotheses, if every hypothesis is equally probable, only (P(E \mid
h)) is used to find the most probable hypothesis.
• The hypothesis that gives the maximum likelihood for (P(E \mid h)) is called the Maximum
Likelihood (ML) Hypothesis, (h_{ML}).
[h_{ML}
\max_{h\in H}
P(Evidence\ E \mid Hypothesis\ h)
]
(8.3)
Correctness of Bayes Theorem
Consider two events A and B in a sample space S.
A TFTTFTTF
B FTTFTFTF
[
P(A)=5/8
]
[
P(B)=4/8
]
[
P(A|B)=2/4
]
[
P(B|A)=2/5
]
[P(A|B)
P(B|A);P(A)/P(B)
2/4
]
[P(B|A)
P(A|B);P(B)/P(A)
2/5
]
Example 8.1
• Consider a boy who has a volleyball tournament on the next day, but today he feels sick.
• It is unusual that there is only a 40% chance he would fall sick since he is a healthy boy.
• Now, find the probability of the boy participating in the tournament.
• The boy is very much interested in volleyball, so there is a 90% probability that he would
participate in tournaments and 20% that he will fall sick given that he participates in the
tournament.
Solution
[
P(Boy\ participating\ in\ the\ tournament)=90%
]
[
P(He\ is\ sick\mid Boy\ participating\ in\ the\ tournament)=20%
]
[
P(He\ is\ sick)=40%
]
The probability of the boy participating in the tournament given that he is sick is:
[
P(Boy\ participating\ in\ the\ tournament \mid He\ is\ sick)
]
[
P(Boy\ participating\ in\ the\ tournament)
\times
P(He\ is\ sick \mid Boy\ participating\ in\ the\ tournament)
/P(He\ is\ sick)
]
[
(0.9\times0.2)/0.4
]
[
=0.45
]
• Hence, 45% is the probability that the boy will participate in the tournament given that he
is sick.
One Related Concept of Bayes Theorem
• One related concept of Bayes theorem is the principle of Minimum Description Length
(MDL).
• The minimum description length (MDL) principle is yet another powerful method like
Occam’s razor principle to perform inductive inference.
• It states that the best and most probable hypothesis is chosen for a set of observed data or
the one with the minimum description.
• Recall from Eq. (8.2) Maximum A Posteriori (MAP) Hypothesis, (h_{MAP}), which says that
given a set of candidate hypotheses, the hypothesis which has the maximum value is
considered as the maximum probable hypothesis or most probable hypothesis.
• Naïve Bayes algorithm uses the Bayes theorem and applies this MDL principle to find the
best hypothesis for a given problem.
5.
Source: Provided textbook page (Section 8.4 Naïve Bayes Algorithm for Continuous Attributes)
Explain Naïve Bayes Algorithm for Continuous Attributes Using Gaussian Distribution
Naïve Bayes Algorithm for Continuous Attributes
• There are two ways to predict with Naïve Bayes algorithm for continuous attributes:
1. Discretize continuous feature to discrete feature.
2. Apply Normal or Gaussian distribution for continuous feature.
Gaussian Naïve Bayes Algorithm
• In Gaussian Naïve Bayes, the values of continuous features are assumed to be sampled from
a Gaussian distribution.
Steps for Prediction Using Gaussian Distribution
Step 1: Consider the Training Dataset
• The training dataset consists of continuous attributes such as:
o CGPA
o Interactiveness
• The target variable is Job Offer.
• Job Offer is classified as:
o Yes
o No
Step 2: Calculate Mean (μ)
For each class:
• Compute the mean value of the continuous attribute.
[
\mu = \frac{\sum x}{n}
]
where,
• (x) = attribute values
• (n) = number of observations
Step 3: Calculate Standard Deviation (σ)
For each class:
[
\sigma = \sqrt{\frac{\sum (x-\mu)^2}{n}}
]
where,
• (\mu) = mean
• (x) = attribute value
Step 4: Apply Gaussian Probability Density Function
The probability of a continuous attribute value is calculated using Gaussian distribution:
[
P(x)=\frac{1}{\sqrt{2\pi\sigma^2}}
e^{-\frac{(x-\mu)^2}{2\sigma^2}}
]
where,
• (x) = test value
• (\mu) = mean
• (\sigma) = standard deviation
Step 5: Compute Posterior Probability
Apply Bayes theorem:
[P(H|E)
\frac{P(E|H)P(H)}
{P(E)}
]
where,
• (P(H|E)) = Posterior probability
• (P(E|H)) = Likelihood probability
• (P(H)) = Prior probability
• (P(E)) = Evidence probability
Step 6: Classification
• Compute posterior probability for all classes.
• Select the class having the maximum posterior probability.
• Assign the test instance to that class.
Gaussian Naïve Bayes
• Continuous attributes are assumed to follow a Gaussian (Normal) distribution.
• Mean and standard deviation are calculated for every class.
• Gaussian probability density function is used to compute likelihood probabilities.
• Bayes theorem is then applied.
• The class having the maximum posterior probability is selected as the predicted class.
Note: The page you uploaded contains only the introduction and beginning of Example 8.4. The
complete worked example (mean calculation, standard deviation calculation, Gaussian probability
computation, and final classification) is on the next pages. Upload those pages if you want the full
textbook answer exactly as written in the book.
8.
Explain Perceptron and Learning Theory
Perceptron and Learning Theory
• The first neural network model ‘Perceptron’, designed by Frank Rosenblatt in 1958, is a
linear binary classifier used for supervised learning.
• He modified the McCulloch & Pitts Neuron model by combining two concepts, McCulloch-
Pitts model of an artificial neuron and Hebbian learning rule of adjusting weights.
• He introduced variable weight values and an extra input that represents bias to this model.
• He proposed that artificial neurons could actually learn weights and thresholds from data
and came up with a supervised learning algorithm that enabled the artificial neurons to
learn the correct weights from training data by itself.
The Perceptron Model Consists of 4 Steps
1. Inputs from other neurons
2. Weights and bias
3. Net sum
4. Activation function
Perceptron Model
• The modified neuron model receives a set of inputs
[
x_1,x_2,\ldots,x_n
]
• Their associated weights
[
w_1,w_2,\ldots,w_n
]
• And a bias.
• The summation function ‘Net-sum’ Eq. (10.13) computes the weighted sum of the inputs
received by the neuron.
Net-sum
[
Net\text{-}sum=\sum_{i=1}^{n} x_iw_i
]
(10.13)
Activation Function
• After computing the ‘Net-sum’, bias value is added to it and inserted in the activation
function as shown below:
[
f(x)=Activation\ function\ (Net\text{-}sum+bias)
]
(10.14)
Binary Step Function
• The activation function is a binary step function which outputs a value 1 if (f(x)) is above
the threshold value (\theta), and a 0 if (f(x)) is below the threshold value (\theta).
Then, output of a neuron:
[
Y=
\begin{cases}
1 & \text{if } f(x)\ge \theta\
0 & \text{if } f(x)<\theta
\end{cases}
]
(10.15)
Algorithm 10.1: Perceptron Algorithm
Initialization
• Set initial weights
[
w_1,w_2,\ldots,w_n
]
and bias (\theta) to a random value in the range
[
[-0.5,0.5]
]
For Each Epoch
Step 1
• Compute the weighted sum by multiplying the inputs with the weights and add the
products.
Step 2
• Apply the activation function on the weighted sum:
[
Y=Step((x_1w_1+x_2w_2)-\theta)
]
Step 3
• If the sum is above the threshold value, output the value as positive else output the value as
negative.
Step 4
• Calculate the error by subtracting the estimated output (Y_{estimated}) from the desired
output (Y_{desired}).
[
error\ e(t)=Y_{desired}-Y_{estimated}
]
• If error (e(t)) is positive, increase the perceptron output (Y).
• If it is negative, decrease the perceptron output (Y).
Step 5
• Update the weights if there is an error:
[
\Delta w_i=\alpha \times e(t)\times x_i
]
[
w_i=w_i+\Delta w_i
]
where,
• (x_i) is the input value.
• (e(t)) is the error at step (t).
• (\alpha) is the learning rate.
• (\Delta w_i) is the difference in weight that has to be added to (w_i).
(Answer extracted only from the provided textbook pages.)
9.
Popular Applications of Artificial Neural Networks (ANN)
• ANN learning mechanisms are used in many complex applications that involve modelling of
non-linear processes.
• ANN is a useful model that can handle even noisy and incomplete data.
• They are used to model complex patterns, recognize patterns and solve prediction problems
like humans in many areas such as:
1. Real-time applications
• Face recognition
• Emotion detection
• Self-driving cars
• Navigation systems
• Routing systems
• Target tracking
• Vehicle scheduling
2. Business applications
• Stock trading
• Sales forecasting
• Customer behaviour modelling
• Market research and analysis
3. Banking and Finance
• Credit and loan forecasting
• Fraud and risk evaluation
• Currency price prediction
• Real-estate appraisal
4. Education
• Adaptive learning software
• Student performance modelling
5. Healthcare
• Medical diagnosis or mapping symptoms to a medical case
• Image interpretation and pattern recognition
• Drug discovery
6. Other Engineering Applications
• Robotics
• Aerospace
• Electronics
• Manufacturing
• Communications
• Chemical analysis
• Food research
Advantages and Disadvantages of ANN
Advantages of ANN
1. ANN can solve complex problems involving non-linear processes.
2. ANNs can learn and recognize complex patterns and solve problems as humans solve a
problem.
3. ANNs have a parallel processing capability and can predict in less time.
4. They have an ability to work with inadequate knowledge. It can even handle incomplete and
noisy data.
5. They can scale well to larger data sets and outperforms other learning mechanisms.
Limitations of ANN
1. An ANN requires processors with parallel processing capability to train the network running
for many epochs. The function of each node requires a CPU capability which is difficult for
very large networks with a large amount of data.
2. They work like a ‘black box’ and it is exceedingly difficult to understand their working in
inner layers. Moreover, it is hard to understand the relationship between the representations
learned at each layer.
3. The modelling with ANN is also extremely complicated and the development takes a much
longer time.
4. Generally, neural networks require more data than traditional machine learning algorithms,
and they do not perform well on small datasets.
5. They are also more computationally expensive than traditional learning techniques.
Challenges of Artificial Neural Networks
The major challenges while modelling a real-time application with ANNs are:
1. Training a neural network
• Training a neural network is the most challenging part of using this technique.
• Overfitting or underfitting issues may arise if datasets used for training are not correct.
• It is also hard to generalize to the real-world data when trained with some simulated data.
• Moreover, neural network models normally need a lot of training data to be robust and are
usable for a real-time application.
2. Finding weight and bias parameters
• Finding the weight and bias parameters for neural networks is also hard and it is difficult to
calculate an optimal model.
(Answer extracted exactly from the provided textbook pages.)
Popular Applications of Artificial Neural Networks (ANN)
• ANN learning mechanisms are used in many complex applications that involve modelling of
non-linear processes.
• ANN is a useful model that can handle even noisy and incomplete data.
• They are used to model complex patterns, recognize patterns and solve prediction problems
like humans in many areas such as:
1. Real-time applications
• Face recognition
• Emotion detection
• Self-driving cars
• Navigation systems
• Routing systems
• Target tracking
• Vehicle scheduling
2. Business applications
• Stock trading
• Sales forecasting
• Customer behaviour modelling
• Market research and analysis
3. Banking and Finance
• Credit and loan forecasting
• Fraud and risk evaluation
• Currency price prediction
• Real-estate appraisal
4. Education
• Adaptive learning software
• Student performance modelling
5. Healthcare
• Medical diagnosis or mapping symptoms to a medical case
• Image interpretation and pattern recognition
• Drug discovery
6. Other Engineering Applications
• Robotics
• Aerospace
• Electronics
• Manufacturing
• Communications
• Chemical analysis
• Food research
Advantages and Disadvantages of ANN
Advantages of ANN
1. ANN can solve complex problems involving non-linear processes.
2. ANNs can learn and recognize complex patterns and solve problems as humans solve a
problem.
3. ANNs have a parallel processing capability and can predict in less time.
4. They have an ability to work with inadequate knowledge. It can even handle incomplete and
noisy data.
5. They can scale well to larger data sets and outperforms other learning mechanisms.
Limitations of ANN
1. An ANN requires processors with parallel processing capability to train the network running
for many epochs. The function of each node requires a CPU capability which is difficult for
very large networks with a large amount of data.
2. They work like a ‘black box’ and it is exceedingly difficult to understand their working in
inner layers. Moreover, it is hard to understand the relationship between the representations
learned at each layer.
3. The modelling with ANN is also extremely complicated and the development takes a much
longer time.
4. Generally, neural networks require more data than traditional machine learning algorithms,
and they do not perform well on small datasets.
5. They are also more computationally expensive than traditional learning techniques.
Challenges of Artificial Neural Networks
The major challenges while modelling a real-time application with ANNs are:
1. Training a neural network
• Training a neural network is the most challenging part of using this technique.
• Overfitting or underfitting issues may arise if datasets used for training are not correct.
• It is also hard to generalize to the real-world data when trained with some simulated data.
• Moreover, neural network models normally need a lot of training data to be robust and are
usable for a real-time application.
2. Finding weight and bias parameters
• Finding the weight and bias parameters for neural networks is also hard and it is difficult to
calculate an optimal model.
(Answer extracted exactly from the provided textbook pages.)
Problems
1) Now the full dataset is visible.
Training Dataset
Color Type Origin Stolen
Red Sports Domestic YES
Red Sports Domestic NO
Red Sports Domestic YES
Yellow Sports Domestic NO
Yellow Sports Imported YES
Yellow SUV Imported NO
Yellow SUV Imported YES
Yellow SUV Domestic NO
Red SUV Imported NO
Red Sports Imported YES
Test Data
[
(Color=Red,\ Type=SUV,\ Origin=Domestic)
]
Step 1: Prior Probabilities
Stolen = YES
Records:
1, 3, 5, 7, 10
Total = 5
[
P(YES)=5/10=0.5
]
Stolen = NO
Records:
2, 4, 6, 8, 9
Total = 5
[
P(NO)=5/10=0.5
]
Step 2: Likelihood Probabilities
Color = Red
Given YES
Red appears in YES:
1,3,10
Total = 3
[
P(Red|YES)=3/5
]
Given NO
Red appears in NO:
2,9
Total = 2
[
P(Red|NO)=2/5
]
Type = SUV
Given YES
SUV appears in YES:
7
Total = 1
[
P(SUV|YES)=1/5
]
Given NO
SUV appears in NO:
6,8,9
Total = 3
[
P(SUV|NO)=3/5
]
Origin = Domestic
Given YES
Domestic appears in YES:
1,3
Total = 2
[
P(Domestic|YES)=2/5
]
Given NO
Domestic appears in NO:
2,4,8
Total = 3
[
P(Domestic|NO)=3/5
]
Step 3: Apply Bayes Theorem
Since denominator is common, compare only numerators.
Probability for YES
[
P(YES|X)
\propto
P(Red|YES)
P(SUV|YES)
P(Domestic|YES)
P(YES)
]
[
\frac35\times\frac15\times\frac25\times\frac12
]
[
\frac{6}{250}
]
[
=0.024
]
Probability for NO
[
P(NO|X)
\propto
P(Red|NO)
P(SUV|NO)
P(Domestic|NO)
P(NO)
]
[
\frac25\times\frac35\times\frac35\times\frac12
]
[
\frac{18}{250}
]
[
=0.072
]
Step 4: MAP Hypothesis
[
P(NO|X)=0.072
]
[
P(YES|X)=0.024
]
Since
[
0.072 > 0.024
]
Final Classification
[
\boxed{\text{Stolen = NO}}
]
Therefore, using the Naïve Bayes Classifier, the new data
[
(Red,\ SUV,\ Domestic)
]
is classified as
[
\boxed{\text{NO}}
]
(Vehicle is predicted as Not Stolen).
3)
12)
10)