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 +2 -2
- BelgoClassifier.mlpackage/Data/com.apple.CoreML/weights/weight.bin +2 -2
- BelgoClassifier.mlpackage/Manifest.json +3 -3
- BelgoClassifier_v4.5.0.mlmodelc.zip → BelgoClassifier_v4.6.1.mlmodelc.zip +2 -2
- README.md +34 -63
- model_manifest.json +6 -6
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:
|
| 3 |
-
size
|
|
|
|
| 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:
|
| 3 |
-
size
|
|
|
|
| 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 |
-
"
|
| 5 |
"author": "com.apple.CoreML",
|
| 6 |
"description": "CoreML Model Weights",
|
| 7 |
"name": "weights",
|
| 8 |
"path": "com.apple.CoreML/weights"
|
| 9 |
},
|
| 10 |
-
"
|
| 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": "
|
| 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:
|
| 3 |
-
size
|
|
|
|
| 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 |
-
-
|
| 6 |
-
-
|
| 7 |
-
-
|
| 8 |
-
language:
|
| 9 |
-
- nl
|
| 10 |
-
- fr
|
| 11 |
-
- en
|
| 12 |
---
|
| 13 |
|
| 14 |
-
# BelgoClassifier
|
| 15 |
|
| 16 |
-
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
-
##
|
| 19 |
|
| 20 |
-
|
| 21 |
-
- **
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
|
|
|
| 25 |
|
| 26 |
-
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
-
|
| 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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
|
| 46 |
-
|
| 47 |
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 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.
|
| 3 |
"min_app_version": "1.0.0",
|
| 4 |
-
"released_at": "2026-
|
| 5 |
-
"accuracy": 0.
|
| 6 |
-
"download_url": "https://huggingface.co/githubDCS/belgo-classifier/resolve/main/BelgoClassifier_v4.
|
| 7 |
-
"size_mb": 0.
|
| 8 |
-
"changelog": "Retrained on
|
| 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 |
}
|