Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
+
library_name: transformers
|
5 |
+
tags:
|
6 |
+
- map
|
7 |
+
- reviews
|
8 |
+
- public places
|
9 |
+
---
|
10 |
+
|
11 |
+
|
12 |
+
# Model Card for Model ID
|
13 |
+
|
14 |
+
<!-- Provide a quick summary of what the model is/does. -->
|
15 |
+
|
16 |
+
This model predicts the type of a place (e.g. restaurant, hotel, park) based on the text of a user review.
|
17 |
+
|
18 |
+
E.g.
|
19 |
+
|
20 |
+
'I enjoyed the food, it was very delicious' -> 'Restaurants'
|
21 |
+
|
22 |
+
'I liked the exhibition, very inspiring' -> 'Museums and Galleries'
|
23 |
+
|
24 |
+
|
25 |
+
# Model Details
|
26 |
+
## Model Description
|
27 |
+
|
28 |
+
The Bert-User-Review-Rating model is trained on a dataset of 1,300,000 reviews of public places and points of interest. It is capable of classifying the type of a place based on a user review into one of the following categories:
|
29 |
+
|
30 |
+
0: 'Specialty Food Stores',
|
31 |
+
1: 'Hotels and Inns',
|
32 |
+
2: 'Schools and Universities',
|
33 |
+
3: 'Shopping mall',
|
34 |
+
4: 'Museums and Galleries',
|
35 |
+
5: 'Restaurants',
|
36 |
+
6: 'Parks',
|
37 |
+
7: 'Shops',
|
38 |
+
8: 'Cafes and Coffee Shops',
|
39 |
+
9: 'Cultural Institutions',
|
40 |
+
10: 'Places of Worship',
|
41 |
+
11: 'Leisure and Amusement',
|
42 |
+
12: 'Tourist Attractions',
|
43 |
+
13: 'Medical Services',
|
44 |
+
14: 'Social Services',
|
45 |
+
15: 'Food Courts',
|
46 |
+
16: 'Sports and Fitness',
|
47 |
+
17: 'Outdoor Activities',
|
48 |
+
18: 'Training and Development',
|
49 |
+
19: 'Bars and Pubs',
|
50 |
+
20: 'Industrial and Commercial',
|
51 |
+
21: 'Wellness Services',
|
52 |
+
22: 'Pets Services',
|
53 |
+
23: 'Public Transit',
|
54 |
+
24: 'Performing Arts',
|
55 |
+
25: 'Vehicle Services',
|
56 |
+
26: 'Other Lodging',
|
57 |
+
27: 'Professional Services',
|
58 |
+
28: 'Government Services',
|
59 |
+
29: 'Religious Services',
|
60 |
+
30: 'Travel Services'
|
61 |
+
|
62 |
+
Model type: BERT-based model
|
63 |
+
|
64 |
+
Language(s) (NLP): English
|
65 |
+
|
66 |
+
# Direct Use
|
67 |
+
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
68 |
+
The model can be used directly to classify the type of a place based on a user review.
|
69 |
+
|
70 |
+
## Downstream Use [optional]
|
71 |
+
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
72 |
+
The model can be fine-tuned for user-review related tasks
|
73 |
+
|
74 |
+
# Bias, Risks and Limitations
|
75 |
+
The model may reflect biases present in the training data, such as cultural or regional biases, as training data reflects public places in Singapore.
|
76 |
+
|
77 |
+
# How to Get Started with the Model
|
78 |
+
Use the code below to get started with the model.
|
79 |
+
|
80 |
+
## Use a pipeline as a high-level helper
|
81 |
+
|
82 |
+
from transformers import pipeline
|
83 |
+
|
84 |
+
pipe = pipeline("text-classification", model="mekes/Bert-Place-Type")
|
85 |
+
|
86 |
+
result = pipe("The food was super tasty, I enjoyed every bite.")
|
87 |
+
|
88 |
+
print(result)
|
89 |
+
|
90 |
+
# Metrics
|
91 |
+
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
92 |
+
|
93 |
+
Eval Accuracy: 0.753
|
94 |
+
|
95 |
+
Eval F1 Score: 0.741
|
96 |
+
|
97 |
+
Eval Recall: 0.753
|
98 |
+
|
99 |
+
# Environmental Impact
|
100 |
+
Carbon emissions were estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019)
|
101 |
+
|
102 |
+
Calculations were done with Nvidia RTX 3090 instead of the used Nvidia RTX 4090.
|
103 |
+
|
104 |
+
For one training run it emmited approximately 1,5 kg CO2
|
105 |
+
|