aaa961 commited on
Commit
fe0a072
·
verified ·
1 Parent(s): 9fa627d

Add BERTopic model

Browse files
Files changed (4) hide show
  1. README.md +75 -0
  2. config.json +16 -0
  3. topic_embeddings.safetensors +3 -0
  4. topics.json +483 -0
README.md ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ---
3
+ tags:
4
+ - bertopic
5
+ library_name: bertopic
6
+ pipeline_tag: text-classification
7
+ ---
8
+
9
+ # rag-topic-model
10
+
11
+ This is a [BERTopic](https://github.com/MaartenGr/BERTopic) model.
12
+ BERTopic is a flexible and modular topic modeling framework that allows for the generation of easily interpretable topics from large datasets.
13
+
14
+ ## Usage
15
+
16
+ To use this model, please install BERTopic:
17
+
18
+ ```
19
+ pip install -U bertopic
20
+ ```
21
+
22
+ You can use the model as follows:
23
+
24
+ ```python
25
+ from bertopic import BERTopic
26
+ topic_model = BERTopic.load("aaa961/rag-topic-model")
27
+
28
+ topic_model.get_topic_info()
29
+ ```
30
+
31
+ ## Topic overview
32
+
33
+ * Number of topics: 6
34
+ * Number of training documents: 168
35
+
36
+ <details>
37
+ <summary>Click here for an overview of all topics.</summary>
38
+
39
+ | Topic ID | Topic Keywords | Topic Frequency | Label |
40
+ |----------|----------------|-----------------|-------|
41
+ | -1 | to - my - klarna - for - the | 12 | -1_to_my_klarna_for |
42
+ | 0 | klarna - my - declined - in - for | 62 | 0_klarna_my_declined_in |
43
+ | 1 | my - details - klarna - and - call | 34 | 1_my_details_klarna_and |
44
+ | 2 | the - payment - for - to - pay | 24 | 2_the_payment_for_to |
45
+ | 3 | the - store - it - for - ago | 19 | 3_the_store_it_for |
46
+ | 4 | the - ago - sneakers - and - shoes | 17 | 4_the_ago_sneakers_and |
47
+
48
+ </details>
49
+
50
+ ## Training hyperparameters
51
+
52
+ * calculate_probabilities: False
53
+ * language: None
54
+ * low_memory: False
55
+ * min_topic_size: 10
56
+ * n_gram_range: (1, 1)
57
+ * nr_topics: auto
58
+ * seed_topic_list: None
59
+ * top_n_words: 10
60
+ * verbose: False
61
+ * zeroshot_min_similarity: 0.7
62
+ * zeroshot_topic_list: None
63
+
64
+ ## Framework versions
65
+
66
+ * Numpy: 1.26.4
67
+ * HDBSCAN: 0.8.40
68
+ * UMAP: 0.5.7
69
+ * Pandas: 2.3.0+4.g1dfc98e16a
70
+ * Scikit-Learn: 1.6.1
71
+ * Sentence-transformers: 3.1.1
72
+ * Transformers: 4.42.2
73
+ * Numba: 0.60.0
74
+ * Plotly: 6.1.2
75
+ * Python: 3.9.22
config.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "calculate_probabilities": false,
3
+ "language": null,
4
+ "low_memory": false,
5
+ "min_topic_size": 10,
6
+ "n_gram_range": [
7
+ 1,
8
+ 1
9
+ ],
10
+ "nr_topics": "auto",
11
+ "seed_topic_list": null,
12
+ "top_n_words": 10,
13
+ "verbose": false,
14
+ "zeroshot_min_similarity": 0.7,
15
+ "zeroshot_topic_list": null
16
+ }
topic_embeddings.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:285573612da1923445777782408f8e2a36423c3909759bbd12ba58d70021af3d
3
+ size 9304
topics.json ADDED
@@ -0,0 +1,483 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "topic_representations": {
3
+ "-1": [
4
+ [
5
+ "to",
6
+ 0.062480953781426124
7
+ ],
8
+ [
9
+ "my",
10
+ 0.05976113732434668
11
+ ],
12
+ [
13
+ "klarna",
14
+ 0.05727940719918197
15
+ ],
16
+ [
17
+ "for",
18
+ 0.054670834558747855
19
+ ],
20
+ [
21
+ "the",
22
+ 0.047328587214639194
23
+ ],
24
+ [
25
+ "payment",
26
+ 0.04590553230978397
27
+ ],
28
+ [
29
+ "card",
30
+ 0.0431318606480702
31
+ ],
32
+ [
33
+ "but",
34
+ 0.04267127708146233
35
+ ],
36
+ [
37
+ "just",
38
+ 0.038543093523400226
39
+ ],
40
+ [
41
+ "this",
42
+ 0.03846527464754652
43
+ ]
44
+ ],
45
+ "0": [
46
+ [
47
+ "klarna",
48
+ 0.07507421375334357
49
+ ],
50
+ [
51
+ "my",
52
+ 0.06749832637087703
53
+ ],
54
+ [
55
+ "declined",
56
+ 0.06685493723261081
57
+ ],
58
+ [
59
+ "in",
60
+ 0.06019350229402318
61
+ ],
62
+ [
63
+ "for",
64
+ 0.05682281768605802
65
+ ],
66
+ [
67
+ "ive",
68
+ 0.05278677705000323
69
+ ],
70
+ [
71
+ "was",
72
+ 0.04660771634780512
73
+ ],
74
+ [
75
+ "used",
76
+ 0.04325599629327667
77
+ ],
78
+ [
79
+ "before",
80
+ 0.0389699485165667
81
+ ],
82
+ [
83
+ "the",
84
+ 0.03766228874384047
85
+ ]
86
+ ],
87
+ "1": [
88
+ [
89
+ "my",
90
+ 0.10576245511406396
91
+ ],
92
+ [
93
+ "details",
94
+ 0.07259637784624312
95
+ ],
96
+ [
97
+ "klarna",
98
+ 0.07041977759659818
99
+ ],
100
+ [
101
+ "and",
102
+ 0.0611150465282049
103
+ ],
104
+ [
105
+ "call",
106
+ 0.0593308380493404
107
+ ],
108
+ [
109
+ "account",
110
+ 0.0562773485300191
111
+ ],
112
+ [
113
+ "someone",
114
+ 0.05248492331395655
115
+ ],
116
+ [
117
+ "card",
118
+ 0.050080740769583514
119
+ ],
120
+ [
121
+ "to",
122
+ 0.04896930880293832
123
+ ],
124
+ [
125
+ "email",
126
+ 0.04709243986994599
127
+ ]
128
+ ],
129
+ "2": [
130
+ [
131
+ "the",
132
+ 0.09804572351389455
133
+ ],
134
+ [
135
+ "payment",
136
+ 0.09077510430335803
137
+ ],
138
+ [
139
+ "for",
140
+ 0.07627437862590468
141
+ ],
142
+ [
143
+ "to",
144
+ 0.07280736141563629
145
+ ],
146
+ [
147
+ "pay",
148
+ 0.07238444683295255
149
+ ],
150
+ [
151
+ "bought",
152
+ 0.064149074234103
153
+ ],
154
+ [
155
+ "due",
156
+ 0.061310260943393334
157
+ ],
158
+ [
159
+ "my",
160
+ 0.05391331590170644
161
+ ],
162
+ [
163
+ "of",
164
+ 0.052803073510384956
165
+ ],
166
+ [
167
+ "air",
168
+ 0.04875401273928599
169
+ ]
170
+ ],
171
+ "3": [
172
+ [
173
+ "the",
174
+ 0.06629758447130013
175
+ ],
176
+ [
177
+ "store",
178
+ 0.061501153704158755
179
+ ],
180
+ [
181
+ "it",
182
+ 0.059121340343231195
183
+ ],
184
+ [
185
+ "for",
186
+ 0.05907797326297345
187
+ ],
188
+ [
189
+ "ago",
190
+ 0.057510456543095306
191
+ ],
192
+ [
193
+ "refund",
194
+ 0.05651901054710944
195
+ ],
196
+ [
197
+ "back",
198
+ 0.05651901054710944
199
+ ],
200
+ [
201
+ "days",
202
+ 0.05603287284574961
203
+ ],
204
+ [
205
+ "and",
206
+ 0.05352319963725679
207
+ ],
208
+ [
209
+ "to",
210
+ 0.05251375401153196
211
+ ]
212
+ ],
213
+ "4": [
214
+ [
215
+ "the",
216
+ 0.08156485155775096
217
+ ],
218
+ [
219
+ "ago",
220
+ 0.0725683994234641
221
+ ],
222
+ [
223
+ "sneakers",
224
+ 0.06984358149368186
225
+ ],
226
+ [
227
+ "and",
228
+ 0.06512511898179059
229
+ ],
230
+ [
231
+ "shoes",
232
+ 0.06446649957008656
233
+ ],
234
+ [
235
+ "days",
236
+ 0.061865947936947524
237
+ ],
238
+ [
239
+ "adidas",
240
+ 0.05854349038114099
241
+ ],
242
+ [
243
+ "havent",
244
+ 0.05854349038114099
245
+ ],
246
+ [
247
+ "ordered",
248
+ 0.05820298457806822
249
+ ],
250
+ [
251
+ "on",
252
+ 0.05040620516478464
253
+ ]
254
+ ]
255
+ },
256
+ "topics": [
257
+ 1,
258
+ 3,
259
+ 0,
260
+ 1,
261
+ -1,
262
+ 3,
263
+ -1,
264
+ -1,
265
+ -1,
266
+ -1,
267
+ -1,
268
+ -1,
269
+ 2,
270
+ -1,
271
+ -1,
272
+ -1,
273
+ -1,
274
+ -1,
275
+ 0,
276
+ -1,
277
+ 3,
278
+ -1,
279
+ -1,
280
+ -1,
281
+ -1,
282
+ -1,
283
+ -1,
284
+ -1,
285
+ 0,
286
+ 2,
287
+ -1,
288
+ -1,
289
+ -1,
290
+ 3,
291
+ -1,
292
+ 3,
293
+ 3,
294
+ 3,
295
+ 3,
296
+ 0,
297
+ 1,
298
+ 4,
299
+ -1,
300
+ -1,
301
+ 3,
302
+ -1,
303
+ -1,
304
+ -1,
305
+ -1,
306
+ 4,
307
+ 2,
308
+ 2,
309
+ -1,
310
+ -1,
311
+ -1,
312
+ -1,
313
+ 1,
314
+ -1,
315
+ 1,
316
+ 2,
317
+ 4,
318
+ 1,
319
+ 0,
320
+ -1,
321
+ 4,
322
+ -1,
323
+ -1,
324
+ -1,
325
+ 1,
326
+ 1,
327
+ 1,
328
+ 1,
329
+ 1,
330
+ 1,
331
+ 1,
332
+ 1,
333
+ 0,
334
+ 1,
335
+ 1,
336
+ 1,
337
+ -1,
338
+ 1,
339
+ 1,
340
+ 1,
341
+ 1,
342
+ 0,
343
+ 1,
344
+ 1,
345
+ -1,
346
+ -1,
347
+ -1,
348
+ -1,
349
+ 4,
350
+ 3,
351
+ 4,
352
+ 3,
353
+ 3,
354
+ 3,
355
+ 4,
356
+ 3,
357
+ -1,
358
+ -1,
359
+ 3,
360
+ 3,
361
+ 4,
362
+ 4,
363
+ 0,
364
+ 2,
365
+ 2,
366
+ 2,
367
+ 2,
368
+ -1,
369
+ 2,
370
+ 0,
371
+ 0,
372
+ 0,
373
+ 0,
374
+ -1,
375
+ 0,
376
+ 0,
377
+ 0,
378
+ 0,
379
+ 3,
380
+ 0,
381
+ -1,
382
+ 4,
383
+ 4,
384
+ 0,
385
+ 0,
386
+ 0,
387
+ 0,
388
+ 0,
389
+ 0,
390
+ -1,
391
+ 0,
392
+ 0,
393
+ 4,
394
+ 0,
395
+ -1,
396
+ 0,
397
+ -1,
398
+ 0,
399
+ -1,
400
+ 0,
401
+ 0,
402
+ 0,
403
+ 0,
404
+ 0,
405
+ -1,
406
+ 2,
407
+ -1,
408
+ 0,
409
+ 1,
410
+ -1,
411
+ 2,
412
+ -1,
413
+ -1,
414
+ 2,
415
+ -1,
416
+ -1,
417
+ 2,
418
+ 2,
419
+ 2,
420
+ 2,
421
+ 2,
422
+ -1,
423
+ -1,
424
+ 2
425
+ ],
426
+ "topic_sizes": {
427
+ "1": 24,
428
+ "3": 17,
429
+ "0": 34,
430
+ "-1": 62,
431
+ "2": 19,
432
+ "4": 12
433
+ },
434
+ "topic_mapper": [
435
+ [
436
+ -1,
437
+ -1,
438
+ -1,
439
+ -1
440
+ ],
441
+ [
442
+ 0,
443
+ 0,
444
+ 0,
445
+ 3
446
+ ],
447
+ [
448
+ 1,
449
+ 1,
450
+ 1,
451
+ 1
452
+ ],
453
+ [
454
+ 2,
455
+ 2,
456
+ 2,
457
+ 4
458
+ ],
459
+ [
460
+ 3,
461
+ 3,
462
+ 3,
463
+ 2
464
+ ],
465
+ [
466
+ 4,
467
+ 4,
468
+ 4,
469
+ 0
470
+ ]
471
+ ],
472
+ "topic_labels": {
473
+ "-1": "-1_to_my_klarna_for",
474
+ "0": "0_klarna_my_declined_in",
475
+ "1": "1_my_details_klarna_and",
476
+ "2": "2_the_payment_for_to",
477
+ "3": "3_the_store_it_for",
478
+ "4": "4_the_ago_sneakers_and"
479
+ },
480
+ "custom_labels": null,
481
+ "_outliers": 1,
482
+ "topic_aspects": {}
483
+ }