News Classification Using Machine Learning

Shweta MahajanInternational Journal on Recent and Innovation Trends in Computing and Communication 2021 · DOI

TL;DR

This paper tackles the challenge of automatically classifying news articles into relevant categories using machine learning. They explore the effectiveness of the Naive Bayes classifier, comparing two feature extraction techniques: count vectorization and TF-IDF, to improve accuracy in news categorization.

What Problem Does This Paper Address?

In today's digital age, we're inundated with news from various sources like social media, websites, and publications. Manually sorting through this vast amount of information to find specific topics (e.g., politics, sports, entertainment) is impractical. This paper addresses the need for an automated system to classify news articles, making it easier for users to retrieve and consume information relevant to their interests. The core problem is to accurately assign a category to a given news article, especially when dealing with the unstructured nature of text data.

Methods

The authors employ a machine learning approach for news classification. Their methodology involves several key steps:

  • Text Pre-processing: This crucial stage cleans the raw text data. It includes:
  • News Tokenization: Breaking down text into individual words or segments.
  • Diacritics Removal: Eliminating punctuation and special characters.
  • Stop Words Removal: Removing common words (like "the," "is," "and") that don't carry significant meaning for classification.
  • Word Stemming: Reducing words to their root form (e.g., "running" to "run").
  • Feature Engineering: Transforming the pre-processed text into a format that machine learning algorithms can understand. They compare two methods:
  • Count Vectorization: This method counts the occurrences of each word in a document, creating a feature vector where each dimension represents a unique word and its value is its frequency.
  • TF-IDF (Term Frequency-Inverse Document Frequency) Vectorization: This technique weighs words based on their frequency within a document (TF) and their rarity across the entire dataset (IDF). This helps to highlight words that are important to a specific document but not overly common across all documents.
  • Classifier Training: The Naive Bayes classifier is used for categorization. This is a probabilistic classifier based on Bayes' theorem, assuming independence between features.
  • Performance Evaluation: The models are evaluated using standard metrics: Precision, Recall, and F1-Score, along with overall accuracy.

Datasets

The paper utilizes a "News Classification Dataset" in JSON format. This dataset is split into training and testing sets, with 80% allocated for training and 20% for testing. The dataset contains various types of news data, including entertainment, education, sports, and politics. No new benchmark datasets were introduced.

Key Insights and Ideas

  • The importance of pre-processing: The paper highlights that effective text pre-processing is fundamental for accurate news classification. Removing noise and irrelevant words significantly impacts the classifier's performance.
  • Count Vectorization vs. TF-IDF: The study suggests that count vectorization, when used with the Naive Bayes classifier, yields higher accuracy compared to TF-IDF vectorization for this specific task. This implies that for their dataset and chosen classifier, the raw frequency of words might be more indicative of category than their weighted importance.
  • Naive Bayes suitability: Naive Bayes is presented as a simple, fast, and relatively robust classifier for text data, especially when dealing with textual and numeric formats. However, it shows poorer performance with very short text classifications.

Key Results

The paper presents performance measures for Naive Bayes with both count vectorization and TF-IDF.

  • Naive Bayes with Count Vectorization: Achieved the highest accuracy. While specific overall accuracy figures aren't explicitly stated for this combination, the tables show relatively higher precision, recall, and F1-scores across different categories compared to TF-IDF. For instance, category 5 shows a recall of 0.71 and an F1-score of 0.68.
  • Naive Bayes with TF-IDF: Showed lower performance. The tables indicate significantly lower precision, recall, and F1-scores across categories. For example, category 5 has a recall of 0.11 and an F1-score of 0.11.
  • Qualitative Results: The paper includes examples of news articles and their correctly identified categories using Naive Bayes, demonstrating the practical application of their methodology.

Limitations and Future Work

  • Limitations:
    • The paper notes that while Naive Bayes can successfully categorize news, not every prediction is perfectly accurate, with accuracy generally falling between 80% to 85%.
  • Naive Bayes shows poor performance when features are very short text classifications.
  • Future Work: The authors suggest enhancing accuracy by experimenting with other classifiers such as Support Vector Machines (SVM) and decision trees. They also aim to explore more advanced techniques beyond the current methodology.

Summary updated

Abstract

There are plenty of social media webpages and platforms producing the textual data. These different kind of a data needs to be analysed and processed to extract meaningful information from raw data. Classification of text plays a vital role in extraction of useful information along with summarization, text retrieval. In our work we have considered the problem of news classification using machine learning approach. Currently we have a news related dataset which having various types of data like entertainment, education, sports, politics, etc. On this data we have applying classification algorithm with some word vectorizing techniques in order to get best result. The results which we got that have been compared on different parameters like Precision, Recall, F1 Score, accuracy for performance improvement.
BibTeX
@article{mahajan2021news,
  author = {Shweta Mahajan},
  title = {{News Classification Using Machine Learning}},
  journal = {International Journal on Recent and Innovation Trends in Computing and Communication},
  year = {2021},
  doi = {10.17762/ijritcc.v9i5.5464},
}
Figure