I took sentences from the Torah, the Bible, and the Qu’ran to train a 3-way classifier (using bag-of-words, TF-IDF, svd, and logistic regression). The visual shows the “test examples”; sentences classified by the classifier, scrolling through the lines. The sentence’s color shows the true source it came from, and the color of the line it’s flowing through shows from which text it was classified to be by the classifier. Can you tell which color corresponds to which text?
Green = Torah, Blue = Bible, Red = Qu’ran.
The code can be found here.
And the applet here.