sem6_ai_week_8_formula_code

sem6_ai_week_8_formula_code

University

30 Qs

quiz-placeholder

Similar activities

[Part 1] Exam in COMP 212

[Part 1] Exam in COMP 212

University

30 Qs

DAV Module 3-6

DAV Module 3-6

University

30 Qs

Data Analysis with Python 1

Data Analysis with Python 1

University

30 Qs

quiz LO

quiz LO

10th Grade - University

28 Qs

Assesment : Generative AI

Assesment : Generative AI

University

32 Qs

Cuestionario sobre Inteligencia Artificial para Principiantes

Cuestionario sobre Inteligencia Artificial para Principiantes

University

30 Qs

Nhập môn ATTT final - hust

Nhập môn ATTT final - hust

University

33 Qs

Sterowniki

Sterowniki

University

25 Qs

sem6_ai_week_8_formula_code

sem6_ai_week_8_formula_code

Assessment

Quiz

Computers

University

Hard

Created by

Sujan Pandey

FREE Resource

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In TF‑IDF code, the weight for term t is often computed as

tf[t] / (idf[t] + 1e‑9)

np.exp(tf[t] * idf[t])

tf[t] ** idf[t]

tf[t] * idf[t]

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Keras Tokenizer converts text to indices through the call

tokenizer.join_texts(texts)

tokenizer.pad_on_texts(texts)

tokenizer.mask_texts(texts)

tokenizer.texts_to_sequences(texts)

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The cosine similarity formula in numpy can be written as

np.dot(u,v)

np.sum(u-v)

np.linalg.norm(u*v)

np.dot(u,v)/(np.linalg.norm(u)*np.linalg.norm(v))

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

To pad sequences post‑style you would use

pad_sequences(seq, padding='pre')

pad_sequences(seq, padding='mid')

pad_sequences(seq, truncating='post')

pad_sequences(seq, padding='post')

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In Word2Vec Skip‑gram negative sampling, training loss per pair is

log(sigmoid(pos))

sigmoid(neg) - pos

mean_squared_error(pos,neg)

‑log(sigmoid(pos)) ‑ Σ log(sigmoid(‑neg_i))

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

FastText builds subword keys with the code

for w in words: make_wordpiece(w)

for c in chars: merge_pair(c)

ngrams = None

for i in range(len(word)): ngrams.add(word[i:j])

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

One‑hot encoding size in code is derived from

np.unique(labels).shape[1]

len(texts)

embedding_dim

len(tokenizer.word_index) + 1

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?