Skip to content

Commit e415c86

Browse files
KDTree example based on weebi Point of Sale anonymized dataset (#260)
* KDTree example based on weebi Point of Sale anonymized dataset
1 parent c6c5289 commit e415c86

9 files changed

+24104
-9
lines changed

example/pos/README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Point of Sale
2+
3+
How to apply [ml_algo](https://pub.dev/packages/ml_algo) on point of sale data (i.e. tickets/invoices/bills) ?
4+
5+
This first __KDTree__ example provides simple customer segmentation based on purchased items.
6+
Using it a business owner can identify customers who bought __similar items__.
7+
While identifying identical invoices is possible with standard _for_ loops,
8+
Only a KDTree algorithm provides enough flexibility to find __similar items__.
9+
10+
```shell
11+
dart example/pos/kd_contacts.dart
12+
```
13+
14+
## Walkthrough
15+
16+
- The business owner selects a customer (e.g. contactId 35, aka Bobby)
17+
- The program finds Bobby's tickets and vectorize their items
18+
- The program filters out Bobby's tickets and vectorize all the items
19+
- For each one of Bobby's tickets, the program find the nearest x3 and save them in a list
20+
- The program selects the top 3 nearest customers based on bought items
21+
22+
## Dataset
23+
24+
- Origin : weebi.com (anonymized)
25+
- Location : West Africa
26+
- Timerange : March 2024 - March 2025
27+
28+
- 59 articles
29+
- 52 contacts (customers)
30+
- 341 tickets

0 commit comments

Comments
 (0)