AI_UNIT-5
AI_UNIT-5
creation of algorithms that can learn and improve themselves without explicit
programming. One of the most critical factors that contribute to the success
of a machine learning model is the quality and quantity of data used to train
it. Passive learning and active learning are two approaches used in machine
learning to acquire data.
Passive Learning:
Passive learning, also known as batch learning, is a method of acquiring data
by processing a large set of pre-labeled data. In passive learning, the
algorithm uses all the available data to learn and improve its performance.
The algorithm does not interact with the user or request additional data to
improve its accuracy.
Example:- An example of passive learning is training a machine
learning model to classify emails as spam or not spam. The algorithm is fed a
large dataset of labeled emails and uses it to learn how to identify spam
emails. Once the training is complete, the algorithm can accurately classify
new emails without any further input from the user.
Active Learning:
Active learning is a method of acquiring data where the algorithm interacts
with the user to acquire additional data to improve its accuracy. In active
learning, the algorithm starts with a small set of labeled data and requests
the user to label additional data. The algorithm uses the newly labeled data to
improve its performance and may continue to request additional data until a
satisfactory level of accuracy is achieved.
Example:- An example of active learning is training a machine learning model
to recognize handwritten digits. The algorithm may start with a small set of
labeled data and ask the user to label additional data that the algorithm is
uncertain about. The algorithm uses the newly labeled data to improve its
accuracy, and the process repeats until the algorithm can accurately
recognize most handwritten digits.
Difference Between Passive Learning and Active Learning:
The following table summarizes the differences between passive learning and
active learning:
Uses a large set of pre-labeled Starts with a small set of labeled data and
data to train the algorithm requests additional data from the user
The algorithm does not The algorithm interacts with the user to
interact with the user acquire additional data
1
Passive Learning Active Learning
Conclusion:
In conclusion, passive learning and active learning are two approaches used
in machine learning to acquire data. Passive learning uses a large set of pre-
labeled data to train the algorithm, while active learning starts with a small
set of labeled data and requests additional data from the user to improve
accuracy. The choice between passive learning and active learning depends on
the availability of labeled data and the application’s requirements.
2
AI - NATURAL LANGUAGE PROCESSING
The field of NLP involves making computers to perform useful tasks with the
natural languages humans use. The input and output of an NLP system can be
−
•Speech
•Written Text
Components of NLP
It involves −
1
Difficulties in NLU
2
• Semantic Analysis − It draws the exact meaning or the dictionary
meaning from the text. The text is checked for meaningfulness. It is done
by mapping syntactic structures and objects in the task domain. The
semantic analyzer disregards sentence such as “hot ice-cream”.
• Discourse Integration − The meaning of any sentence depends upon the
meaning of the sentence just before it. In addition, it also brings about the
meaning of immediately succeeding sentence.
• Pragmatic Analysis − During this, what was said is re-interpreted on
what it actually meant. It involves deriving those aspects of language
which require real world knowledge.
3
Describe Speech Recognition in terms of Language
Model and Acoustic Model.
To meet these requirements, speech recognition systems use two types of models:
Acoustic Model
The acoustic model is responsible for translating audio signals into phonetic units or
phonemes (the basic sounds of a language).
1. Function: It maps the audio signal, which consists of waveforms or spectral features,
to probabilities of phonetic units.
2. Training: It is trained using a large dataset of audio recordings and their
corresponding transcriptions. Techniques like Hidden Markov Models (HMMs) or
Deep Neural Networks (DNNs) are commonly used.
3. Output: The output of the acoustic model is a sequence of phonemes or probability
distributions over phonemes.
Language Model
The language model is responsible for using linguistic knowledge to construct probable word
sequences from the recognized phonetic units.
1. Feature Extraction: The audio signal is first converted into a set of features that
capture the important characteristics of the speech signal.
2. Phoneme Prediction: The acoustic model processes these features to produce a
sequence of phoneme probabilities.
3. Word Hypothesis: The language model then takes these phoneme sequences and
predicts the most likely sequence of words by evaluating different possible word
sequences and selecting the one with the highest probability.
4. Decoding: A decoder integrates the acoustic and language models to produce the final
transcription. It combines the phoneme probabilities from the acoustic model and the
word probabilities from the language model to find the most likely transcription of the
spoken input.
Example
1. Acoustic Model: Converts the audio features into phoneme probabilities like /ai/ /n/
/iː/ /d/ /ə/ /b/ /ʊk/.
2. Language Model: Evaluates sequences of words that could correspond to these
phonemes, determining that "I need a book" is a more likely sequence than
alternatives like "I knee dab hook."
3. Decoder: Integrates outputs from both models to produce the final recognized text: "I
need a book."