The Naive Bayes multinomial algorithm is used for text and images when features represent the frequency of words (textual or visual) in a document.