githubDCS commited on
Commit
e5bb8a8
·
verified ·
1 Parent(s): f04c08d

v4.6.1: audited real data, NLEmbedding 512-dim; remove defective MiniLM v4.5.0

Browse files
BelgoClassifier.mlpackage/Data/com.apple.CoreML/model.mlmodel CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:5a51c134704e9c636ef13691c26046c6c901175fd3eb582d561a397a26ef7f7b
3
- size 4035
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f913ed77d7e3f937616842fa484f1380ecbf1fe959fcc8dda5691315a982a9d5
3
+ size 7353
BelgoClassifier.mlpackage/Data/com.apple.CoreML/weights/weight.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:7f26080c13cf52a597d0a9688b2d7286632970c5783b7bc2bfa31146cf4dd1a7
3
- size 272132
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:80854ba9f26f940669d959c94e98339b94cb9595de9455977090cbe9e830cf43
3
+ size 869764
BelgoClassifier.mlpackage/Manifest.json CHANGED
@@ -1,18 +1,18 @@
1
  {
2
  "fileFormatVersion": "1.0.0",
3
  "itemInfoEntries": {
4
- "CD82C1A0-5651-4C22-8E88-9DBE6295C60C": {
5
  "author": "com.apple.CoreML",
6
  "description": "CoreML Model Weights",
7
  "name": "weights",
8
  "path": "com.apple.CoreML/weights"
9
  },
10
- "FF3075AB-1A30-4FAB-9ABA-AD94DB2C6FF9": {
11
  "author": "com.apple.CoreML",
12
  "description": "CoreML Model Specification",
13
  "name": "model.mlmodel",
14
  "path": "com.apple.CoreML/model.mlmodel"
15
  }
16
  },
17
- "rootModelIdentifier": "FF3075AB-1A30-4FAB-9ABA-AD94DB2C6FF9"
18
  }
 
1
  {
2
  "fileFormatVersion": "1.0.0",
3
  "itemInfoEntries": {
4
+ "4588435D-4AEC-4B65-A3DF-1DAEBC543087": {
5
  "author": "com.apple.CoreML",
6
  "description": "CoreML Model Weights",
7
  "name": "weights",
8
  "path": "com.apple.CoreML/weights"
9
  },
10
+ "80326F21-FE20-4042-A4D6-CF9B9607C139": {
11
  "author": "com.apple.CoreML",
12
  "description": "CoreML Model Specification",
13
  "name": "model.mlmodel",
14
  "path": "com.apple.CoreML/model.mlmodel"
15
  }
16
  },
17
+ "rootModelIdentifier": "80326F21-FE20-4042-A4D6-CF9B9607C139"
18
  }
BelgoClassifier_v4.5.0.mlmodelc.zip → BelgoClassifier_v4.6.1.mlmodelc.zip RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:0a2fb8fdc4c09a2c824eccb6fc0ccae639535b85727a0c14374c71239b87f045
3
- size 254212
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b9bbb7b3f0b5c2911c7bd853143e475b0320ded8b166bdcb4bd561da62214fe6
3
+ size 803118
README.md CHANGED
@@ -1,76 +1,47 @@
1
  ---
2
  license: mit
3
  tags:
4
- - coreml
5
- - transaction-classification
6
- - belgian-finance
7
- - ios
8
- language:
9
- - nl
10
- - fr
11
- - en
12
  ---
13
 
14
- # BelgoClassifier - Belgian Transaction Categorizer
15
 
16
- CoreML model for categorizing Belgian bank transactions into 15 categories.
 
 
 
17
 
18
- ## Model Details
19
 
20
- - **Version:** 4.5.0
21
- - **Accuracy:** 86.7%
22
- - **Framework:** CoreML (iOS/macOS)
23
- - **Input:** 384-dimensional embedding vector
24
- - **Output:** 15-class probability distribution
 
25
 
26
- ## Categories
 
 
 
27
 
28
- 1. groceries - Supermarkets, food stores
29
- 2. restaurants - Restaurants, fast food, delivery
30
- 3. transport - Public transport, fuel, parking
31
- 4. utilities - Electricity, gas, water
32
- 5. telecom - Phone, internet providers
33
- 6. healthcare - Medical, pharmacy, insurance
34
- 7. insurance - All insurance types
35
- 8. housing - Rent, mortgage
36
- 9. entertainment - Cinema, events, sports
37
- 10. shopping - Retail, online shopping
38
- 11. subscriptions - Streaming, software
39
- 12. income - Salary, refunds
40
- 13. transfers - Bank transfers
41
- 14. cash - ATM withdrawals
42
- 15. other - Uncategorized
43
 
44
- ## Usage in iOS
 
 
 
 
 
45
 
46
- The model expects a 384-dimensional embedding vector (from sentence-transformers/all-MiniLM-L6-v2 or Apple's NLEmbedding).
47
 
48
- ```swift
49
- // Load model
50
- let model = try MLModel(contentsOf: modelURL)
51
-
52
- // Create input
53
- let embedding = getEmbedding(for: transactionText) // 384-dim vector
54
- let input = try MLDictionaryFeatureProvider(dictionary: ["embeddings": embedding])
55
-
56
- // Predict
57
- let output = try model.prediction(from: input)
58
- let probabilities = output.featureValue(for: "probabilities")
59
- ```
60
-
61
- ## Training
62
-
63
- Trained on synthetic Belgian transaction data including:
64
- - Belgian supermarkets (Colruyt, Delhaize, Carrefour, etc.)
65
- - Belgian banks and insurers
66
- - Belgian telecom providers
67
- - Common Belgian merchants
68
-
69
- ## License
70
-
71
- MIT License - Free to use in commercial applications.
72
-
73
- ## Links
74
-
75
- - App: BelgoBudgetto (iOS)
76
- - Training code: Private repository
 
1
  ---
2
  license: mit
3
  tags:
4
+ - coreml
5
+ - text-classification
6
+ - finance
7
+ - belgium
 
 
 
 
8
  ---
9
 
10
+ # BelgoClassifier Belgian bank-transaction categorizer (Core ML)
11
 
12
+ **⚠️ Archive channel.** This repository is a public archive of the Stay Steady
13
+ app's on-device transaction classifier. The app itself distributes models via
14
+ its own backend — files here are for reference and research, not consumed by
15
+ any released app.
16
 
17
+ ## Current model: v4.6.1 (2026-07-20)
18
 
19
+ `BelgoClassifier_v4.6.1.mlmodelc.zip` — classifier head over **Apple
20
+ NLEmbedding sentence embeddings (512-dim, English)**. 34 spending categories.
21
+ Trained on 21,565 samples: synthetic Belgian transaction text plus manually
22
+ audited real bank transactions (personal/P2P counterparties excluded, merchant
23
+ names canonicalized branch towns, store numbers and card fragments stripped).
24
+ Training accuracy 99.38%.
25
 
26
+ **Runtime contract:** embed input text with
27
+ `NLEmbedding.sentenceEmbedding(for: .english)` (512-dim), UPPERCASE,
28
+ diacritics folded, merchant canonicalized. Input tensor `embeddings`
29
+ `[1, 512] Float32`; output `probabilities` over 34 classes.
30
 
31
+ ## ⚠️ v4.5.0 is defective do not use
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
 
33
+ `BelgoClassifier_v4.5.0.mlmodelc.zip` has been **removed** from this
34
+ repository. It was trained by a different pipeline against
35
+ `all-MiniLM-L6-v2` embeddings (**384-dim**) and therefore cannot score
36
+ NLEmbedding vectors at all; it also measured only 86.7% validation accuracy
37
+ and carried a merchant+location labeling bias. If you have a cached copy,
38
+ discard it.
39
 
40
+ ## Version history
41
 
42
+ | Version | Embeddings | Notes |
43
+ |---|---|---|
44
+ | 4.6.1 | NLEmbedding 512 | Audited real data, canonicalized merchants — current |
45
+ | ~~4.5.0~~ | MiniLM 384 | **Defective, removed** (wrong pipeline, 86.7%) |
46
+ | 2.2.0 | NLEmbedding 512 | First NLEmbedding retrain |
47
+ | 2.1.0 / 1.0.0 | | Early iterations, archive only |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
model_manifest.json CHANGED
@@ -1,9 +1,9 @@
1
  {
2
- "latest_version": "4.5.0",
3
  "min_app_version": "1.0.0",
4
- "released_at": "2026-06-28",
5
- "accuracy": 0.867,
6
- "download_url": "https://huggingface.co/githubDCS/belgo-classifier/resolve/main/BelgoClassifier_v4.5.0.mlmodelc.zip",
7
- "size_mb": 0.24,
8
- "changelog": "Retrained on 32 community merchant corrections (consensus gate removed; merchant-only filter keeps savings, drops person/peer counterparties). Val accuracy 86.7% (34 classes)."
9
  }
 
1
  {
2
+ "latest_version": "4.6.1",
3
  "min_app_version": "1.0.0",
4
+ "released_at": "2026-07-20",
5
+ "accuracy": 0.9938,
6
+ "download_url": "https://huggingface.co/githubDCS/belgo-classifier/resolve/main/BelgoClassifier_v4.6.1.mlmodelc.zip",
7
+ "size_mb": 0.77,
8
+ "changelog": "Retrained on audited real Belgian transactions (1221-row label audit, Fortis PDF data, merchant canonicalization). NLEmbedding 512-dim. Supersedes the defective v4.5.0 MiniLM artifact."
9
  }