Datasets:

Modalities:
Text
Formats:
webdataset
ArXiv:
Libraries:
Datasets
WebDataset
License:
wolgraff commited on
Commit
a22155d
1 Parent(s): b565927

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +132 -0
README.md CHANGED
@@ -11,3 +11,135 @@ configs:
11
  - config_name: targets
12
  data_files: "targets.tar.gz"
13
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  - config_name: targets
12
  data_files: "targets.tar.gz"
13
  ---
14
+ # Intro
15
+ Predicting a customer's propensity to purchase a product is an important task for many companies, helping to:
16
+ - assess the customer's needs, form their product profile;
17
+ - improve the quality of recommendations, form package offers, form individual conditions;
18
+ - correctly form a communication strategy with the customer
19
+ - 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).
20
+
21
+ To solve such problems, various data about the customer are usually used:
22
+ - customer profile;
23
+ - history of previous purchases and communications;
24
+ - transactional activity;
25
+ - geo-information about places of permanent or temporary residence;
26
+ - etc.;
27
+
28
+ 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.
29
+
30
+ # Data
31
+ 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.
32
+
33
+ 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
34
+
35
+ ```
36
+ client_split Desc: Splitting clients into folds
37
+ |-- client_id: str Desc: Client id
38
+ |-- fold: int
39
+
40
+ detail
41
+ |-- dialog Desc: Dialogue embeddings
42
+ |-- client_id: str Desc: Client id
43
+ |-- event_time: timestamp Desc: Dialog's date
44
+ |--embedding: array float Desc: Dialog's embeddings
45
+ |-- geo Desc: Geo activity
46
+ |-- client_id: str Desc: Client id
47
+ |-- event_time: timestamp Desc: Event datetime
48
+ |-- fold: int
49
+ |-- geohash_4: int Desc: Geohash level 4
50
+ |-- geohash_5: int Desc: Geohash level 5
51
+ |-- geohash_6: int Desc: Geohash level 6
52
+ |-- trx Desc: Transactional activity
53
+ |-- client_id: str Desc: Client id
54
+ |-- event_time: timestamp Desc: Transaction's date
55
+ |-- amount: float Desc: Transaction's amount
56
+ |-- fold: int
57
+ |-- event_type: int Desc: Transaction's type
58
+ |-- event_subtype: int Desc: Clarifying the transaction type
59
+ |-- currency: int Desc: Currency
60
+ |-- src_type11: int Desc: Feature 1 for sender
61
+ |-- src_type12: int Desc: Clarifying feature 1 for sender
62
+ |-- dst_type11: int Desc: Feature 1 for contractor
63
+ |-- dst_type12: int Desc: Clarifying feature 1 for contractor
64
+ |-- src_type21: int Desc: Feature 2 for sender
65
+ |-- src_type22: int Desc: Clarifying feature 2 for sender
66
+ |-- src_type31: int Desc: Feature 3 for sender
67
+ |-- src_type32: int Desc: Clarifying feature 3 for sender
68
+
69
+ ptls Desc: Data is similar with detail but in pytorch-lifestream format https://github.com/dllllb/pytorch-lifestream
70
+ |-- dialog Desc: Dialogue embeddings
71
+ |-- client_id: str Desc: Client id
72
+ |-- event_time: Array[timestamp] Desc: Dialog's date
73
+ |-- embedding: Array[float] Desc: Dialog's embedding
74
+ |-- geo Desc: Geo activity
75
+ |-- client_id: str Desc: Client id
76
+ |-- event_time: Array[timestamp] Desc: Event datetime
77
+ |-- fold: int
78
+ |-- geohash_4: Array[int] Desc: Geohash level 4
79
+ |-- geohash_5: Array[int] Desc: Geohash level 5
80
+ |-- geohash_6: Array[int] Desc: Geohash level 6
81
+ |-- trx Desc: Transactional activity
82
+ |-- client_id: str Desc: Client id
83
+ |-- event_time: Array[timestamp] Desc: Transaction's date
84
+ |-- amount: Array[float] Desc: Transaction's amount
85
+ |-- fold: int
86
+ |-- event_type: Array[int] Desc: Transaction's type
87
+ |-- event_subtype: Array[int] Desc: Clarifying the transaction type
88
+ |-- currency: Array[int] Desc: Currency
89
+ |-- src_type11: Array[int] Desc: Feature 1 for sender
90
+ |-- src_type12: Array[int] Desc: Clarifying feature 1 for sender
91
+ |-- dst_type11: Array[int] Desc: Feature 1 for contractor
92
+ |-- dst_type12: Array[int] Desc: Clarifying feature 1 for contractor
93
+ |-- src_type21: Array[int] Desc: Feature 2 for sender
94
+ |-- src_type22: Array[int] Desc: Clarifying feature 2 for sender
95
+ |-- src_type31: Array[int] Desc: Feature 3 for sender
96
+ |-- src_type32: Array[int] Desc: Clarifying feature 3 for sender
97
+
98
+ targets
99
+ |-- mon: str Desc: Reporting month
100
+ |-- target_1: int Desc: Mark of product issuance in the first reporting month
101
+ |-- target_2: int Desc: Mark of product issuance in the second reporting month
102
+ |-- target_3: int Desc: Mark of product issuance in the third reporting month
103
+ |-- target_4: int Desc: Mark of product issuance in the fourth reporting month
104
+ |-- trans_count: int Desc: Number of transactions
105
+ |-- diff_trans_date: int Desc: Time difference between transactions
106
+ |-- client_id: str Desc: Client id
107
+ ```
108
+
109
+ # Load with Datasets
110
+
111
+ ## Download a single file
112
+ Download a single file with datasets
113
+ ```python
114
+ from datasets import load_dataset
115
+
116
+ dataset = load_dataset("ai-lab/MBD", 'client_split')
117
+ ```
118
+
119
+ Download a single file with huggingface_hub
120
+ ```python
121
+ from huggingface_hub import hf_hub_download
122
+
123
+ hf_hub_download(repo_id="ai-lab/MBD", filename="client_split.tar.gz", repo_type="dataset")
124
+
125
+ # By default dataset is saved in '~/.cache/huggingface/hub/datasets--ai-lab--MBD/snapshots/<hash>/'
126
+ # To overwrite this behavior try to use local_dir
127
+
128
+ ```
129
+ ## Download entire repository
130
+ Download entire repository with datasets
131
+ ```python
132
+ from datasets import load_dataset
133
+
134
+ dataset = load_dataset("ai-lab/MBD")
135
+ ```
136
+
137
+ Download entire repository with huggingface_hub
138
+ ```python
139
+ from huggingface_hub import snapshot_download
140
+
141
+ snapshot_download(repo_id="ai-lab/MBD")
142
+
143
+ # By default dataset is saved in '~/.cache/huggingface/hub/datasets--ai-lab--MBD/snapshots/<hash>/'
144
+ # To overwrite this behavior try to use local_dir
145
+ ```