1. Home
  2. Subjects
  3. Data Science

Data Science MCQs · Page 18

1,613 multiple choice questions with answers across 28 topics.

Showing 426–450 of 1,613

What is the output of the following Python code snippet?

d = {'a': 1, 'b': 2}
print(d.pop('a'))
  1. 2
  2. None
  3. 1 Correct answer
  4. KeyError
MCQSEXAM Read explanation

Why does LAST_VALUE(x) OVER (ORDER BY ts) usually return the current row's value rather than the final value in the partition?

  1. The window is implicitly partitioned by ts, so each row is its own group
  2. The function is nondeterministic and may return any row of the whole partition
  3. The default frame ends at the current row, so the last visible value is here Correct answer
  4. LAST_VALUE ignores the frame and evaluates over the whole peer group
MCQSEXAM Read explanation

SelectKBest is configured with score_func=chi2 and fitted on a design matrix that contains negative values. What happens?

  1. It raises an error, because chi-squared scoring needs non-negative features Correct answer
  2. It silently takes absolute values before computing the chi-squared scores
  3. It works but ranks the negative features last regardless of their true signal
  4. It standardises the features first, which makes every value non-negative
MCQSEXAM Read explanation