Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q1 Consider this code: count_vect = CountVectorizer(ngram_range=(1,2)) tfidf_vect = TfidfVectorizer(ngram_range=(1,2)) mat1 = count_vect.fit_transform(corpus) mat2 = tfidf_vect.fit_transform(corpus) Select all correct statements: Group of answer choices a

Q1 Consider this code: count_vect = CountVectorizer(ngram_range=(1,2))

tfidf_vect = TfidfVectorizer(ngram_range=(1,2))

mat1 = count_vect.fit_transform(corpus)

mat2 = tfidf_vect.fit_transform(corpus) Select all correct statements:

Group of answer choices

a - mat1 and mat2 have the same number of columns

b - mat1[i,j] is zero if and only if mat2[i,j] is zero, for each element i,j in the matrices

c - mat1 and mat2 have the same number of rows

d - mat1[i,j] is one if and only if mat2[i,j] is one, for each element i,j in the matrices

Q2 If we only use unigrams, these two documents have the same bag-of-words representation:

Document 1: The dog bit the cat that ate the mouse Document 2: The mouse bit the cat that ate the dog

True or False

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft Visual Basic 2008 Comprehensive Concepts And Techniques

Authors: Gary B. Shelly, Corinne Hoisington

1st Edition

1423927168, 978-1423927167

More Books

Students also viewed these Databases questions

Question

3. What are the potential costs of this transaction?

Answered: 1 week ago

Question

9. Describe the characteristics of power.

Answered: 1 week ago

Question

3. Identify and describe nine cultural value orientations.

Answered: 1 week ago