Search Header Logo

sem6_ai_week_8_formula_code

Authored by Sujan Pandey

Computers

University

sem6_ai_week_8_formula_code
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

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

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?

Discover more resources for Computers