Ucs655 Test Paper

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

lOMoARcPSD|17171501

UCS655 - Test Paper

mathematics for data science (Thapar Institute of Engineering and Technology)

Scan to open on Studocu

Studocu is not sponsored or endorsed by any college or university


Downloaded by Gracevera kaur (gkaur_be21@thapar.edu)
lOMoARcPSD|17171501

Name: Roll No.:

THAPAR INSTITUTE OF ENGINEERING & TECHNOLOGY-PATIALA


Department of Computer Science and Engineering
Mid-Sem. Exam (April 9, 2022)
Al applications - NLP, Computer Vision, lOT (UCS655) Marks: 35 Time: 2 Hours
Instructors: Dr. Amit Trivedi, Dr. Seema Wazarkar, Dr. Sonu Lamba. B.E. (Sem. VI)

Instructions: Attempt any FIVE questions. Answer all parts of the question at same place.
Note: Only First Five answers will be considered.
Q1 (a) Given the following short movie reviews, each labeled with a genre, either 5
comedy, action or documentary: Marks
SI. Review Genre
No.
1. Fast, furious, shoot action
2. Fun, couple, love, love comedy
3. Couple, fly, fast, fun, fun comedy
4. Fly, fast, shoot, love action
5. Furious, shoot, shoot, fun action
Design a naïve Bayes with add-1 smoothing document classifier to assign a
genre to movie based on review of it.

Q1 (b) Explain about components of intelligent behavior. 2


Marks

Q2 (a) Train two models, multinomial naive Bayes and binarized naive Bayes, 7
both with add-1 smoothing, on the following document counts for key Marks
sentiment words, with positive (1) or negative (0) class assigned as noted.
Doc# "good" "poor" "great" Class
1 3 0 3 0
2 0 1 2 0
3 1 3 0 1
4 1 5 2 1
5 0 2 0 1
Use both naive Bayes models to assign a class (0 or 1) to this sentence:
"A good, good plot and great characters, but poor acting."
Do the two models agree or disagree?

Q3 (a) Consider the following training corpus and estimate the Bigram and Trigram 4
probability of the test sentence <s> students are from Thapar <Is>. Include Marks
<s> and </s> in your counts just like any other token.
Training corpus:
<s> I am from Thapar </s>
<s> I am a teacher </s>
<s> students are good and are from various cities </s>
<s> students from Thapar do engineerin•</s>

P.T.O.

Downloaded by Gracevera kaur (gkaur_be21@thapar.edu)


lOMoARcPSD|17171501

Q3 (b) Compute the perplexity of the bigram model for the above test sentence. Also 2
state, which of the gram model (2-gram vs 3-gram) is better for the above Marks
corpus and why?

Q3 (c) State the use of back-off n-gram model. 'I


Marks

Q4 Apply minimum edit distance with Dynamic Programming to compute Minimum 7


Edit Distance between "execution" and "intention". Assume deletion cost= 1, Marks
insertion cost=1 and substitution is implemented with the help of deletion and
insertion. Show your results in tabular format. Also state its space and time
complexity.

Q5 (a) Consider a corpus that has the words- old, older, highest, and lowest. The 5
frequency of these words is { "old": 7, "older": 3, "finest": 9, "lowest": 4 }. The Marks
</w> token at the end of each word is added to identify a word boundary. Apply
Byte Pair Encoding algorithm for text tokenization until k= 5 merges and
generate merge list.

Q5 (b) Differentiate between strong Al and weak Al with an example. 2


Marks
Q6 (a) Consider the corpus given in question 3(a) and use linear interpolation 4
smoothing between a maximum likelihood trigram, bigram and unigram model Marks
with
Al = 1/4
A2 = 1/2
A3 = 1/4.
What is P(Thapar l students from)? Include <s> and <Is> in your counts just
like any other token.

Q6 (b) Discuss about human machine teaming with example. 3


Marks

Q7 Illustrate Al Architecture and discuss about it in detail. 7


Marks

Downloaded by Gracevera kaur (gkaur_be21@thapar.edu)

You might also like