File size: 2,099 Bytes
4f380c1
 
 
 
 
 
 
d56606e
032e61e
 
4f380c1
 
 
 
 
 
 
 
 
 
 
 
 
 
032e61e
4f380c1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
---
language: "en"
thumbnail: "https://huggingface.co./nsi319"
tags:
- big_bird
- pytorch
- text-classification
- mobile app descriptions
- playstore
license: "mit"
inference: true
---

# Mobile App Classification

## Model description

BigBird, is a sparse-attention based transformer which extends Transformer based models, such as BERT to much longer sequences. The model can handle input sequence of length up to 4,096 tokens.

The [google/bigbird-roberta-base](https://huggingface.co./google/bigbird-roberta-base) model is fine-tuned to classify an mobile app description into one of **6 play store categories**. 
Trained on 9000 samples of English App Descriptions and associated categories of apps available in [Google Play](https://play.google.com/store/apps).

## Fine-tuning

The model was fine-tuned for 5 epochs with a batch size of 16, a learning rate of 2e-05, and a maximum sequence length of 1024. Since this was a classification task, the model was trained with a cross-entropy loss function. The best evaluation f1 score achieved by the model was 0.8964259037209702, found after 4 epochs. The accuracy of the model on the test set was 0.8966.  

## How to use

```python
from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline

tokenizer = AutoTokenizer.from_pretrained("nsi319/bigbird-roberta-base-finetuned-app")  
model = AutoModelForSequenceClassification.from_pretrained("nsi319/bigbird-roberta-base-finetuned-app")

classifier = pipeline('sentiment-analysis', model=model, tokenizer=tokenizer)

classifier("From scores to signings, the ESPN App is here to keep you updated. Never miss another sporting moment with up-to-the-minute scores, latest news & a range of video content. Sign in and personalise the app to receive alerts for your teams and leagues. Wherever, whenever; the ESPN app keeps you connected.")

'''Output'''
[{'label': 'Sports', 'score': 0.9983325600624084}]
```

## Limitations
Training data consists of apps from 6 play store categories namely Education, Entertainment, Productivity, Sports, News & Magazines and Photography.