1. Home
  2. Data Science
  3. Naive Bayes
  4. What is the computational complexity of training a Naive…

Added 1 May 2024

What is the computational complexity of training a Naive Bayes model?

  1. O(n) Correct answer
  2. O(n log n)
  3. O(n^2)
  4. O(1)

Correct answer

A. O(n)

12 views

MCQSEXAM

Explanation

Training Naive Bayes only needs one pass over the data to count frequencies / compute means and variances, so it is linear, O(n). O(1) is not possible because every training example must be read.

Doubts & discussion

Not sure why the answer is A? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Naive Bayes MCQs

Practise all Naive Bayes MCQs

Similar MCQs