Datasets:

ArXiv:
License:
wolgraff commited on
Commit
27463e4
1 Parent(s): 040c4a3

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +152 -3
README.md CHANGED
@@ -1,3 +1,152 @@
1
- ---
2
- license: cc-by-4.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ---
3
+ license: cc-by-4.0
4
+ ---
5
+ # Intro
6
+ Predicting a customer's propensity to purchase a product is an important task for many companies, helping to:
7
+ - assess the customer's needs, form their product profile;
8
+ - improve the quality of recommendations, form package offers, form individual conditions;
9
+ - correctly form a communication strategy with the customer
10
+ - estimate the income that the customer can bring to the company in the future, based on the profitability of the products in which he is interested (Customer lifetime value - CLTV).
11
+
12
+ To solve such problems, various data about the customer are usually used:
13
+ - customer profile;
14
+ - history of previous purchases and communications;
15
+ - transactional activity;
16
+ - geo-information about places of permanent or temporary residence;
17
+ - etc.;
18
+
19
+ Of particular importance are the data characterizing the patterns of client behavior (chains of events), as they help to understand the patterns in the client's actions, to assess the dynamics of changes in his behavior. The combined use of behavioral data from various sources helps to more fully describe the client in terms of predicting his needs, which, in turn, creates the task of the most effective combination of various modalities to improve the performance and quality of the developed model.
20
+
21
+ # Data
22
+ The dataset consists of anonymized historical data, which contains the following information: transaction activity (transactions), dialog embeddings (dialogs), geo-activity (geostream) for some of the Bank's clients over 12 months.
23
+
24
+ Objective: To predict for each user the taking/not taking of each of the four products within a month after the reporting date, historical data for them is in targets
25
+
26
+ ```
27
+ client_split Desc: Splitting clients into folds
28
+ |-- client_id: str Desc: Client id
29
+ |-- fold: int
30
+
31
+ detail
32
+ |-- dialog Desc: Dialogue embeddings
33
+ |-- client_id: str Desc: Client id
34
+ |-- event_time: timestamp Desc: Dialog's date
35
+ |--embedding: array float Desc: Dialog's embeddings
36
+ |-- geo Desc: Geo activity
37
+ |-- client_id: str Desc: Client id
38
+ |-- event_time: timestamp Desc: Event datetime
39
+ |-- fold: int
40
+ |-- geohash_4: int Desc: Geohash level 4
41
+ |-- geohash_5: int Desc: Geohash level 5
42
+ |-- geohash_6: int Desc: Geohash level 6
43
+ |-- trx Desc: Transactional activity
44
+ |-- client_id: str Desc: Client id
45
+ |-- event_time: timestamp Desc: Transaction's date
46
+ |-- amount: float Desc: Transaction's amount
47
+ |-- fold: int
48
+ |-- event_type: int Desc: Transaction's type
49
+ |-- event_subtype: int Desc: Clarifying the transaction type
50
+ |-- currency: int Desc: Currency
51
+ |-- src_type11: int Desc: Feature 1 for sender
52
+ |-- src_type12: int Desc: Clarifying feature 1 for sender
53
+ |-- dst_type11: int Desc: Feature 1 for contractor
54
+ |-- dst_type12: int Desc: Clarifying feature 1 for contractor
55
+ |-- src_type21: int Desc: Feature 2 for sender
56
+ |-- src_type22: int Desc: Clarifying feature 2 for sender
57
+ |-- src_type31: int Desc: Feature 3 for sender
58
+ |-- src_type32: int Desc: Clarifying feature 3 for sender
59
+
60
+ ptls Desc: Data is similar with detail but in pytorch-lifestream format https://github.com/dllllb/pytorch-lifestream
61
+ |-- dialog Desc: Dialogue embeddings
62
+ |-- client_id: str Desc: Client id
63
+ |-- event_time: Array[timestamp] Desc: Dialog's date
64
+ |-- embedding: Array[float] Desc: Dialog's embedding
65
+ |-- geo Desc: Geo activity
66
+ |-- client_id: str Desc: Client id
67
+ |-- event_time: Array[timestamp] Desc: Event datetime
68
+ |-- fold: int
69
+ |-- geohash_4: Array[int] Desc: Geohash level 4
70
+ |-- geohash_5: Array[int] Desc: Geohash level 5
71
+ |-- geohash_6: Array[int] Desc: Geohash level 6
72
+ |-- trx Desc: Transactional activity
73
+ |-- client_id: str Desc: Client id
74
+ |-- event_time: Array[timestamp] Desc: Transaction's date
75
+ |-- amount: Array[float] Desc: Transaction's amount
76
+ |-- fold: int
77
+ |-- event_type: Array[int] Desc: Transaction's type
78
+ |-- event_subtype: Array[int] Desc: Clarifying the transaction type
79
+ |-- currency: Array[int] Desc: Currency
80
+ |-- src_type11: Array[int] Desc: Feature 1 for sender
81
+ |-- src_type12: Array[int] Desc: Clarifying feature 1 for sender
82
+ |-- dst_type11: Array[int] Desc: Feature 1 for contractor
83
+ |-- dst_type12: Array[int] Desc: Clarifying feature 1 for contractor
84
+ |-- src_type21: Array[int] Desc: Feature 2 for sender
85
+ |-- src_type22: Array[int] Desc: Clarifying feature 2 for sender
86
+ |-- src_type31: Array[int] Desc: Feature 3 for sender
87
+ |-- src_type32: Array[int] Desc: Clarifying feature 3 for sender
88
+
89
+ targets
90
+ |-- mon: str Desc: Reporting month
91
+ |-- target_1: int Desc: Mark of product issuance in the first reporting month
92
+ |-- target_2: int Desc: Mark of product issuance in the second reporting month
93
+ |-- target_3: int Desc: Mark of product issuance in the third reporting month
94
+ |-- target_4: int Desc: Mark of product issuance in the fourth reporting month
95
+ |-- trans_count: int Desc: Number of transactions
96
+ |-- diff_trans_date: int Desc: Time difference between transactions
97
+ |-- client_id: str Desc: Client id
98
+ ```
99
+
100
+ # Load dataset
101
+
102
+ ## Download a single file
103
+ Download a single file with datasets
104
+ ```python
105
+ from datasets import load_dataset
106
+
107
+ dataset = load_dataset("ai-lab/MBD", 'client_split')
108
+ ```
109
+
110
+ Download a single file with huggingface_hub
111
+ ```python
112
+ from huggingface_hub import hf_hub_download
113
+
114
+ hf_hub_download(repo_id="ai-lab/MBD", filename="client_split.tar.gz", repo_type="dataset")
115
+
116
+ # By default dataset is saved in '~/.cache/huggingface/hub/datasets--ai-lab--MBD/snapshots/<hash>/'
117
+ # To overwrite this behavior try to use local_dir
118
+
119
+ ```
120
+ ## Download entire repository
121
+ Download entire repository with datasets
122
+ ```python
123
+ from datasets import load_dataset
124
+
125
+ dataset = load_dataset("ai-lab/MBD")
126
+ ```
127
+
128
+ Download entire repository with huggingface_hub
129
+ ```python
130
+ from huggingface_hub import snapshot_download
131
+
132
+ snapshot_download(repo_id="ai-lab/MBD")
133
+
134
+ # By default dataset is saved in '~/.cache/huggingface/hub/datasets--ai-lab--MBD/snapshots/<hash>/'
135
+ # To overwrite this behavior try to use local_dir
136
+ ```
137
+
138
+ # Citation
139
+ We have a [paper](https://arxiv.org/abs/2002.08232) you can cite it:
140
+ ```
141
+ @inproceedings{
142
+ Babaev_2022, series={SIGMOD/PODS ’22},
143
+ title={CoLES: Contrastive Learning for Event Sequences with Self-Supervision},
144
+ url={http://dx.doi.org/10.1145/3514221.3526129},
145
+ DOI={10.1145/3514221.3526129},
146
+ booktitle={Proceedings of the 2022 International Conference on Management of Data},
147
+ publisher={ACM},
148
+ author={Babaev, Dmitrii and Ovsov, Nikita and Kireev, Ivan and Ivanova, Maria and Gusev, Gleb and Nazarov, Ivan and Tuzhilin, Alexander},
149
+ year={2022},
150
+ month=jun, collection={SIGMOD/PODS ’22}
151
+ }
152
+ ```