figure decision tree model accuracy as shown in figure the promised accuracy is we now know better than to rely solely on this single testso once again we turn to confusion matrix on second set of dataas shown in figure figure shows different story on these observations of the holdout sample the decision tree model tends to classify well when the post is about game of thrones but fails miserably when confronted with the data science posts it seems the model has preference for game of thronesand can you blame itlet' have look at the actual modeleven though in this case we'll use the naive bayes as our final model print(classifier pseudocode(depth= )the decision tree hasas the name suggestsa tree-like figure confusion matrix modelas shown in figure on decision tree model the naive bayes considers all the terms and has weights attributedbut the decision tree model goes through them sequentiallyfollowing the path from the root to the outer branches and leaves figure only shows the top four layersstarting with the term "data if "datais present in the postit' always data science if "datacan' be foundit checks for the term "learn,and so it continues possible reason why this decision tree isn' performing well is the lack of pruning when decision tree is built it has many leavesoften too many tree is then pruned to certain level to minimize overfitting big advantage of decision trees is the implicit interaction effects between words it figure decision tree model tree structure representation