z-dickson commited on
Commit
d243e2d
1 Parent(s): 877af73
Files changed (3) hide show
  1. README.md +50 -7
  2. config.json +69 -0
  3. tf_model.h5 +3 -0
README.md CHANGED
@@ -1,13 +1,56 @@
 
 
 
 
 
 
 
1
 
2
- This model was trained on UK parliamentary statutory instruments (www.legislation.gov.uk). The model is trained to predict the CAP issue codes of statutory instruments. The model is trained on the titles of ~40k statutory instruments from the UK House of Commons and the Scottish Parliament.
 
3
 
4
- Training data available at: https://comparativeagendas.s3.amazonaws.com/datasetfiles/uk_statutoryinstruments_v1_1.csv
5
 
6
- All statutory instruments are available at: https://www.legislation.gov.uk/uksi
 
 
 
 
 
 
7
 
8
- Comparative Agendas Project codes: https://www.comparativeagendas.net/pages/master-codebook
9
 
 
10
 
11
- ---
12
- license: afl-3.0
13
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - generated_from_keras_callback
4
+ model-index:
5
+ - name: CAP_coded_UK_statutory_instruments
6
+ results: []
7
+ ---
8
 
9
+ <!-- This model card has been generated automatically according to the information Keras had access to. You should
10
+ probably proofread and complete it, then remove this comment. -->
11
 
12
+ # CAP_coded_UK_statutory_instruments
13
 
14
+ This model was trained from scratch on an unknown dataset.
15
+ It achieves the following results on the evaluation set:
16
+ - Train Loss: 0.1188
17
+ - Train Sparse Categorical Accuracy: 0.9688
18
+ - Validation Loss: 0.2032
19
+ - Validation Sparse Categorical Accuracy: 0.9556
20
+ - Epoch: 2
21
 
22
+ ## Model description
23
 
24
+ More information needed
25
 
26
+ ## Intended uses & limitations
27
+
28
+ More information needed
29
+
30
+ ## Training and evaluation data
31
+
32
+ More information needed
33
+
34
+ ## Training procedure
35
+
36
+ ### Training hyperparameters
37
+
38
+ The following hyperparameters were used during training:
39
+ - optimizer: {'name': 'Adam', 'learning_rate': 5e-05, 'decay': 0.0, 'beta_1': 0.9, 'beta_2': 0.999, 'epsilon': 1e-07, 'amsgrad': False}
40
+ - training_precision: float32
41
+
42
+ ### Training results
43
+
44
+ | Train Loss | Train Sparse Categorical Accuracy | Validation Loss | Validation Sparse Categorical Accuracy | Epoch |
45
+ |:----------:|:---------------------------------:|:---------------:|:--------------------------------------:|:-----:|
46
+ | 0.2167 | 0.9474 | 0.2351 | 0.9444 | 0 |
47
+ | 0.1539 | 0.9592 | 0.2076 | 0.9536 | 1 |
48
+ | 0.1188 | 0.9688 | 0.2032 | 0.9556 | 2 |
49
+
50
+
51
+ ### Framework versions
52
+
53
+ - Transformers 4.19.2
54
+ - TensorFlow 2.8.2
55
+ - Datasets 2.2.2
56
+ - Tokenizers 0.12.1
config.json ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "/content/drive/MyDrive/NLP_models/UK_statutory_instruments_normalised-bert-cased.t5",
3
+ "architectures": [
4
+ "BertForSequenceClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "classifier_dropout": null,
8
+ "gradient_checkpointing": false,
9
+ "hidden_act": "gelu",
10
+ "hidden_dropout_prob": 0.1,
11
+ "hidden_size": 768,
12
+ "id2label": {
13
+ "0": "LABEL_0",
14
+ "1": "LABEL_1",
15
+ "2": "LABEL_2",
16
+ "3": "LABEL_3",
17
+ "4": "LABEL_4",
18
+ "5": "LABEL_5",
19
+ "6": "LABEL_6",
20
+ "7": "LABEL_7",
21
+ "8": "LABEL_8",
22
+ "9": "LABEL_9",
23
+ "10": "LABEL_10",
24
+ "11": "LABEL_11",
25
+ "12": "LABEL_12",
26
+ "13": "LABEL_13",
27
+ "14": "LABEL_14",
28
+ "15": "LABEL_15",
29
+ "16": "LABEL_16",
30
+ "17": "LABEL_17",
31
+ "18": "LABEL_18",
32
+ "19": "LABEL_19"
33
+ },
34
+ "initializer_range": 0.02,
35
+ "intermediate_size": 3072,
36
+ "label2id": {
37
+ "LABEL_0": 0,
38
+ "LABEL_1": 1,
39
+ "LABEL_10": 10,
40
+ "LABEL_11": 11,
41
+ "LABEL_12": 12,
42
+ "LABEL_13": 13,
43
+ "LABEL_14": 14,
44
+ "LABEL_15": 15,
45
+ "LABEL_16": 16,
46
+ "LABEL_17": 17,
47
+ "LABEL_18": 18,
48
+ "LABEL_19": 19,
49
+ "LABEL_2": 2,
50
+ "LABEL_3": 3,
51
+ "LABEL_4": 4,
52
+ "LABEL_5": 5,
53
+ "LABEL_6": 6,
54
+ "LABEL_7": 7,
55
+ "LABEL_8": 8,
56
+ "LABEL_9": 9
57
+ },
58
+ "layer_norm_eps": 1e-12,
59
+ "max_position_embeddings": 512,
60
+ "model_type": "bert",
61
+ "num_attention_heads": 12,
62
+ "num_hidden_layers": 12,
63
+ "pad_token_id": 0,
64
+ "position_embedding_type": "absolute",
65
+ "transformers_version": "4.19.2",
66
+ "type_vocab_size": 2,
67
+ "use_cache": true,
68
+ "vocab_size": 28996
69
+ }
tf_model.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:161aeefafa77e085d8ab31ebaf7ff6d1d3052bf335e27bb785d3f169f159c594
3
+ size 433590688