Downloads · 30 days
0
opale-ai/news-classifier
news-classifier is a tabular classification model from opale-ai. Use it for the tabular classification task on the model card, and read the license before you ship it in a product. It is set up for sklearn.
This project aims to classify news articles as relevant (i.e., discussing a new event) or non-relevant. The articles are then provided to an LLM pipeline. We should maximize the lowest false positive rate as we don't…
Downloads · 30 days
0
Access
Public
Updated Jun 30, 2025
Repo size
18.7 MB
Likes
0
Public
Click a slice to open those files.
.csv10.6 MB · 51%
From the Hugging Face model README
This project aims to classify news articles as relevant (i.e., discussing a new event) or non-relevant. The articles are then provided to an LLM pipeline. We should maximize the lowest false positive rate as we don't want the LLMs to be polluted.
For each article, we collect a set of features from both the metadata and the raw content of the web page:
<title> tag of the page, often used by browsers and search engines.<meta name="description"> field, typically summarizing the article content.<h1>).og:type property, which often indicates the type of content (e.g., article, video, website).<p> tags, giving a rough idea of how much structured text the page contains.<a> tags) on the page.➡️ The Link Count feature becomes more meaningful when compared to the Average Link Count of the Website. For example, a page with very few links on a generally link-heavy site may indicate that it is an article rather than a hub or landing page.
⚠️ However, computing the Average Link Count of the Website requires crawling multiple pages of the same domain, which is not feasible in a real-time prediction setting (i.e., when you want to classify a single article instantly). For this reason, features like Average Link Count of the Website can only be used during offline training and are not available at inference time.
For this first prototype, I decided to use text embeddings to semantically represent each article. These embeddings are then used to train a binary classifier.
Each article is represented using three components:
⚠️ Due to token limits, only the beginning of each text field is used. This may affect classification performance when relevant information appears later in the article.
For the classifier, I chose a Support Vector Machine (SVM) model because:
To address the limitations of the first test, a second experiment was conducted using chunked embeddings:
This method allows the model to consider a broader portion of the article, potentially capturing relevant information that appears later in the text.
The goal of this second test is to evaluate whether this approach improves classification performance compared to the truncated version.
Below is the confusion matrix for the second test:

Compared to Test 1, this version shows a slight improvement in both accuracy and precision, indicating that including more of the article content via chunked embeddings helps reduce false positives and better capture relevant information.
For this test, I also generated the ROC curve:

The curve appears to have a stepped shape, which is expected due to the limited number of test samples. As a result, it’s difficult to draw strong conclusions from the ROC curve alone.
However, we may tentatively observe that lowering the decision threshold could help reduce false positives — a promising direction to explore in future experiments with more data.
After analyzing the results, it seems that the model has difficulty distinguishing between the content types of articles, specifically whether they are news or not. However, it excels at identifying the structural layout of pages, such as determining if a page is a homepage, article, video, etc. Therefore, adding features like og:type, text-to-HTML ratio, and paragraph count may not be beneficial, as these features are primarily useful for differentiating page structure rather than content type.