Unit 5
Unit 5
APPLICATIONS
Applications of AI
Artificial intelligence is used in a variety of ways in today's society. It is
becoming increasingly important in today's world because it can efficiently
handle complicated problems in a variety of areas, including healthcare,
entertainment, banking, and education. Our daily lives are becoming more
comfortable and efficient as a result of artificial intelligence.
The following are some of the areas where Artificial Intelligence is used:
1. AI (Astronomy)
Artificial Intelligence (AI) can be extremely helpful in resolving complicated
challenges in the universe. AI technology can assist in gaining a better
understanding of the cosmos, including how it operates, its origin, and so on.
2. AI (Healthcare)
In the previous five to ten years, AI has become more beneficial to the
healthcare business and is expected to have a big impact.
AI is being used in the healthcare industry to make better and faster diagnoses
than humans. AI can assist doctors with diagnosis and can alert doctors when a
patient's condition is deteriorating so that medical assistance can be provided
before the patient is admitted to the hospital.
3. AI (Gaming)
AI can be employed in video games. AI machines can play strategic games
like chess, in which the system must consider a vast number of different
options.
4. AI (Finance)
The banking and AI businesses are the ideal complements to each other.
Automation, chatbots, adaptive intelligence, algorithm trading, and machine
learning are all being used in financial activities.
5. AI (Data Security)
Data security is critical for every business, and cyber-attacks are on the rise in
the digital age. AI can help you keep your data safe and secure. Some
examples are the AEG bot and the AI2 Platform, which are used to better
determine software bugs and cyber-attacks.
6. AI (Social Media)
Facebook, Twitter, and Snapchat, for example, have billions of user accounts
that must be kept and handled in a very efficient manner. AI has the ability to
organise and manage large volumes of data. AI can go through a large amount
of data to find the most recent trends, hashtags, and user requirements.
7. AI (Travel & Transport)
For the travel industry, AI is becoming increasingly important. AI is capable
of doing a variety of travel-related tasks, including making travel
arrangements and recommending hotels, flights, and the best routes to
customers. The travel industry is utilising AI-powered chatbots that can
engage with clients in a human-like manner to provide better and faster
service.
8. AI (Automotive Industry)
Some automotive companies are utilising artificial intelligence to provide a
virtual assistant to their users in order to improve performance. Tesla, for
example, has released TeslaBot, an intelligent virtual assistant.
Various industries are presently working on self-driving automobiles that will
make your ride safer and more secure.
9. AI (Robotics)
In Robotics, Artificial Intelligence plays a significant role. Typically,
conventional robots are programmed to execute a repetitive task; but, using
AI, we may construct intelligent robots that can perform tasks based on their
own experiences rather than being pre-programmed.
Humanoid Robots are the best instances of AI in robotics; recently, the
intelligent Humanoid Robots Erica and Sophia were built, and they can
converse and behave like people.
10. AI (Entertainment)
We already use AI-based applications in our daily lives with entertainment
providers like Netflix and Amazon. These services display software or show
recommendations using machine learning/artificial intelligence (ML/AI)
algorithms.
11. AI (Agriculture)
Agriculture is a field that necessitates a variety of resources, including effort,
money, and time, in order to get the greatest results. Agriculture is becoming
more computerised these days, and AI is becoming more prevalent in this
industry. AI is being used in agriculture in the form of agriculture robotics,
solid and crop monitoring, and predictive analysis. AI in agriculture has the
potential to be extremely beneficial to farmers.
12. AI (E-commerce)
AI is giving the e-commerce industry a competitive advantage, and it is
becoming increasingly demanded in the market. Shoppers can use AI to find
related products in their preferred size, colour, or brand.
13. AI (Education)
Grading can be automated with AI, giving the instructor more time to educate.
As a teaching assistant, an AI chatbot can communicate with students.
In the future, AI could serve as a personal virtual tutor for pupils, available at
any time and from any location.
Machine Learning
"Machine learning" is defined by Simon. "Learning signifies adaptive
modifications in the system that enable the system to perform the same task or
tasks selected from the same population more successfully the next time".
LANGUAGE MODELS
Language can be defined as a set of strings; “print(2+2)” is a legal program in
the language Python, where “2) + (2 print” is not. Since the are an infinite
number of legal programs, they cannot be enumerated; instead they are
specified by a set of rules called a grammar. Formal languages also have rules
that defined the meaning semantics of a program; for example, the rules say
that the “meaning” of “2 + 2” is 4, and the meaning of “1/0” is that an error is
signated.
1. Natural languages, such as English or Spanish, cannot be described as a set
of predetermined sentences. For example, while everyone agrees that "not
being invited is sad" is an English sentence, opinions differ on the
linguistically correctness of "to be not invited is stated." As a result, rather of
defining a natural language model as a definitive collection, it is more fruitful
to characterise it as a probability distribution over sentences. Instead of asking
whether a string of words is a member of the set defining the language, we
question P(S = word) - what is the chance that a random sentence would
contain words. Natural languages are unclear as well. "He saw her duck" can
refer to either a waterfowl belonging to her or a movement she made to avoid
anything. As a result, rather than a single meaning for a sentence, we must
speak of a probability distribution across all alternative interpretations.
2. Finally, natural language is challenging to deal with due to its huge size and
rapid change. As a result, our language models are only a rough
approximation. We begin with the simplest possible approximation and work
our way up.
Let’s begin with the task of computing P(w|H) — probability of word ‘w’,
given some history ‘H’.
Suppose the ‘H’ is ‘its water is so transparent that’, and we want to know the
probability of next word ‘the’: P(the|its water is so transparent that).
One way to estimate this probability — relative frequency counts. Take a large
corpus, count the number of time ‘its water is so transparent that’ and also
count the number of times it has been followed by ‘the’.
While this method of estimating probabilities straight from counts works well
in many circumstances, it turns out that the web isn't large enough to provide us
with accurate predictions in the vast majority of cases. Why? Because language
is dynamic, and new sentences are introduced on a daily basis that we will
never be able to count.
As a result, we need to incorporate more sophisticated methods for calculating
the likelihood of word w given history H.
To represent the probability of a particular random variable Xi taking on the
value “the”, or P(Xi = “the”), we will use the simplification P(the). We’ll
represent a sequence of N words either as w1 . . . wn or wn (so the
expression wn−1 means the string w1,w2,…,wn−1). For the joint probability of
each word in a sequence having a particular value P(X = w1,Y = w2,Z = w3,
…,W = wn) we’ll use P(w1,w2,…,wn).
How to compute probability of entire sequence? — Using chain rule of
probability
Using Chain rule of probability to calculate joint probability distribution
Bigram Model
What method do we use to calculate bi-gram (or n-gram) probabilities? —
Maximum likelihood estimation, or MLE, is a simple method for estimating
probabilities. By taking counts from a corpus and normalising them so that they
fall between 0 and 1, we may acquire the MLE estimate for the parameters of
an n-gram model.
To compute a specific bigram probability of a word y given a prior word x, for
example, we'll count the bigram C(xy) and normalise by the sum of all the
bigrams that share the same first word x:
Discounting factor
Add-k smoothing
One alternative to add-one smoothing is to move a bit less of the probability
mass from the seen to the unseen events. Instead of adding 1 to each count, we
add a frac- tional count k (.5? .05? .01?). This algorithm is therefore called add-
k smoothing.
Add-k Smoothing Algorithm
Add-k smoothing requires that we have a method for choosing k; this can be
done, for example, by optimizing on a devset. Although add-k is useful for
some tasks (including text classification), it turns out that it still doesn’t work
well for language modeling.
Backoff and Interpolation
If we are trying to compute P(wn|wn−2,wn−1) but we have no examples of a
particular trigram wn−2,wn−1,wn. We can instead estimate its probability by
using the bigram probability P(wn|wn−1). Similarly, if we don’t have counts to
compute P(wn|wn−1), we can look to the unigram P(wn).
Sometimes using less context is a good thing, helping to general- ize more for
contexts that the model hasn’t learned much about.
There are two ways to use this n-gram “hierarchy”.
i. If the evidence is sufficient, we use the trigram; otherwise, we use the
bigram; otherwise, we use the unigram.
We always blend the probability estimates from all the n-gram estimators in
interpolation, weighing and mixing the trigram, bigram, and unigram counts.
We merge different order n-grams by linearly interpolating all the models in
simple linear interpolation. As a result, we estimate the trigram likelihood by
combining the probabilities of the unigram, bigram, and trigram.
INFORMATION RETRIEVAL
The task of retrieving materials that are relevant to a user's desire for
information is known as information retrieval. Search engines on the World
Wide Web are the most well-known instances of information retrieval
systems. When a Web user types (AI book) into a search engine, a list of
relevant pages appears. We'll look at how such systems are put together in this
part. A system for retrieving information (henceforth referred to as IR) can be
defined as follows:
1. A corpus of documents. Each system must decide what it wants to treat as a
document: a paragraph, a page, or a multipage text.
2. Queries posed in a query language. A query is a statement that expresses
what the user wants to know. The query language can be just a list of terms,
like [AI book]; or it can define a phrase of words that must be adjacent, like
["AI book"]; it can include Boolean operators, like [AI AND book]; or it can
include non-Boolean operators, like [AI NEAR book] or [AI book
site:www.aaai.org].
3. A result set: This is the subset of documents deemed relevant to the query
by the IR system. By relevant, we mean material that is likely to be useful to
the individual who asked the question for the specific information requirement
specified in the inquiry.
4. A presentation of the result set: This can be as simple as a ranked list of
document titles or as complicated as a rotating colour map of the result set
projected into a three-dimensional space and displayed in two dimensions. A
Boolean keyword model was used in the first IR systems. Each word in the
document collection is handled as a Boolean feature, which is true if the term
appears in the document and false otherwise.
Advantage
It's easy to explain and put into practise.
Disadvantages
There is no direction on how to organise the relevant materials for
presentation because the degree of relevance of a document is a single
bit.
Users who are not programmers or logicians are unfamiliar with
Boolean expressions. Users find it inconvenient that in order to learn
about farming in Kansas and Nebraska, they must use the query
[farming (Kansas OR Nebraska)].
Even for a seasoned user, formulating a good query might be difficult.
Let's say we try [information AND retrieval AND models AND
optimization] and get nothing. We could try [information OR retrieval
OR models OR optimization], but if it yields too many outcomes, it's
hard to determine where to go next.
IR SCORING FUNCTIONS
1. Most IR systems have abandoned the Boolean paradigm in favour of
models based on word count data.
2. A scoring function takes a document and a query and produces a numerical
score; the papers with the highest scores are the most relevant.
3. The score in the BM25 scoring function is a linear weighted sum of the
scores for each of the terms in the question.
4. A query term's weight is influenced by three factors:
• First, the frequency with which a query term appears in a document (also
known as TF for term frequency). For the query [farming in Kansas],
documents that mention “farming” frequently will have higher scores.
• In result set Not in
result set
Relevant 30 20
Not relevant 10 40
Second, the term's inverse document frequency, or IDF. • Because the term
"in" appears in practically every document, it has a high document frequency
and hence a low inverse document frequency, making it less essential to the
query than "farming" or "Kansas."
• Finally, the document's length. A million-word paper will almost certainly
have all of the query words, although it may not be about the query. A short
document that includes all of the terms is a far better option.
All three of them are taken into account by the BM25 function.
We will see that the recursion bottom out property. We assume page A has
pages T1…Tn which point to it (i.e., are citations). The parameter d is a
damping factor which can be set between 0 and 1. We usually set d to 0.85.
There are more details about d in the next section. Also C(A) is defined as the
number of links going out of page A. The PageRank of a page A is given as
follows:
Machine Translation
The meaning of a text in the original (source) language must be fully restored
in the target language, i.e. the translation, in order to process any translation,
whether human or automated. While it appears simple on the surface, it is
significantly more complicated. Translation is more than just a word-for-word
replacement. A translator must be able to evaluate and analyse all of the text's
aspects, as well as understand how each word influences the others. This
necessitates considerable knowledge of the source and target languages'
grammar, syntax (sentence structure), semantics (meanings), and other
aspects, as well as familiarity with each local region.
Both human and machine translation have their own set of difficulties. For
example, no two translators can create identical translations of the same
content in the same language pair, and customer satisfaction may require
numerous rounds of revisions. The major challenge, though, is determining
how machine translation can produce translations of publishable quality.
Rule-Based Machine Translation Technology
For each language pair, rule-based machine translation relies on a large
number of built-in linguistic rules and millions of bilingual dictionaries.
The software parses text and generates a transitional representation from
which the target language text can be generated. This approach necessitates
enormous sets of rules and extensive lexicons with morphological, syntactic,
and semantic information. These sophisticated rule sets are used by the
programme, which subsequently translates the source language's grammatical
structure to the target language.
Large dictionaries and complex language rules are used to create translations.
By including their terminology into the translation process, users can increase
the quality of the out-of-the-box translation. They generate custom dictionaries
that override the system's default options.
In most circumstances, there are two steps: an initial investment that improves
quality considerably at a low cost, and a continuous investment that improves
quality progressively. While rule-based MT can help firms get to and beyond
the quality threshold, the quality improvement process can be lengthy and
costly.
Statistical Machine Translation Technology
Statistical machine translation makes use of statistical translation models
whose parameters are derived through monolingual and bilingual corpora
analysis. The process of creating statistical translation models is swift, but the
technique is strongly reliant on existing multilingual corpora. For a specific
domain, a minimum of 2 million words is necessary, with considerably more
for general language. Although it is theoretically possible to meet the quality
criterion, most companies lack the appropriate multilingual corpora to create
the necessary translation models. Furthermore, statistical machine translation
uses a lot of CPU power and necessitates a lot of hardware to run translation
models at average performance levels.
Rule-Based MT vs. Statistical MT
Rule-based MT has good out-of-domain quality and is predictable by nature.
Customization based on dictionaries ensures higher quality and adherence to
corporate terminology. However, the fluency that readers expect from a
translation may be lacking. The customising cycle required to attain the
quality criteria might be lengthy and costly in terms of expenditure. Even on
ordinary hardware, the performance is excellent.
When big and qualified corpora are available, statistical MT produces good
results. The translation is fluent, which means it reads smoothly and so
satisfies the needs of the user. The translation, on the other hand, is neither
predictable nor consistent. Good corpora training is automated and less
expensive. However, training on broad language corpora, or text outside of the
defined domain, is ineffective. Statistical machine translation also necessitates
a lot of hardware to construct and manage huge translation models.
Rule-Based MT Statistical MT
+ Out-of-domain translation
– Poor out-of-domain quality
quality
SPEECH RECOGNITION
Given an auditory signal, speech recognition is the challenge of detecting a
series of SPEECH words pronounced by a speaker. It has become one of the
most widely used AI applications.
1. Example: When stated quickly, the word "recognise speech" sounds almost
identical to "wreak a nice beach." Even this brief example demonstrates a few
of the challenges that make communication difficult.
2. First segmentation: written words in English have spaces between them, but
in fast speech there are no pauses in “wreck a nice” that would distinguish it as
a multiword phrase as opposed to the single word “recognize”.
3. Second, coarticulation: when speaking quickly the “s” sound at the end of
“nice” merges with the “b” sound at the beginning of “beach” yielding
something that is close to a “sp”. Another problem that does not show up in
this example is homophones – words like “to”, “too” and “two” that sound the
same but differe in meaning argmax P(word1:t | sound1:t) = argmax
P(sound1:t | word1:t) P(word1:t). word1:t word1:t Heere P (sound1:t |
sound1:t) is the acrostic model. It describes the sound of words – that “ceiling”
begins with a soft “c” and sounds the same as “sealing”. P (word1:t) is known
as the language model. It specifies the prior probability of each utterance – for
example, that “ceiling fan” is about 500 times more likely as a word sequence
than “sealing fan”.
4. Once we define the acoustic and language models, we can solve for the
most likely sequence of words using the Viterbi algorithm.
Acoustic Model
1. The magnitude of the current – which approximates the amplitude of
the sound wave – is measured by an analog-to-digital converter at
discrete intervals called sampling rate.
2. The quantization factor determines the precision of each measurement;
speech recognizers commonly keep 8 to 12 bits. A low-end system
sampling at 8 kHz with 8-bit quantization would require roughly half a
megabyte of speech every minute.
3. A phoneme is the smallest unit of sound that has a specific meaning for
language speakers. The "t" in "stick," for example, sounds similar
enough to the "t" in "tick" that English people assume them to be the
same phoneme. A vector of features summarises each frame. The
phone model is depicted in the image below.
Translating the acoustic signal into a sequence of frames. In this
diagram each frame is described by the discretized values of three
acoustic features; a real system would have dozens of features
ROBOT
1. Robots are physical agents who manipulate the physical world to fulfil
tasks.
2. They are outfitted with effectors like as legs, wheels, joints, and grippers in
order to accomplish this.
3. The sole goal of effectors is to exert physical pressures on the environment.
4. Robots also have sensors that enable them to perceive their surroundings.
5. Modern robotics uses a variety of sensors, such as cameras and lasers to
monitor the environment and gyroscopes and accelerometers to track the
robot's own movements.
6. The majority of today's robots can be classified into one of three groups.
Manipulators, sometimes known as robot arms, are physically attached to their
work environment, such as a factory assembly line or the International Space
Station.
Robot Hardware
1. Sensors serve as a perceptual link between the robot and its surroundings.
2. Passive sensors, such as cameras, are actual environmental observers,
capturing signals created by other sources in the environment.
3.Active sensors, like sonar, emit energy into the surroundings. The fact that
this radiation is reflected back to the sensor is what they rely on. Active
sensors provide more information than passive sensors, but at the cost of
higher power consumption and the risk of interference when numerous active
sensors are employed simultaneously. Sensors can be classified into three sorts
based on whether they sense the environment, the robot's location, or the
robot's internal setup, whether active or passive.
4. Range finders are sensors that measure the distance between things in the
immediate vicinity. Robots were widely equipped with sonar sensors in the
early days of robotics. Sonar sensors produce directed sound waves that are
reflected by objects, with part of the sound making it to the listener.
5. Stereo vision uses many cameras to capture the surroundings from slightly
different perspectives, then analyses the parallax in the images to compute the
range of nearby objects. Sonar and stereo vision are no longer commonly
employed in mobile ground robots due to their inaccuracy.
6. Laser beams and special 1-pixel cameras are used in other range sensors,
which can be guided using sophisticated mirror configurations or spinning
parts. Scanning lidars are the name for these sensors (short for light detection
and ranging).
7. Radar, which is generally the sensor of choice for UAVs, is another
common range sensor. Radar sensors are capable of measuring distances of
several kilometres. Tactile sensors, such as whiskers, bump panels, and touch-
sensitive skin, are on the other end of the range sensing spectrum. These
sensors use physical contact to determine range and can only be used to detect
items that are very close to the robot.
8. Location sensors are a second significant type of sensor. To detect position,
most location sensors use range sensing as a main component. Outside, the
most popular solution to the problem of location is the Global Positioning
System (GPS).
9.Proprioceptive sensors, which notify the robot of its own motion, are the
third major class. Motors are frequently equipped with shaft decoders that
count the revolution of motors in minute increments to measure the exact
configuration of a robotic joint.
10. Inertial sensors, such as gyroscopes, rely on mass resistance to velocity
change. They can aid in the reduction of uncertainty.
11.Force and torque sensors are used to measure other crucial aspects of the
robot's status. When robots handle fragile goods or objects whose exact shape
and placement are unknown, these are essential.
Robotic Perception
1. Perception is the conversion of sensor data into internal representations of
the environment by robots. Sensors are noisy, and the environment is partially
viewable, unexpected, and frequently dynamic, making perception difficult. In
other words, robots face all of the issues associated with state estimation (or
filtering)
2. Good internal representations for robots have three properties as a rule of
thumb: they contain enough information for the robot to make good decisions,
they are structured so that they can be updated efficiently, and they are natural
in the sense that internal variables correspond to natural state variables in the
physical world.
There may be times when no map of the environment is available. The robot
will then need to obtain a map. This is a bit of a chicken-and-egg situation: the
navigating robot will have to figure out where it is in relation to a map it
doesn't know while also generating the map while not knowing where it is.
This subject has been extensively explored under the name simultaneous
localization and mapping, abbreviated as SLAM, and it is vital for many robot
applications.
Many alternative probabilistic approaches, like the extended Kalman filter
outlined above, are used to tackle SLAM difficulties.
Localization using extended Kalman Filter
A repelling potential field pushes the robot away from obstacles, (b) Path
found by simultaneously minimizing path length and the potential
The Voronoi graph is the set of points equidistance to two or more
obstacles in configuration space (b) A probabilistic moodmap, composed
of 100 randomly chosen points in free space.
Robust methods
1. A robust method assumes a bounded level of uncertainty in each component
of a problem, but assigns no probabilities to values inside the allowable
interval.
2. A robust solution is one that works regardless of the actual values as long as
they stay within the assumed ranges.
3.The conformant planning technique is an extreme kind of resilient strategy.