File size: 1,759 Bytes
5162125
 
fbfa55b
 
 
 
 
 
 
 
92a99c0
 
 
 
 
 
 
 
 
bd60768
 
024a7fa
bd60768
 
 
4e165d3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
---
license: apache-2.0
datasets:
- ag_news
language:
- en
metrics:
- accuracy
- f1
pipeline_tag: text-classification
widget:
  - text: Ukraine's President Volodymyr Zelensky appears to have confirmed that his country's long-awaited counter-offensive against Russia has started. "Counter-offensive and defensive actions are taking place," he said.
    example_title: World News Example
  - text: The 2023 NFL draft class saw a record 12 quarterbacks selected in the first five rounds, including three inside the top five picks. The 2024 class? Expect some similarities.
    example_title: Sports News Example
  - text: Friday's jobs report does little to change the Federal Reserve's debate over holding rates steady this month. But it strengthens the likelihood that officials would pair any June pause with a stronger preference to raise rates later this year.
    example_title: Business News Example
  - text: According to one recent estimate, a crew of six would require an estimated 10,000 kilograms of food for the trip. NASA—which plans to send people to Mars within 2 decades—could stuff a spacecraft with prepackaged meals and launch additional supplies to the Red Planet in advance for the voyage home. But even that wouldn’t completely solve the problem.
    example_title: Science News Example
---

**BREAKING NEWS: We are making a news topic classifier!**

First posted on my [Kaggle](https://www.kaggle.com/code/wesleyacheng/news-topic-classification-with-bert/notebook).

Here I did transfer learning on [BERT](https://huggingface.co/distilbert-base-uncased) with the [AG News Dataset](https://huggingface.co/datasets/ag_news) to create a multi-class news topic classifier to classify news as either Business, Sports, Sci/Tech, or World.