Optimizing News Categorization with Machine Learning: A Comprehensive Study Using Naive Bayes (MultinomialNB) Classifier
摘要
The rapid growth of online news content necessitates efficient automated categorization systems to manage and organize vast amounts of information. This study addresses the gap in effective news article classification by utilizing a Naive Bayes (MultinomialNB) classifier. We leverage the “News Aggregator” dataset from the “UCI Machine Learning Repository”, consisting of over 400,000 news articles categorized into business, science and technology, entertainment, and health. Our preprocessing steps include handling missing values, text normalization, and “term frequency-inverse document frequency (TF-IDF)” vectorization. The trained Naive Bayes model achieved an overall accuracy of 89.6%, with high precision and recall particularly in the ‘Entertainment’ category. Charts like the confusion matrix, ROC curve, and learning curve offer a detailed assessment of how well the model performs. These results highlight the Naive Bayes classifier’s effectiveness in news categorization and suggest potential areas for further improvement, particularly in distinguishing ‘Science and Technology’ and ‘Health’ articles. This study demonstrates the practical application of machine learning in organizing news content, with implications for enhancing automated news categorization systems.