Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
10 views41 pages

Unit 4 Reasoning

The document discusses uncertainty in Artificial Intelligence (AI), outlining its significance, sources, types, and techniques for addressing it. It highlights the importance of managing uncertainty for reliable decision-making in critical applications like self-driving cars and medical diagnoses. Various methods such as probabilistic logic programming, fuzzy logic, and Bayesian statistics are presented as solutions to handle uncertainty effectively.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views41 pages

Unit 4 Reasoning

The document discusses uncertainty in Artificial Intelligence (AI), outlining its significance, sources, types, and techniques for addressing it. It highlights the importance of managing uncertainty for reliable decision-making in critical applications like self-driving cars and medical diagnoses. Various methods such as probabilistic logic programming, fuzzy logic, and Bayesian statistics are presented as solutions to handle uncertainty effectively.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 41

Department: R&AI

Subject: Robotics & Intelligent System (OE)


Semester: Fourth
Section:’A/B’

UNIT-IV REASONING

Uncertainty

What is Uncertainty in Artificial Intelligence?

Artificial intelligence (AI) uncertainty is when there’s not enough information or ambiguity in
data or decision-making. It is a fundamental concept in AI, as real-world data is often noisy
and incomplete. AI systems must account for uncertainty to make informed decisions.
AI deals with uncertainty by using models and methods that assign probabilities to different
outcomes. Managing uncertainty is important for AI applications like self-driving cars and
medical diagnosis, where safety and accuracy are key.

Sources of Uncertainty in AI

There are several sources of uncertainty in AI that can impact the reliability and effectiveness
of AI systems. Here are some common sources of uncertainty in AI:

1. Data Uncertainty: AI models are trained on data, and the quality and accuracy of the data
can affect the performance of the model. Noisy or incomplete data can lead to uncertain
predictions or decisions made by the AI system.
2. Model Uncertainty: AI models are complex and can have various parameters and
hyperparameters that need to be tuned. The choice of model architecture, optimization
algorithm, and hyperparameters can significantly impact the performance of the model,
leading to uncertainty in the results.
3. Algorithmic Uncertainty: AI algorithms can be based on different mathematical
formulations, leading to different results for the same problem. For example, different
machine learning algorithms can produce different predictions for the same dataset.
4. Environmental Uncertainty: AI systems operate in dynamic environments, and changes
in the environment can affect the performance of the system. For example, an autonomous
vehicle may encounter unexpected weather conditions or road construction that can impact
its ability to navigate safely.
5. Human Uncertainty: AI systems often interact with humans, either as users or as part of
the decision-making process. Human behavior and preferences can be difficult to predict,
leading to uncertainty in the use and adoption of AI systems.
6. Ethical Uncertainty: AI systems often raise ethical concerns, such as privacy, bias, and
transparency. These concerns can lead to uncertainty in the development and deployment
of AI systems, particularly in regulated industries.
7. Legal Uncertainty: AI systems must comply with laws and regulations, which can be
ambiguous or unclear. Legal challenges and disputes can arise from the use of AI systems,
leading to uncertainty in their adoption and implementation.
8. Uncertainty in AI Reasoning: AI systems use reasoning techniques to make decisions or
predictions. However, these reasoning techniques can be uncertain due to the complexity
of the problems they address or the limitations of the data used to train the models.
9. Uncertainty in AI Perception: AI systems perceive their environment through sensors
and cameras, which can be subject to noise, occlusion, or other forms of interference. This
can lead to uncertainty in the accuracy of the data used to train AI models or the
effectiveness of AI systems in real-world applications.
10. Uncertainty in AI Communication: AI systems communicate with humans through
natural language processing or computer vision. However, language and visual cues can be
ambiguous or misunderstood, leading to uncertainty in the effective communication
between humans and AI systems.

To mitigate these sources of uncertainty, developers, and users of AI systems need to invest in
better data quality, model interpretability, and transparency, as well as engage in open
dialogue about ethical and legal considerations.

Types of Uncertainty in AI

Uncertainty in artificial intelligence (AI) refers to the lack of complete information or the
presence of variability in data and models. Understanding and modeling uncertainty is crucial
for making informed decisions and improving the robustness of AI systems. There are several
types of uncertainty in AI, including:
1. Aleatoric Uncertainty: This type of uncertainty arises from the inherent randomness or
variability in data. It is often referred to as “data uncertainty.” For example, in a
classification task, aleatoric uncertainty may arise from variations in sensor measurements
or noisy labels.
2. Epistemic Uncertainty: Epistemic uncertainty is related to the lack of knowledge or
information about a model. It represents uncertainty that can potentially be reduced with
more data or better modeling techniques. It is also known as “model uncertainty” and
arises from model limitations, such as simplifications or assumptions.
3. Parameter Uncertainty: This type of uncertainty is specific to probabilistic models, such
as Bayesian neural networks. It reflects uncertainty about the values of model parameters
and is characterized by probability distributions over those parameters.
4. Uncertainty in Decision-Making: Uncertainty in AI systems can affect the decision-
making process. For instance, in reinforcement learning, agents often need to make
decisions in environments with uncertain outcomes, leading to decision-making
uncertainty.
5. Uncertainty in Natural Language Understanding: In natural language processing (NLP),
understanding and generating human language can be inherently uncertain due to language
ambiguity, polysemy (multiple meanings), and context-dependent interpretations.
6. Uncertainty in Probabilistic Inference: Bayesian methods and probabilistic graphical
models are commonly used in AI to model uncertainty. Uncertainty can arise from the
process of probabilistic inference itself, affecting the reliability of model predictions.
7. Uncertainty in Reinforcement Learning: In reinforcement learning, uncertainty may
arise from the stochasticity of the environment or the exploration-exploitation trade-off.
Agents must make decisions under uncertainty about the outcomes of their actions.
8. Uncertainty in Autonomous Systems: Autonomous systems, such as self-driving cars or
drones, must navigate uncertain and dynamic environments. This uncertainty can pertain to
the movement of other objects, sensor measurements, and control actions.
9. Uncertainty in Safety-Critical Systems: In applications where safety is paramount, such
as healthcare or autonomous vehicles, managing uncertainty is critical. Failure to account
for uncertainty can lead to dangerous consequences.
10. Uncertainty in Transfer Learning: When transferring a pre-trained AI model to a new
domain or task, uncertainty can arise due to domain shift or differences in data
distributions. Understanding this uncertainty is vital for adapting the model effectively.
11. Uncertainty in Human-AI Interaction: When AI systems interact with humans, there
can be uncertainty in understanding and responding to human input, as well as uncertainty
in predicting human behavior and preferences.

Addressing and quantifying these various types of uncertainty is an ongoing research area in
AI, and techniques such as probabilistic modeling, Bayesian inference, and Monte Carlo
methods are commonly used to manage and mitigate uncertainty in AI systems.

Techniques for Addressing Uncertainty in AI

We’ve just discussed the different types of uncertainty in AI. Now, let’s switch gears and
learn techniques for addressing uncertainty in AI. It’s like going from understanding the
problem to finding solutions for it.

Probabilistic Logic Programming

Probabilistic logic programming (PLP) is a way to mix logic and probability to handle
uncertainty in computer programs. This is useful for computer programmers when they are
not completely sure about the facts and rules they are working with. PLP uses probabilities to
help them make decisions and learn from data. They can use different techniques, like
Bayesian logic programs or Markov logic networks, to put PLP into action. PLP is handy in
various areas of artificial intelligence, like making guesses when we’re not sure, planning
when there are risks involved, and creating models with pictures and symbols.

Fuzzy Logic Programming

To deal with uncertainty in logic programming, there’s a method called fuzzy logic
programming (FLP). FLP combines regular logic with something called “fuzzy” logic. This
helps programmers express things that are a bit unclear or not black and white. FLP also helps
them make decisions and learn from this uncertain information. They can use different ways
to do FLP, like fuzzy Prolog, fuzzy answer set programming, and fuzzy description logic.
FLP is useful in various areas of artificial intelligence, like understanding language, working
with images, and making decisions when things are not very clear.

Nonmonotonic Logic Programming

To deal with problems of inconsistency in logic programming, there’s something called


nonmonotonic logic programming (NMLP). This is a way of thinking in computer
programming that doesn’t strictly follow the rules of traditional logic. With NMLP,
programmers can handle situations where things don’t always go as expected. They can use
techniques like negation as failure, default reasoning, and exceptions. NMLP also helps them
make decisions and learn in situations that are not set in stone. They can apply NMLP in
various ways, such as default logic, circumscription, and answer set programming. NMLP is
handy in different areas of artificial intelligence, like making common-sense judgments,
updating knowledge, and having arguments with a computer program.

Paraconsistent Logic Programming

Paraconsistent logic programming (PLP) is a technique for dealing with conflicting


information in logic programming. PLP adds a special type of logic called paraconsistent
logic to the mix. This helps programmers work with contradictory facts and rules without
creating chaos. It also lets them make sense of this contradictory information and learn from it.
There are various methods, like using relevance logic, adaptive logic, and four-valued logic,
to make PLP work. PLP is useful in different areas of artificial intelligence, like merging data
from different sources, changing what we believe, and handling situations where things don’t
quite match up.

Hybrid Logic Programming

Hybrid logic programming (HLP) is a way to handle situations where things are unclear or
don’t quite match up in logic programming. HLP brings together different styles of logic
programming to help programmers work with complicated information. It lets them use
various kinds of logic to express rules and complex facts and make sense of them. There are
different methods to make HLP work, like using a mix of probabilities, fuzzy reasoning, and
handling situations where things might not always follow the same rules. HLP is useful in
various areas of artificial intelligence, like managing interactions between different computer
systems and organizing information on the internet. It can also be used for creating structured
knowledge systems.

Ways to Solve Problems with Uncertain Knowledge

Probability plays a central role in AI by providing a formal framework for handling


uncertainty. AI systems use probabilistic models and reasoning to make informed decisions,
assess risk, and quantify uncertainty, allowing them to operate effectively in complex and
uncertain real-world scenarios. In probability, there are two ways to solve problems when
we’re not sure about the information:
 Bayes’ rule
 Bayesian statistics

Bayes’ Rule

Bayes’ rule is an important tool in probability that lets us adjust our best guesses when we
learn new stuff. It’s a way to use what we already know and mix it with new information to
make better guesses about what might happen. People use Bayes’ rule a lot in artificial
intelligence for things like sorting things into groups, making guesses about the future, and
deciding what to do when things are uncertain.

Mathematically, Bayes’ theorem is expressed as follows:

P(A|B) = (P(B|A) * P(A)) / P(B)

Here,
 The posterior probability, represented by P(A|B), is the chance of event A happening when
event B has happened.
 P(B|A) shows how likely event B is when event A has already happened.
 The prior probability, P(A), is the initial chance of event A happening before any new
information is considered.
 P(B) is the probability of event B happening, whether or not event A has happened.

In AI, Bayes’ theorem updates probabilities of hypotheses or predictions with new data or
evidence. It is helpful for dealing with uncertainty and making decisions with incomplete or
unclear information.

Bayesian Statistics

Bayesian statistics is a type of statistics that uses probability to analyze data. The framework
helps us make inferences and estimate probabilities using data and prior knowledge. Bayesian
statistics has been used in different fields to handle uncertainty and make informed choices. It
has been applied in environmental modeling, social sciences, and medical research.
Example:
Let’s consider an example of a financial risk assessment system that utilizes probabilistic
reasoning to handle uncertainty when deciding if loan applicants are creditworthy. This
system is designed to determine whether an individual or a business is a suitable candidate for
a loan based on various financial and personal factors, but these factors can be subject to
uncertainty and ambiguity.
The system uses probabilistic reasoning techniques to address uncertainty in the following
ways:
 Prior Probabilities: The system assigns prior probabilities to different creditworthiness
categories based on historical data and market conditions. These prior probabilities
represent the initial beliefs about the likelihood of an applicant falling into each
creditworthiness category before taking into account the applicant’s specific financial and
personal information.
 Likelihoods: The system employs statistical models to estimate the likelihood of
observing certain financial behaviors and personal characteristics given an applicant’s
creditworthiness category. For instance, it considers factors such as income, credit history,
outstanding debt, and employment status. These likelihoods may be modeled with
probabilistic distributions to account for the uncertainty inherent in the data.
 Bayesian Updating: Bayes’ rule is applied to update the probabilities of different
creditworthiness categories based on the prior probabilities and the observed financial and
personal information of the applicant. The updated probabilities, referred to as posterior
probabilities, represent the revised beliefs about the likelihood of the applicant belonging
to each creditworthiness category.
 Decision-Making: The system uses the posterior probabilities of different creditworthiness
categories to make a final lending decision. The decision can be based on a predetermined
threshold, a decision-making rule, or a combination of factors. For example, if the
posterior probability of an applicant being in the “low credit risk” category exceeds a
certain threshold, the system may approve the loan. Alternatively, the system may generate
a ranked list of creditworthiness categories, allowing the financial institution to decide the
terms and conditions of the loan based on the level of risk they are willing to accept.

Importance of Understanding Uncertainty in AI

Understanding uncertainty in Artificial Intelligence (AI) is paramount as it mirrors the


complexity of real-world scenarios.
Here are a few of the major pointers of uncertainty in artificial intelligence:
 Reliable Decision-Making: AI applications often involve critical decisions, such as
medical diagnoses or autonomous vehicle navigation. Acknowledging uncertainty ensures
that AI systems provide reliable, risk-aware choices.
 Quantifying Confidence: Uncertainty quantification enables AI models to express
confidence levels in their predictions. This information is invaluable for users to assess the
reliability of AI-driven recommendations.
 Ethical Considerations: In AI ethics, transparency and accountability are vital.
Understanding uncertainty allows developers and users to better comprehend AI decisions,
fostering trust and responsible AI deployment.
 Robustness: AI systems capable of handling uncertainty are more resilient to unforeseen
circumstances and variations in input data, contributing to their overall robustness.
 Scientific Advancements: In scientific research and exploration, AI aids in modeling
complex, uncertain phenomena, contributing to breakthroughs in various fields, including
climate science, astronomy, and genetics.
 Risk Assessment: Uncertainty analysis is crucial for risk assessment in finance, insurance,
and security, where accurate predictions can have significant financial and safety
implications.
 Resource Allocation: In business and resource management, AI systems that consider
uncertainty optimize resource allocation, ensuring efficient operations.

Probabilistic reasoning in Artificial intelligence

Uncertainty:

Till now, we have learned knowledge representation using first-order logic and propositional
logic with certainty, which means we were sure about the predicates. With this knowledge
representation, we might write A→B, which means if A is true then B is true, but consider a
situation where we are not sure about whether A is true or not then we cannot express this
statement, this situation is called uncertainty.

So to represent uncertain knowledge, where we are not sure about the predicates, we need
uncertain reasoning or probabilistic reasoning.

Causes of uncertainty:

Following are some leading causes of uncertainty to occur in the real world.

1. Information occurred from unreliable sources.


2. Experimental Errors
3. Equipment fault
4. Temperature variation
5. Climate change.

Probabilistic reasoning:

Probabilistic reasoning is a way of knowledge representation where we apply the concept of


probability to indicate the uncertainty in knowledge. In probabilistic reasoning, we combine
probability theory with logic to handle the uncertainty.

We use probability in probabilistic reasoning because it provides a way to handle the


uncertainty that is the result of someone's laziness and ignorance.
In the real world, there are lots of scenarios, where the certainty of something is not
confirmed, such as "It will rain today," "behavior of someone for some situations," "A match
between two teams or two players." These are probable sentences for which we can assume
that it will happen but not sure about it, so here we use probabilistic reasoning.

Need of probabilistic reasoning in AI:

o When there are unpredictable outcomes.


o When specifications or possibilities of predicates becomes too large to handle.
o When an unknown error occurs during an experiment.
In probabilistic reasoning, there are two ways to solve problems with uncertain knowledge:

o Bayes' rule
o Bayesian Statistics

Note: We will learn the above two rules in later chapters.


As probabilistic reasoning uses probability and related terms, so before understanding
probabilistic reasoning, let's understand some common terms:

Probability: Probability can be defined as a chance that an uncertain event will occur. It is
the numerical measure of the likelihood that an event will occur. The value of probability
always remains between 0 and 1 that represent ideal uncertainties.

. 0 ≤ P(A) ≤ 1, where P(A) is the probability of an event A.

. P(A) = 0, indicates total uncertainty in an event A.

. P(A) =1, indicates total certainty in an event A.


We can find the probability of an uncertain event by using the below formula.

o P(¬A) = probability of a not happening event.


o P(¬A) + P(A) = 1.
Event: Each possible outcome of a variable is called an event.

Sample space: The collection of all possible events is called sample space.

Random variables: Random variables are used to represent the events and objects in the real
world.

Prior probability: The prior probability of an event is probability computed before observing
new information.

Posterior Probability: The probability that is calculated after all evidence or information has
taken into account. It is a combination of prior probability and new information.
Conditional probability:

Conditional probability is a probability of occurring an event when another event has already
happened.

Let's suppose, we want to calculate the event A when event B has already occurred, "the
probability of A under the conditions of B", it can be written as:

Where P(A⋀ B)= Joint probability of a and B

P(B)= Marginal probability of B.

If the probability of A is given and we need to find the probability of B, then it will be given
as:

It can be explained by using the below Venn diagram, where B is occurred event, so sample
space will be reduced to set B, and now we can only calculate event A when event B is
already occurred by dividing the probability of P(A⋀ B) by P( B ).

Example:

In a class, there are 70% of the students who like English and 40% of the students who likes
English and mathematics, and then what is the percent of students those who like English also
like mathematics?

Solution:

Let, A is an event that a student likes Mathematics

B is an event that a student likes English.


Hence, 57% are the students who like English also like Mathematics.

Filtering Techniques in Artificial Intelligence

Filtering is a technique used by Artificial Intelligence (AI) algorithms to sift through and
analyze massive data sets to find specific information, correlations, or patterns. Filtering
techniques help to eliminate irrelevant, duplicate data and present useful data to the user in
the desired format. With the great potential of AI, filtering has expanded its range of
applications to different areas, from internet data mining to social network
analysis, recommendation systems, and many more.

Types of Data Filtering Techniques

Filtering techniques in AI come in different forms, each with specific strengths and
applications. The following are the main types of data filtering techniques:

 Rule-Based Filtering: This technique works with a set of predefined rules or patterns to
analyze and categorize data. Rule-based filtering is useful in areas that require highly
structured data, such as finance and accounting.
 Content-Based Filtering: This technique filters data by analyzing the specific attributes
of the items or products. Content-based filtering is often used in recommendation systems
to predict users' taste based on their previous behavior or preferences.
 Collaborative Filtering: This technique uses data similarity to recommend products or
services. It is based on the assumption that users with similar preferences will like the
same items or products.
 Hybrid Filtering: This technique combines the strengths and weaknesses of different
filtering techniques to provide more accurate results. Hybrid filtering systems are often
used when there is missing data or when data is highly complex.

Applications of Filtering Techniques in AI

Filtering techniques in AI have a wide range of applications in different areas. The following
are some of the popular applications of filtering techniques:

 Recommendation Systems: Filtering techniques are often used in recommendation


systems to provide personalized recommendations based on users' previous behavior,
purchase history, or browsing history.
 Internet Data Mining: Filtering techniques are useful in internet data mining to extract
useful information from massive data sets, such as social media data, website traffic data,
and more.
 Image and Video Processing: Filtering techniques are often used in image and video
processing to enhance the quality of images or videos, eliminate noise and artifacts, and
extract useful information.
 Speech and Language Recognition: Filtering techniques are useful in speech and
language recognition to eliminate noise and recognize patterns in speech or text.

Benefits of Using Filtering Techniques in AI


The use of filtering techniques in AI provides several benefits, including:

 Improved Accuracy: Filtering techniques provide accurate and reliable results by


eliminating redundant or irrelevant data.
 Time and Cost-Efficient: Filtering techniques help to save time and cost by reducing the
amount of data that needs to be processed or analyzed.
 Personalization: Filtering techniques help to provide personalized recommendations or
services based on users' preferences or behavior.
 Improved Decision-Making: Filtering techniques help to provide useful insights and
patterns that can help businesses and organizations make informed decisions.

Challenges with Filtering Techniques in AI

Although filtering techniques in AI provide several benefits, there are also some challenges
that need to be addressed. The following are some of the main challenges with filtering
techniques:

 Data Bias: Filtering techniques can suffer from data bias, where the data used to train the
algorithm is not representative of the target population.
 Data Privacy: Filtering techniques often rely on personal data, which can raise concerns
about data privacy and security.
 Overfitting: Filtering techniques can suffer from overfitting, where the model is trained
to fit the training data too well and fails to generalize to unseen data.
 Unbalanced Data: Filtering techniques can suffer from unbalanced data, where the target
class is rare in the data set, leading to poor classification performance.

Types of Filtering Techniques:

2. Kalman Filter (KF) — Linear Systems

Predicts and updates estimates over time.

Assumes:

 Linear system dynamics


 Gaussian noise

Widely used in tracking, navigation, and control systems.

Example: Tracking an object in motion using sensor data.

3. Extended Kalman Filter (EKF) — Non-linear Systems

 Applies linear approximation to non-linear models.


4. Particle Filter (Sequential Monte Carlo)

 Uses a set of samples (particles) to represent the distribution of possible states.


 Handles non-linear, non-Gaussian systems better than Kalman Filters.

5. Hidden Markov Models (HMMs)

Used when system states are hidden and evolve over time.

Common in:

 Speech recognition
 Bioinformatics
 Natural language processing

Applications of Filtering:

1. Robot localization (determining where a robot is)


2. Sensor fusion (e.g., combining GPS + IMU)
3. Autonomous vehicles
4. Weather forecasting
5. Stock market analysis

Prediction in Artificial Intelligence

What is Prediction?

Prediction in AI refers to forecasting future values or states based on current and historical
data. It’s at the core of many machine learning tasks.

Purpose:

To estimate future outcomes or behaviors of a system using learned patterns.

Common Prediction Methods:

1. Supervised Learning

 Learns from labeled data to make future predictions.

Algorithms:

 Linear Regression
 Decision Trees
 Support Vector Machines
 Neural Networks

Applications: Predicting house prices, credit risk scoring, etc.


2. Time Series Prediction

 Special case of supervised learning where data is sequential.

Techniques:

 ARIMA (AutoRegressive Integrated Moving Average)


 LSTM (Long Short-Term Memory networks)
 Prophet (by Facebook)

Applications: Stock price prediction, demand forecasting

3. Reinforcement Learning (RL)

 The AI predicts the best actions to take in an environment to maximize reward.


 Future state and reward prediction are key components.

4. Deep Learning for Prediction

 Convolutional Neural Networks (CNNs) for visual prediction


 Recurrent Neural Networks (RNNs) for sequence prediction
 Transformer models for text prediction (like ChatGPT!)

Applications of Prediction:

 Spam detection
 Predictive maintenance
 Healthcare diagnosis
 Recommendation systems (e.g., Netflix, Amazon)
 Natural language generation (e.g., text completion)

Filtering vs. Prediction – Quick Comparison

Feature Filtering Prediction


Goal Estimate current state Estimate future state or output
Observed noisy/incomplete
Based on Past and current data
data
Time Frame Present Future
Example Where is the robot now? Where will the robot be in 5 seconds?
Common Regression, Time Series Models,
Kalman Filter, Particle Filter
Algorithms LSTM

Hidden Markov Model

Hidden Markov Models (HMMs) are a type of probabilistic model that are commonly used in
machine learning for tasks such as speech recognition, natural language processing, and
bioinformatics. They are a popular choice for modelling sequences of data because they can
effectively capture the underlying structure of the data, even when the data is noisy or
incomplete. In this article, we will give a comprehensive overview of Hidden Markov Models,
including their mathematical foundations, applications, and limitations.
What are Hidden Markov Models?

A Hidden Markov Model (HMM) is a probabilistic model that consists of a sequence of


hidden states, each of which generates an observation. The hidden states are usually not
directly observable, and the goal of HMM is to estimate the sequence of hidden states based
on a sequence of observations. An HMM is defined by the following components:

o A set of N hidden states, S = {s1, s2, ..., sN}.


o A set of M observations, O = {o1, o2, ..., oM}.
o An initial state probability distribution, ? = {?1, ?2, ..., ?N}, which specifies the
probability of starting in each hidden state.
o A transition probability matrix, A = [aij], defines the probability of moving from one
hidden state to another.
o An emission probability matrix, B = [bjk], defines the probability of emitting an
observation from a given hidden state.
The basic idea behind an HMM is that the hidden states generate the observations, and the
observed data is used to estimate the hidden state sequence. This is often referred to as
the forward-backwards algorithm.

Applications of Hidden Markov Models

Now, we will explore some of the key applications of HMMs, including speech recognition,
natural language processing, bioinformatics, and finance.

 Speech Recognition
One of the most well-known applications of HMMs is speech recognition. In this field,
HMMs are used to model the different sounds and phones that makeup speech. The
hidden states, in this case, correspond to the different sounds or phones, and the
observations are the acoustic signals that are generated by the speech. The goal is to
estimate the hidden state sequence, which corresponds to the transcription of the speech,
based on the observed acoustic signals. HMMs are particularly well-suited for speech
recognition because they can effectively capture the underlying structure of the speech,
even when the data is noisy or incomplete. In speech recognition systems, the HMMs are
usually trained on large datasets of speech signals, and the estimated parameters of the
HMMs are used to transcribe speech in real time.
 Natural Language Processing
Another important application of HMMs is natural language processing. In this field,
HMMs are used for tasks such as part-of-speech tagging, named entity recognition,
and text classification. In these applications, the hidden states are typically associated
with the underlying grammar or structure of the text, while the observations are the
words in the text. The goal is to estimate the hidden state sequence, which corresponds to
the structure or meaning of the text, based on the observed words. HMMs are useful in
natural language processing because they can effectively capture the underlying structure
of the text, even when the data is noisy or ambiguous. In natural language processing
systems, the HMMs are usually trained on large datasets of text, and the estimated
parameters of the HMMs are used to perform various NLP tasks, such as text
classification, part-of-speech tagging, and named entity recognition.
 Bioinformatics
HMMs are also widely used in bioinformatics, where they are used to model sequences
of DNA, RNA, and proteins. The hidden states, in this case, correspond to the different
types of residues, while the observations are the sequences of residues. The goal is to
estimate the hidden state sequence, which corresponds to the underlying structure of the
molecule, based on the observed sequences of residues. HMMs are useful in
bioinformatics because they can effectively capture the underlying structure of the
molecule, even when the data is noisy or incomplete. In bioinformatics systems, the
HMMs are usually trained on large datasets of molecular sequences, and the estimated
parameters of the HMMs are used to predict the structure or function of new molecular
sequences.
 Finance
Finally, HMMs have also been used in finance, where they are used to model stock
prices, interest rates, and currency exchange rates. In these applications, the hidden states
correspond to different economic states, such as bull and bear markets, while the
observations are the stock prices, interest rates, or exchange rates. The goal is to estimate
the hidden state sequence, which corresponds to the underlying economic state, based on
the observed prices, rates, or exchange rates. HMMs are useful in finance because they
can effectively capture the underlying economic state, even when the data is noisy or
incomplete. In finance systems, the HMMs are usually trained on large datasets of
financial data, and the estimated parameters of the HMMs are used to make predictions
about future market trends or to develop investment strategies.

Limitations of Hidden Markov Models

Now, we will explore some of the key limitations of HMMs and discuss how they can impact
the accuracy and performance of HMM-based systems.

 Limited Modeling Capabilities


One of the key limitations of HMMs is that they are relatively limited in their modelling
capabilities. HMMs are designed to model sequences of data, where the underlying
structure of the data is represented by a set of hidden states. However, the structure of the
data can be quite complex, and the simple structure of HMMs may not be enough to
accurately capture all the details. For example, in speech recognition, the complex
relationship between the speech sounds and the corresponding acoustic signals may not
be fully captured by the simple structure of an HMM.
 Overfitting
Another limitation of HMMs is that they can be prone to overfitting, especially when the
number of hidden states is large or the amount of training data is limited. Overfitting
occurs when the model fits the training data too well and is unable to generalize to new
data. This can lead to poor performance when the model is applied to real-world data and
can result in high error rates. To avoid overfitting, it is important to carefully choose the
number of hidden states and to use appropriate regularization techniques.
 Lack of Robustness
HMMs are also limited in their robustness to noise and variability in the data. For
example, in speech recognition, the acoustic signals generated by speech can be
subjected to a variety of distortions and noise, which can make it difficult for the HMM
to accurately estimate the underlying structure of the data. In some cases, these
distortions and noise can cause the HMM to make incorrect decisions, which can result
in poor performance. To address these limitations, it is often necessary to use additional
processing and filtering techniques, such as noise reduction and normalization, to pre-
process the data before it is fed into the HMM.
 Computational Complexity
Finally, HMMs can also be limited by their computational complexity, especially when
dealing with large amounts of data or when using complex models. The computational
complexity of HMMs is due to the need to estimate the parameters of the model and to
compute the likelihood of the data given in the model. This can be time-consuming and
computationally expensive, especially for large models or for data that is sampled at a
high frequency. To address this limitation, it is often necessary to use parallel computing
techniques or to use approximations that reduce the computational complexity of the
model.
What is a Kalman Filter?

A Kalman Filter is a mathematical algorithm that uses a series of measurements observed


over time, containing statistical noise and other inaccuracies, and produces estimates of
unknown variables that tend to be more precise than those based on a single measurement
alone. Named after Rudolf E. Kálmán, the primary developer of its theory, the Kalman Filter
has become a fundamental tool in the field of control systems and time series analysis.

The Kalman Filter is an iterative process that estimates the state of a dynamic system from a
series of incomplete and noisy measurements. It is recursive, meaning that it can run in real-
time using only the current input measurements and the previously calculated state and its
uncertainty matrix; no additional past information is required.

How Does the Kalman Filter Work?

The Kalman Filter operates in two steps: the "predict" or "time update" phase and the
"update" or "measurement update" phase.

Predict Phase

In the predict phase, the Kalman Filter uses the state from the previous time step to produce
estimates of the current state. This prediction includes the estimation of the system's state
variables and the uncertainty of the estimate. The uncertainty is often expressed as a
covariance matrix, which is a measure of the "spread" or the expected accuracy of the
prediction.

Update Phase

During the update phase, the current prediction is combined with the current observation to
refine the state estimate. This step adjusts the predicted state by a factor proportional to the
difference between the actual measurement and the prediction. The Kalman Filter uses the
covariance matrix to weigh the accuracy of the prediction against the accuracy of the new
measurement, thus updating the state estimate and its uncertainty.

These two phases are repeated in a loop, with each iteration refining the estimates. This
process allows the filter to react to new measurements and improve the estimate over time,
which is why it is particularly useful for systems where the measurements are uncertain or
vary over time.

Applications of the Kalman Filter

The Kalman Filter has a wide range of applications in various fields:

 Navigation and Control Systems: It is extensively used in aerospace for trajectory


estimation of aircraft and spacecraft, GPS navigation, and robotics.
 Economics and Finance: In econometrics, the Kalman Filter is used for signal extraction in
time series analysis, such as separating a signal that evolves over time from "noise".
 Engineering: It is used for sensor fusion, where it combines data from various sensors to
compute the best estimate of the state of interest.
 Computer Vision: The Kalman Filter can track moving objects in video streams or predict
the position of a moving object.
Advantages and Limitations

The Kalman Filter is advantageous because it is a linear estimator that is optimal under the
assumption that the errors are Gaussian. It is computationally efficient, which allows it to run
in real-time applications, and it can handle cases where the noise statistics are not fully known.

However, the Kalman Filter has limitations. It assumes that the process and measurement
noise are both Gaussian and white, and that the system dynamics are linear. For systems that
do not meet these assumptions, extensions to the Kalman Filter, such as the Extended Kalman
Filter (EKF) and the Unscented Kalman Filter (UKF), have been developed to handle non-
linear systems.

Dynamic Bayesian Networks in Artificial Intelligence

1. Introduction

Artificial Intelligence (AI) has made significant strides by integrating probabilistic reasoning
into decision-making and inference systems. One of the most powerful tools in this domain is
the Bayesian Network. While static Bayesian Networks are effective for modeling
probabilistic relationships between variables at a single point in time, they fall short when
dealing with sequences or processes that evolve over time. This is where Dynamic Bayesian
Networks (DBNs) come into play.

Dynamic Bayesian Networks extend traditional Bayesian Networks by incorporating temporal


dynamics, allowing them to model systems that evolve over time. From speech recognition
and activity modeling to robotics and biological systems, DBNs provide a robust framework
for understanding complex, time-dependent phenomena.

This article explores the theoretical underpinnings, structure, learning, inference methods, and
applications of Dynamic Bayesian Networks in the field of AI.

2. Background: Bayesian Networks Recap

Before diving into DBNs, it's important to understand Bayesian Networks (BNs).

2.1 What is a Bayesian Network?

A Bayesian Network is a graphical model that represents the probabilistic relationships


among a set of variables using a directed acyclic graph (DAG). Each node in the graph
represents a random variable, and each edge signifies a conditional dependency. The joint
probability distribution over all variables can be factorized according to the graph structure.
3. Dynamic Bayesian Networks (DBNs)

3.1 Definition

A Dynamic Bayesian Network is an extension of a Bayesian Network designed to handle


sequences of data. It models a stochastic process by connecting a series of Bayesian
Networks over discrete time steps. Each slice of the DBN corresponds to the state of the
system at a specific time.

4. Structure of a DBN

4.1 Time Slices

Each time slice contains a subset of variables, usually representing observable and hidden
(latent) states.

 Intra-slice dependencies: Directed edges within the same time slice.


 Inter-slice dependencies: Directed edges between time slices, modeling temporal
relationships.

4.2 Two-Timeslice Bayesian Network (2TBN)

A 2-Timeslice Bayesian Network (2TBN) is a compact representation of a DBN. It defines:

 The structure and parameters of the network within a time slice.

5. Inference in Dynamic Bayesian Networks


Inference in DBNs refers to the process of computing probabilities for unknown variables,
given evidence. There are several types of inference:

5.4 Most Likely Explanation (MLE)

Determine the most probable sequence of states given the entire sequence of observations.

5.5 Inference Algorithms

Several algorithms can be used for inference:

 Exact methods: Forward-backward algorithm, Variable elimination.


 Approximate methods: Particle filtering, MCMC (Markov Chain Monte Carlo), Loopy
belief propagation.

6. Learning in DBNs

Learning a DBN involves estimating both the structure and parameters from data.

6.1 Parameter Learning

Assuming the structure is known, parameter learning estimates the conditional probabilities
using:

 Maximum Likelihood Estimation (MLE)


 Bayesian Estimation
 Expectation-Maximization (EM) (for hidden variables)

6.2 Structure Learning

Structure learning is more complex, especially when dealing with hidden variables or
incomplete data. It involves:
Score-based methods (e.g., Bayesian Information Criterion, Akaike Information Criterion)

Constraint-based methods (e.g., PC algorithm)

Search strategies (e.g., greedy search, hill climbing, genetic algorithms)

7. DBNs vs. Hidden Markov Models (HMMs)

A Hidden Markov Model is a special case of a DBN with:

 One hidden state variable.


 One observation variable.
 Simple Markov structure.

DBNs generalize HMMs by:

 Allowing multiple variables.


 Supporting complex dependencies.
 Representing both discrete and continuous states.

For example, HMMs are often used in speech recognition, but DBNs can model complex
multimodal interactions in video analysis or robotics.

8. Applications of Dynamic Bayesian Networks

DBNs have wide applicability in AI and related domains:

8.1 Speech Recognition

Models the temporal evolution of phonemes.

Can incorporate contextual features and multiple sensors.

8.2 Activity Recognition

Recognizes human actions using sensors (e.g., smart homes, surveillance).

Models temporal dependencies between body parts or motion features.

8.3 Robotics

Used for localization, path planning, and control.

Handles uncertainty in sensor measurements and dynamic environments.

8.4 Medical Diagnosis

Tracks disease progression over time.

Models interactions between symptoms, treatments, and latent health states.

8.5 Finance
Models stock prices, market trends, and customer behavior.

Captures dependencies between economic indicators.

8.6 Natural Language Processing

Models sequences like part-of-speech tagging and named entity recognition.

Can incorporate long-range dependencies better than HMMs.

Speech Recognition in Artificial Intelligence

The way people interact with digital gadgets and systems has changed dramatically in recent
years due to noteworthy developments in speech recognition technology. Speech recognition
is a crucial component of artificial intelligence (AI) that helps close the communication gap
between people and machines. Automation, accessibility features, virtual assistants,
transcription services, and other uses for machine understanding and interpretation of spoken
language are made possible by this technology. The intriguing field of voice recognition in
artificial intelligence, along with its services, difficulties, and prospects, will all be covered in
this article.

Developing Knowledge of Speech Recognition

Speech recognition technology, also known as Automatic Speech Recognition (ASR), makes
it possible for computers and artificial intelligence (AI) systems to translate spoken words
into text. There are several steps in this process:

1. Decoding: Based on the data obtained in the above processes, the last step includes
choosing the most probable translation for the spoken words.
2. Feature extraction: In this stage, the audio input is processed to extract characteristics
such as Mel-frequency cepstral coefficients (MFCCs), which give the system the
necessary information to recognize the sound.
3. Acoustic Analysis: The audio signal is captured by the system, which then dissects it into
its constituent elements, such as prosody and phonemes.
4. Language Modeling: To increase recognition accuracy, language models are used to
comprehend the semantics and grammatical structure of spoken words.
5. Acoustic Modeling: To link the retrieved characteristics with recognized phonetic
patterns and language context, the system applies statistical models.

What exactly is Speech Recognition in AI?

The technique of recognizing a human voice is known as speech recognition. To detect


speech, firms usually develop these programs and incorporate them into different hardware
devices. The software will react correctly when it hears your voice or gets your command.

Many companies use cutting-edge technology like artificial intelligence, machine learning,
and neural networks to develop voice recognition software. Technologies like Cortana, Alexa,
Siri and Google Assistant have altered how people use electronics and technology. They
include automobiles, cell phones, home security systems, and more.

Recall that speech and voice recognition are two different things. Speech recognition
translates spoken words into text by first identifying them in an audio recording of a speaker.
On the other hand, speech recognition can only identify pre-programmed spoken instructions.
The sole commonality between these two approaches is the conversion of sound to text.

How AI Handles Speech Recognition?

Automatic speech recognition (ASR), sometimes referred to as speech recognition in AI, is a


sophisticated method that allows robots to translate spoken language into text or other forms
that are comprehensible. Speech recognition technology consists of several steps and parts.
Here's a summary of how it functions:

1. Audio Input: A microphone is usually used to record the audio input, which starts the
process. Any spoken human speech, including commands and conversations, can be used
as this audio input.
2. Preprocessing: To enhance its quality and prepare it for analysis, the raw audio signal is
preprocessed. This might be signal amplification, noise reduction, or other methods to
improve the audio data.
3. Language Modeling: Language models are used to comprehend the semantics and
grammatical structure of spoken words. By assisting the system in understanding the
context and connections between words, these models increase the accuracy of word
recognition. When it comes to managing homophones?words that sound identically but
have distinct meanings-and the order of words and sentence structure changes, language
modelling is incredibly crucial.
4. Decoding: By integrating the data from the acoustic and linguistic models, the system
decodes the spoken words. It assesses several word combinations and determines which
transcription is more plausible based on statistical probability.
5. Output: The recognized language or a command that may be applied to several different
situations is the ultimate output. This output can be utilized for transcription, operating a
device, giving instructions to a virtual assistant, and other similar tasks.

Speech Recognition AI and Natural Language Processing

Recognition of Speech Machines can now comprehend and interpret human language thanks
to the closely connected sciences of artificial intelligence (AI) and natural language
processing (NLP). NLP covers various applications, such as language translation, sentiment
analysis, and text summarization, whereas voice recognition AI concentrates on translating
spoken words into digital text or commands.

Making it possible for robots to comprehend and interpret human language similarly to how
humans do is one of the main objectives of natural language processing (NLP). This entails
knowing the broader context and meaning of the words and recognizing them individually.
For instance, depending on the situation, "I saw a bat" might mean several things. Either the
animal or a piece of athletic gear might be the subject.

AI for speech recognition is a branch of natural language processing (NLP) specializing in


translating spoken utterances into digital text and commands. Speech recognition artificial
intelligence (AI) systems employ sophisticated algorithms to map speech patterns to phonetic
units, analyze and interpret speech patterns, and generate statistical models that represent
sounds to do this.

Among the methods employed by AI to recognize speech are:

 Deep Neural Networks (DNNs): Used widely in voice recognition artificial intelligence,
DNNs are a machine learning model. DNNs represent intricate links between the speech
input and the associated text output by employing a hierarchy of layers.
 Hidden Markov Models (HMMs): AI voice recognition uses Hidden Markov Models
(HMMs), which are statistical models. To match input speech to the most likely sound
sequence, HMMs first model the probability distribution of speech sounds.
 Convolutional Neural Networks (CNNs): Artificial Intelligence for speech recognition
has also made use of Convolutional Neural Networks (CNNs), a class of machine
learning model that is frequently employed in image recognition. To find pertinent
characteristics, CNNs process incoming speech signals by applying filters.
Among the most recent developments in AI voice recognition are:

 End-to-end models: These models are made to translate speech impulses directly into
text, eliminating the need for any intermediary stages. These models have demonstrated
the potential for raising voice recognition AI's precision and effectiveness.
 Multimodal models: These enable more intuitive and natural interactions between
machines and humans by fusing voice recognition Intelligence with other modalities,
including vision or touch.
 Transformer-based models: BERT and GPT are two examples of transformer-based
models that have shown great success in tasks related to natural language processing and
are now being used in artificial intelligence for voice recognition.
 Data augmentation: Increasing the data used for training for speech recognition AI
models will increase their accuracy and resilience. Data augmentation strategies include
introducing background noise and modifying the speaking tempo.

Difficulties with Speech Recognition

Even though voice recognition technology has advanced significantly, several issues still exist:

1. Accuracy: It still needs to be improved to recognize speech with great precision,


particularly in loud surroundings or when there are a variety of accents.
2. Privacy Concerns: As speech-recognizing technologies are incorporated into more
aspects of daily life, privacy issues about the gathering and using voice data have
surfaced.
3. Context Understanding: The field of interpreting spoken language's context and
intent is still developing. AI systems frequently have trouble understanding complex
or unclear instructions.
4. Speaker Variability: It might be challenging to distinguish speech from various
speakers and adjust to differing accents and speaking tenor.

Applications of AI for Speech Recognition

In many domains and uses, artificial intelligence is used as a commercial solution for speech
recognition. Voice-activated audio content assistants, call centres, ATMs, and more benefit
from AI's more natural user interactions with hardware and software and its increased
accuracy in data transcription.

1. Telecommunications: Speech recognition models offer more efficient call handling


and analysis. Better customer service frees agents to focus on what makes them most
valuable. Thanks to the availability of text messaging and voice transcription services,
customers can now contact companies in real-time, around-the-clock, which enhances
their entire experience and makes them feel more connected to the company.
2. Medical: Voice-activated Artificial Intelligence is becoming more prevalent in the
telecommunications industry. Speech recognition technology models provide more
efficient call handling and analysis. Better customer service frees agents to focus on
what makes them most valuable.
3. Banking: Dialogue Financial and banking organizations utilize AI apps to help
customers with their business questions. You may ask a bank, for example, for
information on your savings account's current interest rate or account balance.
Because they no longer need to perform in-depth research or access cloud data,
customer service representatives can reply to requests more rapidly and offer more
outstanding assistance.
4. Automotive Voice Commands: Hands-free voice control of amenities like climate
control, entertainment systems, and navigation is a common feature of modern
vehicles.

Decisions Making

What is AI decision making?


Imagine a computer program that can analyze massive amounts of data and make better
choices. That’s the power of AI decision-making. Artificial intelligence systems analyze
information, like text, images, or even sensor readings. These algorithms can range from
simple rules to complex neural networks that guide AI in processing the data and forming
conclusions.

Machine learning takes AI decision-making a step further. By learning from past experiences
(data and outcomes), AI systems can continuously improve their decision-making abilities.
This AI-powered automation helps businesses make faster, more accurate choices in various
fields, from retail and finance to telecom & media.

Compare this to traditional human and computer processes. These require complete data,
formatted a certain way, and carefully aggregated. Traditional data analysis relies heavily on
human expertise and manual processes. Analysts must collect data, clean it, and then use
statistical methods to draw conclusions.
It’s very hard for people to make quick decisions when faced with varying opinions from
different sources, or when they have a personal stake in the decision. People are also creatures
of habit and don’t always learn from past mistakes.

AI can easily manage messy and contradictory input. It can process more data than a person
could possibly take in and easily identify the signals in the noise. With machine learning,
every decision’s outcome trains the system to make better decisions in the future.

The importance of AI for decision-making

AI’s integration into decision-making processes is transforming industries by enabling more


informed, efficient, and effective decisions. Its ability to quickly and accurately analyze vast
amounts of data means it’s ideally suited for decision-making in the 21st century.

Are you curious about how artificial intelligence helps in decision-making? Here are seven
ways:

1. Speed decision making

Today, business moves fast, and the ability to make quick decisions is crucial. AI systems can
process data and generate insights in real time, enabling organizations to respond swiftly to
changing market conditions and customer needs.

By automating data analysis and decision-making processes, AI eliminates the time-


consuming tasks of manual data gathering and interpretation. This allows decision-makers to
focus on strategic initiatives while AI handles the heavy lifting, ultimately accelerating the
decision-making process and providing a competitive edge.

2. Supercharge productivity

Let’s face it, even the most dedicated employees can only work so many hours in a day.
That’s where AI comes in. It’s like having a tireless assistant working around the clock to
process data and provide insights. Need real-time analysis or rapid solutions? AI has got your
back.

By leveraging AI’s ability to work 24/7, people can supercharge their productivity and free up
time for strategic thinking and decision-making. Of course, AI is no substitute for human
judgment – it’s a tool that enhances our capabilities. Think of it as a productivity booster that
helps you work smarter, not harder.

3. Improve accuracy

AI algorithms excel at processing and analyzing vast amounts of structured and unstructured
data. By identifying complex patterns, correlations, and anomalies that humans might
overlook, AI can provide more accurate insights and predictions.

This enhanced accuracy enables organizations to make better-informed decisions, reducing


the risk of errors and ensuring optimal outcomes. AI’s ability to consider multiple variables
simultaneously and learn from past experiences further contributes to its superior accuracy in
decision-making processes.
4. Reduce risk

AI plays a crucial role in identifying and mitigating potential risks and threats. By analyzing
vast amounts of historical data, AI algorithms can detect patterns and anomalies that indicate
potential risks, such as fraudulent activities, market fluctuations, or supply chain disruptions.

This early detection allows organizations to proactively mitigate risks and avoid costly
mistakes. AI can also run countless scenario simulations and predict potential outcomes,
enabling decision-makers to assess the impact of different strategies and make informed
choices that minimize risk exposure.

5. Increase efficiency

AI streamlines decision-making processes by eliminating bottlenecks and optimizing


workflows. By automating data collection, analysis, and reporting, AI enables decision-
makers to access relevant information quickly and easily, eliminating the need for manual
data gathering and allowing teams to focus on higher-value tasks.

AI can also identify inefficiencies in existing processes and suggest improvements, leading to
increased productivity and operational efficiency. Furthermore, AI’s ability to process data
24/7 ensures that decision-making processes continue uninterrupted, even outside regular
business hours.

6. Create consistency

Picture a world where every decision, from the mundane to the monumental, adheres to a
meticulously standardized playbook. By leveraging machine learning algorithms and
predefined rules, AI promises to ensure that decisions are made consistently across the board,
eliminating the fluctuations that can plague human judgment.

Whether approving loans, managing supply chains, or executing repetitive tasks, AI acts as
the great equalizer, applying the same criteria and logic every single time. It’s an unwavering
consistency that streamlines processes and promotes fairness and impartiality. With AI at the
helm, organizations can trust that decisions are made objectively, based on data and
established best practices, rather than individual biases or whims.

7. Develop infinite institutional memory


While human employees come and go, AI is an eternal guardian of institutional knowledge.
Like a digital sponge, it soaks up every lesson, every insight, and every decision made within
the company. It tirelessly analyzes past successes and failures, identifying patterns and best
practices that can guide future decision-making. With its limitless capacity for recollection,
AI ensures that collective experience is never lost. AI is always ready to provide context and
insights based on the company’s history.

By leveraging AI’s infinite institutional memory, organizations can make smarter, more
informed decisions that build upon past success while avoiding the pitfalls of yesteryear. AI
becomes the keeper of corporate wisdom, ensuring that valuable knowledge is preserved and
applied to drive the business forward.

Forms of learning

Machine learning algorithms fall into five broad categories: supervised learning, unsupervised
learning, semi-supervised learning, self-supervised and reinforcement learning.

1. Supervised machine learning

Supervised machine learning is a type of machine learning where the model is trained on a
labeled dataset (i.e., the target or outcome variable is known). For instance, if data scientists
were building a model for tornado forecasting, the input variables might include date, location,
temperature, wind flow patterns and more, and the output would be the actual tornado activity
recorded for those days.

Supervised learning is commonly used for risk assessment, image recognition, predictive
analytics and fraud detection, and comprises several types of algorithms.

 Regression algorithms—predict output values by identifying linear relationships


between real or continuous values (e.g., temperature, salary). Regression algorithms
include linear regression, random forest and gradient boosting, as well as other
subtypes.
 Classification algorithms—predict categorical output variables (e.g., “junk” or “not
junk”) by labeling pieces of input data. Classification algorithms include logistic
regression, k-nearest neighbors and support vector machines (SVMs), among others.
 Naïve Bayes classifiers—enable classification tasks for large datasets. They’re also
part of a family of generative learning algorithms that model the input distribution of
a given class or/category. Naïve Bayes algorithms include decision trees, which can
actually accommodate both regression and classification algorithms.
 Neural networks—simulate the way the human brain works, with a huge number of
linked processing nodes that can facilitate processes like natural language translation,
image recognition, speech recognition and image creation.
 Random forest algorithms—predict a value or category by combining the results
from a number of decision trees.
2. Unsupervised machine learning
Unsupervised learning algorithms—like Apriori, Gaussian Mixture Models (GMMs) and
principal component analysis (PCA)—draw inferences from unlabeled datasets, facilitating
exploratory data analysis and enabling pattern recognition and predictive modeling.

The most common unsupervised learning method is cluster analysis, which uses clustering
algorithms to categorize data points according to value similarity (as in customer
segmentation or anomaly detection). Association algorithms allow data scientists to identify
associations between data objects inside large databases, facilitating data visualization and
dimensionality reduction.

 K-means clustering—assigns data points into K groups, where the data points
closest to a given centroid are clustered under the same category and K represents
clusters based on their size and level of granularity. K-means clustering is commonly
used for market segmentation, document clustering, image segmentation and image
compression.
 Hierarchical clustering—describes a set of clustering techniques, including
agglomerative clustering—where data points are initially isolated into groups and
then merged iteratively based on similarity until one cluster remains—and divisive
clustering—where a single data cluster is divided based on the differences between
data points.
 Probabilistic clustering—helps solve density estimation or “soft” clustering
problems by grouping data points based on the likelihood that they belong to a
particular distribution.

Unsupervised ML models are often behind the “customers who bought this also bought…”
types of recommendation systems.

3. Self-supervised machine learning

Self-supervised learning (SSL) enables models to train themselves on unlabeled data, instead
of requiring massive annotated and/or labeled datasets. SSL algorithms, also called predictive
or pretext learning algorithms, learn one part of the input from another part, automatically
generating labels and transforming unsupervised problems into supervised ones. These
algorithms are especially useful for jobs like computer vision and NLP, where the volume of
labeled training data needed to train models can be exceptionally large (sometimes
prohibitively so).

4. Reinforcement learning

Reinforcement learning, also called reinforcement learning from human feedback (RLHF), is
a type of dynamic programming that trains algorithms using a system of reward and
punishment. To deploy reinforcement learning, an agent takes actions in a specific
environment to reach a predetermined goal. The agent is rewarded or penalized for its actions
based on an established metric (typically points), encouraging the agent to continue good
practices and discard bad ones. With repetition, the agent learns the best strategies.

Reinforcement learning algorithms are common in video game development and are
frequently used to teach robots how to replicate human tasks.

5. Semi-supervised learning

The fifth type of machine learning technique offers a combination between supervised and
unsupervised learning.

Semi-supervised learning algorithms are trained on a small labeled dataset and a large
unlabeled dataset, with the labeled data guiding the learning process for the larger body of
unlabeled data. A semi-supervised learning model might use unsupervised learning to identify
data clusters and then use supervised learning to label the clusters.

Generative adversarial networks (GANs)—deep learning tool that generates unlabeled data by
training two neural networks—are an example of semi-supervised machine learning.

Regardless of type, ML models can glean data insights from enterprise data, but their
vulnerability to human/data bias make responsible AI practices an organizational imperative.

Knowledge in learning

What Is Knowledge in AI?

In AI, knowledge refers to the information an agent/system has about the world, which can
include:

Facts (e.g., Paris is the capital of France)

Rules (e.g., If it rains, the ground gets wet)

Patterns (learned from data, like customer preferences)

Models of the environment (e.g., a map for a robot)

Procedures (how to perform a task, like sorting)

How AI Acquires Knowledge — The Learning Part

1. Learning from Data (Machine Learning)

AI learns patterns, relationships, and decision rules from datasets.


Example: A recommendation system learns what you like based on your watch history.

Type of knowledge gained: Statistical patterns, associations.

2. Knowledge-Based Learning (Symbolic AI)

Involves learning and reasoning using logical or semantic knowledge.

Example: An AI in a medical system learns new diagnostic rules by analyzing expert-written


guidelines.

Type of knowledge gained: Human-understandable rules.

3. Reinforcement Learning

Knowledge is gained through trial and error by interacting with the environment.

Example: A robot learns how to navigate a maze by bumping into walls and getting rewards.

Type of knowledge gained: Policies (what actions to take in different situations), value
functions.

4. Transfer Learning

An AI system uses knowledge from one domain to learn faster in a related domain.

Example: An AI trained to recognize dogs can quickly adapt to recognize wolves.

Type of knowledge transferred: Feature representations.

Types of Knowledge Representations in AI

Representation Description Example


"If it's cloudy and cold, bring a
Logical/Rule-based Uses formal logic (e.g., if-then rules)
coat"
Nodes and relationships (like a
Semantic Networks Paris → isCapitalOf → France
knowledge graph)
A "car" has slots like "engine,"
Frames/Schemas Structured templates with slots
"wheels"
Neural Networks Implicit knowledge stored in weights Deep learning models
Probabilistic Bayes’ rule for medical
Knowledge with uncertainty
Models diagnoses

Why Knowledge Matters in AI Learning

Gives context to raw data.

Helps in generalization (applying what’s learned to new cases).

Enables explanation and reasoning, especially in symbolic AI.


Makes learning more efficient (less data needed when knowledge is built-in or transferred).

What is Statistical Learning?

Statistical learning refers to a framework where statistics and machine learning overlap. It
involves using algorithms that apply statistical theory to:

 Build predictive models.


 Estimate relationships between variables.
 Handle uncertainty in data.

Statistical learning methods are typically used for supervised or unsupervised learning tasks
and provide the foundation for many machine learning algorithms.

Types of Statistical Learning Methods

1. Linear Models

Linear models are some of the simplest and most widely used statistical learning methods.
They assume that the relationship between input variables (features) and the target (output) is
linear.

Pros:

 Simple to understand and interpret.


 Fast to train and predict.
 Computationally efficient.

Cons:

 Assumes a linear relationship, which is limiting in some real-world scenarios.

2. Bayesian Methods

Bayesian methods apply Bayes' Theorem to infer probabilities and update beliefs
based on new data.

Example Models:

 Naive Bayes: A probabilistic classifier based on Bayes' theorem with the


assumption that features are independent.
 Gaussian Naive Bayes: Assumes that the features follow a normal distribution
within each class.

Pros:

 Handles uncertainty and missing data well.


 Can update beliefs with new evidence (online learning).
 Works well with small datasets.

Cons:

 The "naive" assumption of feature independence is often unrealistic.


 Can struggle with correlated data.

3. Support Vector Machines (SVM)

SVM is a supervised learning method used for classification and regression. It aims to find
the hyperplane that best separates different classes in the feature space, maximizing the
margin between them.

Example:

For binary classification, the algorithm finds a hyperplane that separates data into two classes
with the largest margin.

Uses the kernel trick to handle non-linear boundaries by transforming the feature space.

Pros:

Can handle high-dimensional data (e.g., text, images).

Effective in cases where the classes are not linearly separable.

Cons:

Computationally expensive, especially with large datasets.

Choosing the right kernel can be tricky.

4. Decision Trees

Decision trees split the data into smaller subsets based on the most significant feature at each
step. They are particularly useful for classification and regression tasks.

Example Models:
CART (Classification and Regression Trees): Builds binary trees based on Gini impurity or
mean squared error (MSE) to split nodes.

ID3 (Iterative Dichotomiser

3): Uses information gain to split nodes in classification tasks.

Pros:

Easy to interpret and visualize.

Can handle both numerical and categorical data.

Non-linear model (can capture complex patterns).

Cons:

Prone to overfitting, especially with deep trees.

Can be unstable (small changes in data may cause large changes in the tree).

5. K-Nearest Neighbors (KNN)

KNN is a non-parametric method that classifies a data point based on the majority class of
its neighbors.

How it works: For a new data point, KNN finds the K nearest neighbors (based on distance
metrics like Euclidean) and assigns the most common class among those neighbors.

Pros:

Simple and intuitive.

Can capture complex decision boundaries.

No training phase (lazy learning).

Cons:

Computationally expensive at prediction time (requires calculating distances to all points).

Performance degrades with high-dimensional data (curse of dimensionality).

6. Ensemble Methods

Ensemble methods combine multiple models to improve performance and reduce overfitting.

Example Models:

Random Forests: An ensemble of decision trees that reduce overfitting by averaging or


voting.
Boosting (e.g., AdaBoost, Gradient Boosting): Combines weak learners in a sequential
manner to correct errors from previous models.

Pros:

Often yields better performance than individual models.

Can reduce overfitting and bias.

Works well with many types of data.

Cons:

More computationally expensive.

Harder to interpret compared to individual models.

Statistical Learning in Practice

Statistical learning methods are foundational in many AI applications:

Recommendation systems (e.g., Netflix or Amazon's product suggestions).

Speech recognition (e.g., converting speech to text).

Medical diagnoses (predicting disease based on patient data).

Financial forecasting (predicting stock prices or market trends).

Image classification (e.g., identifying objects in images).

What is Reinforcement Learning?

 Reinforcement Learning is a feedback-based Machine learning technique in which an


agent learns to behave in an environment by performing the actions and seeing the results
of actions. For each good action, the agent gets positive feedback, and for each bad
action, the agent gets negative feedback or penalty.
 In Reinforcement Learning, the agent learns automatically using feedbacks without any
labeled data, unlike supervised learning.
 Since there is no labeled data, so the agent is bound to learn by its experience only.
 RL solves a specific type of problem where decision making is sequential, and the goal is
long-term, such as game-playing, robotics, etc.
 The agent interacts with the environment and explores it by itself. The primary goal of an
agent in reinforcement learning is to improve the performance by getting the maximum
positive rewards.
 The agent learns with the process of hit and trial, and based on the experience, it learns to
perform the task in a better way. Hence, we can say that "Reinforcement learning is a
type of machine learning method where an intelligent agent (computer program)
interacts with the environment and learns to act within that." How a Robotic dog
learns the movement of his arms is an example of Reinforcement learning.
 It is a core part of Artificial intelligence, and all AI agent works on the concept of
reinforcement learning. Here we do not need to pre-program the agent, as it learns from
its own experience without any human intervention.
 Example: Suppose there is an AI agent present within a maze environment, and his goal
is to find the diamond. The agent interacts with the environment by performing some
actions, and based on those actions, the state of the agent gets changed, and it also
receives a reward or penalty as feedback.
 The agent continues doing these three things (take action, change state/remain in the
same state, and get feedback), and by doing these actions, he learns and explores the
environment.
 The agent learns that what actions lead to positive feedback or rewards and what actions
lead to negative feedback penalty. As a positive reward, the agent gets a positive point,
and as a penalty, it gets a negative point.

Terms used in Reinforcement Learning

 Agent(): An entity that can perceive/explore the environment and act upon it.
 Environment(): A situation in which an agent is present or surrounded by. In RL, we
assume the stochastic environment, which means it is random in nature.
 Action(): Actions are the moves taken by an agent within the environment.
 State(): State is a situation returned by the environment after each action taken by the
agent.
 Reward(): A feedback returned to the agent from the environment to evaluate the action
of the agent.
 Policy(): Policy is a strategy applied by the agent for the next action based on the current
state.
 Value(): It is expected long-term retuned with the discount factor and opposite to the
short-term reward.
 Q-value(): It is mostly similar to the value, but it takes one additional parameter as a
current action (a).

Probabilistic Language Processing

Probabilistic Language Models


Goal -- define probability distribution over set of strings
 Unigram, bigram, n-gram
 Count using corpus but need smoothing:
1. add-one
2. Linear interpolation

 Evaluate with Perplexity measure


 E.g. segmentwordswithoutspaces w/ Viterbi

PCFGs

 Rewrite rules have probabilities.


 Prob of a string is sum of probs of its parse trees.
 Context-freedom means no lexical constraints.
 Prefers short sentences.

Learning PCFGs

 Parsed corpus -- count trees.


 Unparsed corpus
 Rule structure known -- use EM (inside-outside algorithm)
 Rules unknown -- Chomsky normal form… problems.

Information Retrieval

 Goal: Google. Find docs relevant to user’s needs.


 IR system has doc. Collection, query in some language, set of results, and a
presentation of results.
 Ideally, parse docs into knowledge base… too hard.

IR 2

 Boolean Keyword Model -- in or out?


 Problem -- single bit of “relevance”
 Boolean combinations a bit mysterious
 How compute P(R=true | D,Q)?
 Estimate language model for each doc, computes prob of query given the model.
 Can rank documents by P(r|D,Q)/P(~r|D,Q)

IR3

 For this, need model of how queries are related to docs. Bag of words: freq of
words in doc., naïve Bayes.
 Good example pp 842-843.

Evaluating IR

 Precision is proportion of results that are relevant.


 Recall is proportion of relevant docs that are in results
 ROC curve (there are several varieties): standard is to plot false negatives vs.
false positives.
 More “practical” for web: reciprocal rank of first relevant result, or just “time to
answer”
IR Refinements

 Case
 Stems
 Synonyms
 Spelling correction
 Metadata --keywords

IR Presentation

 Give list in order of relevance, deal with duplicates


 Cluster results into classes

Agglomerative

K-means

 How describe automatically-generated clusters? Word list? Title of centroid doc?

IR Implementation

 CSC172!
 Lexicon with “stop list”,
 “inverted” index: where words occur
 Match with vectors: vectorof freq of words dotted with query terms.

Perception in AI is the ability of an artificial system to perceive and interpret the


world around it, typically using sensory data. Perception is a critical aspect of many
AI applications, including autonomous systems (like self-driving cars and robots),
virtual assistants, and healthcare technologies.

Perception allows AI systems to understand objects, events, and environments,


enabling them to act intelligently based on that understanding. It’s often considered
the first step in the decision-making process, where AI gathers raw data from the
environment and translates it into useful information.

Let’s break down perception in AI, including the technologies used and real-world
applications:

Key Aspects of Perception in AI

Computer Vision (Visual Perception)

Computer Vision allows AI to understand images or videos, simulating human vision. The
goal is to extract useful information from visual data like images or videos.

Key Techniques in Computer Vision:


Object Detection: Identifying and locating objects within an image (e.g., detecting
pedestrians in a self-driving car’s camera feed).

Image Classification: Categorizing images into predefined categories (e.g., classifying


whether an image is of a cat or a dog).

Semantic Segmentation: Dividing an image into regions with distinct meanings (e.g.,
labeling pixels as part of the road, pedestrians, or vehicles in an image).

Face Recognition: Identifying people based on facial features.

Optical Flow: Analyzing the motion of objects between consecutive frames in a video to
estimate their movement.

Applications:

Self-driving cars use computer vision to detect road signs, pedestrians, other vehicles, and
obstacles.

Facial recognition systems for security and access control.

Medical imaging where AI analyzes X-rays, MRIs, or CT scans to identify diseases or


abnormalities.

Audio Perception (Speech and Sound)

AI can perceive audio signals through speech recognition, sound classification, and audio
processing.

Key Techniques in Audio Perception:

Speech Recognition: Converts spoken language into text, allowing AI systems to understand
verbal commands.

Sound Classification: Identifies specific sounds in an environment (e.g., detecting a doorbell


ring or a siren).

Speech-to-Text: Transcribes spoken language into written text.

Speech Emotion Recognition: Detects emotions in speech, like identifying if someone is


happy, sad, or angry based on voice tone.

Applications:

Virtual assistants (like Siri or Alexa) use speech recognition to understand and respond to
voice commands.

Hearing aids that process sound to enhance the hearing experience.

Call center systems use speech emotion recognition to detect the mood of customers.

Haptic Perception (Touch and Force)


Haptic feedback is used in some AI systems to perceive physical touch or force through
sensors.

Key Techniques in Haptic Perception:

Force Sensing: AI uses sensors to detect the pressure or force applied by or on an object.

Tactile Feedback: AI can simulate the sense of touch, allowing robots or systems to feel their
environment.

Applications:Robotic surgery: Surgeons control robotic arms, and the system provides
haptic feedback, mimicking the sense of touch.

Virtual reality (VR) and gaming: Haptic gloves and controllers provide tactile feedback for
more immersive experiences.

Sensor Fusion

Sensor fusion refers to combining data from multiple sensors (e.g., cameras, LiDAR, radar,
microphones) to create a more complete and accurate perception of the environment.

It enables AI systems to overcome the limitations of individual sensors, such as poor visibility
or low resolution, by integrating data from different sources.

Example:

Autonomous vehicles combine data from LiDAR (light detection and ranging), radar, and
cameras to create a 360-degree understanding of their environment. Each sensor has
strengths and weaknesses, so fusing data from all of them allows for more accurate perception.

Applications:

Self-driving cars use sensor fusion to combine data from LiDAR, radar, and cameras for
accurate perception and decision-making.

Drones use multiple sensors (camera, GPS, IMU) to navigate and map environments.

Environmental Sensing (Physical and Contextual Perception)

In addition to visual, auditory, and tactile data, some AI systems perceive environmental
factors like temperature, humidity, and air quality.

This type of perception can also be used for context awareness (understanding the
environment's current state) to adjust behavior.

Key Techniques:

Contextual Awareness: Analyzing data from various sensors and understanding the broader
context of the environment (e.g., a robot might adjust its behavior when it senses that the floor
is wet).

Environmental Monitoring: Using AI for monitoring things like air pollution, temperature
changes, or natural disasters.
Applications:

Smart homes use sensors to monitor air quality, temperature, and humidity, adjusting
conditions based on occupant behavior and preferences.

Environmental monitoring systems use AI to predict and analyze pollution levels, climate
change, and natural disaster events.

Perception in Robotics

Perception is one of the key components in robotics, enabling robots to sense their
environment and take action accordingly.

Types of Perception in Robotics:

Visual Perception: Robots with cameras or vision systems can "see" their surroundings,
similar to how humans use their eyes.

Example: A robot arm uses a camera to identify and pick up objects from a table.

Auditory Perception: Robots can use microphones and speech recognition to "hear" sounds
and respond appropriately.

Example: A robot uses audio sensors to recognize a person’s voice command and perform
tasks like opening a door.

Tactile Perception: Robots with touch sensors can detect pressure, temperature, or texture,
and adjust their actions accordingly.

Example: A robot uses tactile sensors to feel the texture of an object before determining how
to handle it.

Multi-sensory Perception: Combining multiple sensors (visual, auditory, tactile) to create a


more nuanced and comprehensive understanding of the environment.

Example: A robot in a warehouse uses visual, tactile, and proximity sensors to navigate, avoid
obstacles, and pick items.

Perception in Autonomous Vehicles

Perception is the cornerstone of self-driving technology. Autonomous vehicles must


accurately understand their surroundings to safely navigate roads, avoid obstacles, and obey
traffic laws.

Key perception technologies for autonomous vehicles:

Computer Vision: Detects pedestrians, road signs, traffic lights, and other vehicles.

LiDAR: Measures distances to objects and creates a 3D map of the environment.


Radar: Helps detect objects in low visibility conditions, like fog or rain.

Ultrasonic Sensors: Used for close-range detection, such as parking.

Autonomous vehicles integrate all this sensor data to understand their environment in real-
time, make decisions, and navigate autonomously.

Future of Perception in AI

More Robust Sensory Fusion: As more sensors (e.g., 5G, advanced radar) become available,
AI systems will better integrate data to create richer, more accurate perceptions.

Improved Multimodal Perception: Combining multiple forms of sensory data (e.g., visual,
auditory, and tactile) for more comprehensive understanding.

Greater Contextual Awareness: AI systems will increasingly be able to perceive and react
to complex, changing environments with better context awareness (e.g., adapting to weather
changes or human behavior).

You might also like