Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- legacy/_transformed/rel-amazon/README.md +41 -0
- legacy/_transformed/rel-amazon/manifest.yaml +20 -0
- legacy/_transformed/rel-amazon/schema.svg +97 -0
- legacy/_transformed/rel-amazon/tasks/item-churn/manifest.yaml +36 -0
- legacy/_transformed/rel-amazon/tasks/item-ltv/manifest.yaml +26 -0
- legacy/_transformed/rel-amazon/tasks/review-rating/manifest.yaml +12 -0
- legacy/_transformed/rel-amazon/tasks/user-churn/manifest.yaml +36 -0
- legacy/_transformed/rel-amazon/tasks/user-item-purchase/manifest.yaml +30 -0
- legacy/_transformed/rel-amazon/tasks/user-item-rate/manifest.yaml +32 -0
- legacy/_transformed/rel-amazon/tasks/user-item-review/manifest.yaml +32 -0
- legacy/_transformed/rel-amazon/tasks/user-ltv/manifest.yaml +39 -0
- legacy/_transformed/rel-avito/README.md +39 -0
- legacy/_transformed/rel-avito/db/Category.parquet +3 -0
- legacy/_transformed/rel-avito/db/PhoneRequestsStream.parquet +3 -0
- legacy/_transformed/rel-avito/db/SearchInfo.parquet +3 -0
- legacy/_transformed/rel-avito/db/VisitStream.parquet +3 -0
- legacy/_transformed/rel-avito/manifest.yaml +49 -0
- legacy/_transformed/rel-avito/schema.svg +281 -0
- legacy/_transformed/rel-avito/tasks/ad-ctr/val.parquet +3 -0
- legacy/_transformed/rel-avito/tasks/searchinfo-isuserloggedon/train.parquet +3 -0
- legacy/_transformed/rel-avito/tasks/searchstream-click/test.parquet +3 -0
- legacy/_transformed/rel-avito/tasks/user-clicks/train.parquet +3 -0
- legacy/_transformed/rel-avito/tasks/user-visits/train.parquet +3 -0
- legacy/_transformed/rel-hm/README.md +37 -0
- legacy/_transformed/rel-hm/db/customer.parquet +3 -0
- legacy/_transformed/rel-hm/manifest.yaml +20 -0
- legacy/_transformed/rel-hm/schema.svg +185 -0
- legacy/_transformed/rel-hm/tasks/user-item-purchase/train.parquet +3 -0
- legacy/_transformed/rel-stack/README.md +38 -0
- legacy/_transformed/rel-stack/db/comments.parquet +3 -0
- legacy/_transformed/rel-stack/db/posts.parquet +3 -0
- legacy/_transformed/rel-stack/db/votes.parquet +3 -0
- legacy/_transformed/rel-stack/manifest.yaml +45 -0
- legacy/_transformed/rel-stack/schema.svg +305 -0
- legacy/_transformed/rel-stack/tasks/post-post-related/val.parquet +3 -0
- legacy/_transformed/rel-stack/tasks/user-badge/train.parquet +3 -0
- legacy/_transformed/rel-stack/tasks/user-badge/val.parquet +3 -0
- legacy/_transformed/rel-stack/tasks/user-post-comment/val.parquet +3 -0
- legacy/_transformed/rel-trial/README.md +42 -0
- legacy/_transformed/rel-trial/db/outcome_analyses.parquet +3 -0
- legacy/_transformed/rel-trial/manifest.yaml +81 -0
- legacy/_transformed/rel-trial/schema.svg +729 -0
- legacy/_transformed/rel-trial/tasks/eligibilities-child/manifest.yaml +22 -0
- legacy/_transformed/rel-trial/tasks/site-sponsor-run/manifest.yaml +24 -0
- legacy/_transformed/rel-trial/tasks/site-success/train.parquet +3 -0
- legacy/_transformed/rel-trial/tasks/studies-enrollment/manifest.yaml +7 -0
- legacy/rel-amazon/column_index.json +1 -1
- legacy/rel-amazon/meta.json +3 -42
- legacy/rel-amazon/offsets.rkyv +2 -2
- legacy/rel-amazon/table_info.json +1 -1
legacy/_transformed/rel-amazon/README.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# rel-amazon
|
| 2 |
+
|
| 3 |
+
Amazon product reviews: customers, products, and time-stamped reviews and ratings across the Amazon catalog.
|
| 4 |
+
|
| 5 |
+
## Schema
|
| 6 |
+
|
| 7 |
+

|
| 8 |
+
|
| 9 |
+
## Tasks
|
| 10 |
+
|
| 11 |
+
| task | kind | type | description |
|
| 12 |
+
|---|---|---|---|
|
| 13 |
+
| `item-churn` | forecast | binary_classification | Churn for a product is 1 if the product recieves at least one review in the time window, else 0. |
|
| 14 |
+
| `item-ltv` | forecast | regression | LTV (life-time value) for a product is the numer of times the product is purchased in the time window multiplied by price. |
|
| 15 |
+
| `review-rating` | autocomplete | regression | Predict the `rating` column of the `review` table. |
|
| 16 |
+
| `user-churn` | forecast | binary_classification | Churn for a customer is 1 if the customer does not review any product in the time window, else 0. |
|
| 17 |
+
| `user-item-purchase` | forecast | recommendation | Predict the list of distinct items each customer will purchase in the next two years. |
|
| 18 |
+
| `user-item-rate` | forecast | recommendation | Predict the list of distinct items each customer will purchase and give a 5 star review in the next two years. |
|
| 19 |
+
| `user-item-review` | forecast | recommendation | Predict the list of distinct items each customer will purchase and give a detailed review in the next two years. |
|
| 20 |
+
| `user-ltv` | forecast | regression | LTV (life-time value) for a customer is the sum of prices of products that the customer reviews in the time window. |
|
| 21 |
+
|
| 22 |
+
## Loading
|
| 23 |
+
|
| 24 |
+
```python
|
| 25 |
+
import relbench
|
| 26 |
+
ds = relbench.load_dataset("relbench/v1/rel-amazon")
|
| 27 |
+
task = relbench.load_task("relbench/v1/rel-amazon", "<task>")
|
| 28 |
+
```
|
| 29 |
+
|
| 30 |
+
## Citation
|
| 31 |
+
|
| 32 |
+
Please cite [RelBench](https://proceedings.neurips.cc/paper_files/paper/2024/hash/25cd345233c65fac1fec0ce61d0f7836-Abstract-Datasets_and_Benchmarks_Track.html):
|
| 33 |
+
|
| 34 |
+
```bibtex
|
| 35 |
+
@inproceedings{robinson2024relbench,
|
| 36 |
+
title = {{RelBench}: A Benchmark for Deep Learning on Relational Databases},
|
| 37 |
+
author = {Robinson, Joshua and Ranjan, Rishabh and Hu, Weihua and Huang, Kexin and Han, Jiaqi and Dobles, Alejandro and Fey, Matthias and Lenssen, Jan E. and Yuan, Yiwen and Zhang, Zecheng and He, Xinwei and Leskovec, Jure},
|
| 38 |
+
booktitle = {Advances in Neural Information Processing Systems 37 (NeurIPS 2024) Datasets and Benchmarks Track},
|
| 39 |
+
year = {2024}
|
| 40 |
+
}
|
| 41 |
+
```
|
legacy/_transformed/rel-amazon/manifest.yaml
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: rel-amazon
|
| 2 |
+
manifest_version: 1
|
| 3 |
+
description: 'Amazon product reviews: customers, products, and time-stamped reviews and ratings across the Amazon catalog.'
|
| 4 |
+
val_timestamp: '2015-10-01'
|
| 5 |
+
test_timestamp: '2016-01-01'
|
| 6 |
+
tables:
|
| 7 |
+
review:
|
| 8 |
+
pkey: null
|
| 9 |
+
time_col: review_time
|
| 10 |
+
fkeys:
|
| 11 |
+
customer_id: customer
|
| 12 |
+
product_id: product
|
| 13 |
+
product:
|
| 14 |
+
pkey: product_id
|
| 15 |
+
time_col: null
|
| 16 |
+
fkeys: {}
|
| 17 |
+
customer:
|
| 18 |
+
pkey: customer_id
|
| 19 |
+
time_col: null
|
| 20 |
+
fkeys: {}
|
legacy/_transformed/rel-amazon/schema.svg
ADDED
|
|
legacy/_transformed/rel-amazon/tasks/item-churn/manifest.yaml
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: item-churn
|
| 2 |
+
kind: forecast
|
| 3 |
+
task_type: binary_classification
|
| 4 |
+
description: Churn for a product is 1 if the product recieves at least one review in the time window, else 0.
|
| 5 |
+
entity_table: product
|
| 6 |
+
entity_col: product_id
|
| 7 |
+
target_col: churn
|
| 8 |
+
time_col: timestamp
|
| 9 |
+
timedelta: 91 days
|
| 10 |
+
sql: |-
|
| 11 |
+
SELECT
|
| 12 |
+
timestamp,
|
| 13 |
+
product_id,
|
| 14 |
+
CAST(
|
| 15 |
+
NOT EXISTS (
|
| 16 |
+
SELECT 1
|
| 17 |
+
FROM review
|
| 18 |
+
WHERE
|
| 19 |
+
review.product_id = product.product_id AND
|
| 20 |
+
review_time > timestamp AND
|
| 21 |
+
review_time <= timestamp + INTERVAL '{timedelta}'
|
| 22 |
+
) AS INTEGER
|
| 23 |
+
) AS churn
|
| 24 |
+
FROM
|
| 25 |
+
timestamps,
|
| 26 |
+
product,
|
| 27 |
+
WHERE
|
| 28 |
+
EXISTS (
|
| 29 |
+
SELECT 1
|
| 30 |
+
FROM review
|
| 31 |
+
WHERE
|
| 32 |
+
review.product_id = product.product_id AND
|
| 33 |
+
review_time > timestamp - INTERVAL '{timedelta}' AND
|
| 34 |
+
review_time <= timestamp
|
| 35 |
+
)
|
| 36 |
+
manifest_version: 1
|
legacy/_transformed/rel-amazon/tasks/item-ltv/manifest.yaml
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: item-ltv
|
| 2 |
+
kind: forecast
|
| 3 |
+
task_type: regression
|
| 4 |
+
description: LTV (life-time value) for a product is the numer of times the product is purchased in the time window multiplied by price.
|
| 5 |
+
entity_table: product
|
| 6 |
+
entity_col: product_id
|
| 7 |
+
target_col: ltv
|
| 8 |
+
time_col: timestamp
|
| 9 |
+
timedelta: 91 days
|
| 10 |
+
sql: |-
|
| 11 |
+
SELECT
|
| 12 |
+
timestamp,
|
| 13 |
+
product.product_id,
|
| 14 |
+
COALESCE(SUM(price), 0) AS ltv,
|
| 15 |
+
FROM
|
| 16 |
+
timestamps,
|
| 17 |
+
product,
|
| 18 |
+
review
|
| 19 |
+
WHERE
|
| 20 |
+
review.product_id = product.product_id AND
|
| 21 |
+
review_time > timestamp AND
|
| 22 |
+
review_time <= timestamp + INTERVAL '{timedelta}'
|
| 23 |
+
GROUP BY
|
| 24 |
+
timestamp,
|
| 25 |
+
product.product_id
|
| 26 |
+
manifest_version: 1
|
legacy/_transformed/rel-amazon/tasks/review-rating/manifest.yaml
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: review-rating
|
| 2 |
+
kind: autocomplete
|
| 3 |
+
task_type: regression
|
| 4 |
+
description: Predict the `rating` column of the `review` table.
|
| 5 |
+
entity_table: review
|
| 6 |
+
target_col: rating
|
| 7 |
+
remove_columns:
|
| 8 |
+
- - review
|
| 9 |
+
- review_text
|
| 10 |
+
- - review
|
| 11 |
+
- summary
|
| 12 |
+
manifest_version: 1
|
legacy/_transformed/rel-amazon/tasks/user-churn/manifest.yaml
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: user-churn
|
| 2 |
+
kind: forecast
|
| 3 |
+
task_type: binary_classification
|
| 4 |
+
description: Churn for a customer is 1 if the customer does not review any product in the time window, else 0.
|
| 5 |
+
entity_table: customer
|
| 6 |
+
entity_col: customer_id
|
| 7 |
+
target_col: churn
|
| 8 |
+
time_col: timestamp
|
| 9 |
+
timedelta: 91 days
|
| 10 |
+
sql: |-
|
| 11 |
+
SELECT
|
| 12 |
+
timestamp,
|
| 13 |
+
customer_id,
|
| 14 |
+
CAST(
|
| 15 |
+
NOT EXISTS (
|
| 16 |
+
SELECT 1
|
| 17 |
+
FROM review
|
| 18 |
+
WHERE
|
| 19 |
+
review.customer_id = customer.customer_id AND
|
| 20 |
+
review_time > timestamp AND
|
| 21 |
+
review_time <= timestamp + INTERVAL '{timedelta}'
|
| 22 |
+
) AS INTEGER
|
| 23 |
+
) AS churn
|
| 24 |
+
FROM
|
| 25 |
+
timestamps,
|
| 26 |
+
customer,
|
| 27 |
+
WHERE
|
| 28 |
+
EXISTS (
|
| 29 |
+
SELECT 1
|
| 30 |
+
FROM review
|
| 31 |
+
WHERE
|
| 32 |
+
review.customer_id = customer.customer_id AND
|
| 33 |
+
review_time > timestamp - INTERVAL '{timedelta}' AND
|
| 34 |
+
review_time <= timestamp
|
| 35 |
+
)
|
| 36 |
+
manifest_version: 1
|
legacy/_transformed/rel-amazon/tasks/user-item-purchase/manifest.yaml
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: user-item-purchase
|
| 2 |
+
kind: forecast
|
| 3 |
+
task_type: recommendation
|
| 4 |
+
description: Predict the list of distinct items each customer will purchase in the next two years.
|
| 5 |
+
target_col: product_id
|
| 6 |
+
time_col: timestamp
|
| 7 |
+
src_entity_table: customer
|
| 8 |
+
src_entity_col: customer_id
|
| 9 |
+
dst_entity_table: product
|
| 10 |
+
dst_entity_col: product_id
|
| 11 |
+
eval_k: 10
|
| 12 |
+
timedelta: 91 days
|
| 13 |
+
sql: |-
|
| 14 |
+
SELECT
|
| 15 |
+
t.timestamp,
|
| 16 |
+
review.customer_id,
|
| 17 |
+
LIST(DISTINCT review.product_id) AS product_id
|
| 18 |
+
FROM
|
| 19 |
+
timestamps t
|
| 20 |
+
LEFT JOIN
|
| 21 |
+
review
|
| 22 |
+
ON
|
| 23 |
+
review.review_time > t.timestamp AND
|
| 24 |
+
review.review_time <= t.timestamp + INTERVAL '{timedelta}'
|
| 25 |
+
WHERE
|
| 26 |
+
review.customer_id is not null and review.product_id is not null
|
| 27 |
+
GROUP BY
|
| 28 |
+
t.timestamp,
|
| 29 |
+
review.customer_id
|
| 30 |
+
manifest_version: 1
|
legacy/_transformed/rel-amazon/tasks/user-item-rate/manifest.yaml
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: user-item-rate
|
| 2 |
+
kind: forecast
|
| 3 |
+
task_type: recommendation
|
| 4 |
+
description: Predict the list of distinct items each customer will purchase and give a 5 star review in the next two years.
|
| 5 |
+
target_col: product_id
|
| 6 |
+
time_col: timestamp
|
| 7 |
+
src_entity_table: customer
|
| 8 |
+
src_entity_col: customer_id
|
| 9 |
+
dst_entity_table: product
|
| 10 |
+
dst_entity_col: product_id
|
| 11 |
+
eval_k: 10
|
| 12 |
+
timedelta: 91 days
|
| 13 |
+
sql: |-
|
| 14 |
+
SELECT
|
| 15 |
+
t.timestamp,
|
| 16 |
+
review.customer_id,
|
| 17 |
+
LIST(DISTINCT review.product_id) AS product_id
|
| 18 |
+
FROM
|
| 19 |
+
timestamps t
|
| 20 |
+
LEFT JOIN
|
| 21 |
+
review
|
| 22 |
+
ON
|
| 23 |
+
review.review_time > t.timestamp AND
|
| 24 |
+
review.review_time <= t.timestamp + INTERVAL '{timedelta}'
|
| 25 |
+
WHERE
|
| 26 |
+
review.customer_id IS NOT NULL
|
| 27 |
+
AND review.product_id IS NOT NULL
|
| 28 |
+
AND review.rating = 5.0
|
| 29 |
+
GROUP BY
|
| 30 |
+
t.timestamp,
|
| 31 |
+
review.customer_id
|
| 32 |
+
manifest_version: 1
|
legacy/_transformed/rel-amazon/tasks/user-item-review/manifest.yaml
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: user-item-review
|
| 2 |
+
kind: forecast
|
| 3 |
+
task_type: recommendation
|
| 4 |
+
description: Predict the list of distinct items each customer will purchase and give a detailed review in the next two years.
|
| 5 |
+
target_col: product_id
|
| 6 |
+
time_col: timestamp
|
| 7 |
+
src_entity_table: customer
|
| 8 |
+
src_entity_col: customer_id
|
| 9 |
+
dst_entity_table: product
|
| 10 |
+
dst_entity_col: product_id
|
| 11 |
+
eval_k: 10
|
| 12 |
+
timedelta: 91 days
|
| 13 |
+
sql: |-
|
| 14 |
+
SELECT
|
| 15 |
+
t.timestamp,
|
| 16 |
+
review.customer_id,
|
| 17 |
+
LIST(DISTINCT review.product_id) AS product_id
|
| 18 |
+
FROM
|
| 19 |
+
timestamps t
|
| 20 |
+
LEFT JOIN
|
| 21 |
+
review
|
| 22 |
+
ON
|
| 23 |
+
review.review_time > t.timestamp AND
|
| 24 |
+
review.review_time <= t.timestamp + INTERVAL '{timedelta}'
|
| 25 |
+
WHERE
|
| 26 |
+
review.customer_id IS NOT NULL
|
| 27 |
+
AND review.product_id IS NOT NULL
|
| 28 |
+
AND (LENGTH(review.review_text) > 300 AND review.review_text IS NOT NULL)
|
| 29 |
+
GROUP BY
|
| 30 |
+
t.timestamp,
|
| 31 |
+
review.customer_id
|
| 32 |
+
manifest_version: 1
|
legacy/_transformed/rel-amazon/tasks/user-ltv/manifest.yaml
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: user-ltv
|
| 2 |
+
kind: forecast
|
| 3 |
+
task_type: regression
|
| 4 |
+
description: LTV (life-time value) for a customer is the sum of prices of products that the customer reviews in the time window.
|
| 5 |
+
entity_table: customer
|
| 6 |
+
entity_col: customer_id
|
| 7 |
+
target_col: ltv
|
| 8 |
+
time_col: timestamp
|
| 9 |
+
timedelta: 91 days
|
| 10 |
+
sql: |-
|
| 11 |
+
SELECT
|
| 12 |
+
timestamp,
|
| 13 |
+
customer_id,
|
| 14 |
+
ltv,
|
| 15 |
+
FROM
|
| 16 |
+
timestamps,
|
| 17 |
+
customer,
|
| 18 |
+
(
|
| 19 |
+
SELECT
|
| 20 |
+
COALESCE(SUM(price), 0) as ltv,
|
| 21 |
+
FROM
|
| 22 |
+
review,
|
| 23 |
+
product
|
| 24 |
+
WHERE
|
| 25 |
+
review.customer_id = customer.customer_id AND
|
| 26 |
+
review.product_id = product.product_id AND
|
| 27 |
+
review_time > timestamp AND
|
| 28 |
+
review_time <= timestamp + INTERVAL '{timedelta}'
|
| 29 |
+
)
|
| 30 |
+
WHERE
|
| 31 |
+
EXISTS (
|
| 32 |
+
SELECT 1
|
| 33 |
+
FROM review
|
| 34 |
+
WHERE
|
| 35 |
+
review.customer_id = customer.customer_id AND
|
| 36 |
+
review_time > timestamp - INTERVAL '{timedelta}' AND
|
| 37 |
+
review_time <= timestamp
|
| 38 |
+
)
|
| 39 |
+
manifest_version: 1
|
legacy/_transformed/rel-avito/README.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# rel-avito
|
| 2 |
+
|
| 3 |
+
Avito online classifieds: users, ads, search queries, and impression / click / visit streams.
|
| 4 |
+
|
| 5 |
+
## Schema
|
| 6 |
+
|
| 7 |
+

|
| 8 |
+
|
| 9 |
+
## Tasks
|
| 10 |
+
|
| 11 |
+
| task | kind | type | description |
|
| 12 |
+
|---|---|---|---|
|
| 13 |
+
| `ad-ctr` | forecast | regression | Assuming the ad will be clicked in the next 4 days, predict the Click-Through- Rate (CTR) for each ad. |
|
| 14 |
+
| `searchinfo-isuserloggedon` | autocomplete | binary_classification | Predict the `IsUserLoggedOn` column of the `SearchInfo` table. |
|
| 15 |
+
| `searchstream-click` | autocomplete | binary_classification | Predict the `IsClick` column of the `SearchStream` table. |
|
| 16 |
+
| `user-ad-visit` | forecast | recommendation | Predict the distinct list of ads a user will visit in the next 4 days. |
|
| 17 |
+
| `user-clicks` | forecast | binary_classification | Predict whether the each customer will click on more than one ads in the next 4 days. |
|
| 18 |
+
| `user-visits` | forecast | binary_classification | Predict whether each customer will visit more than one ad in the next 4 days. |
|
| 19 |
+
|
| 20 |
+
## Loading
|
| 21 |
+
|
| 22 |
+
```python
|
| 23 |
+
import relbench
|
| 24 |
+
ds = relbench.load_dataset("relbench/v1/rel-avito")
|
| 25 |
+
task = relbench.load_task("relbench/v1/rel-avito", "<task>")
|
| 26 |
+
```
|
| 27 |
+
|
| 28 |
+
## Citation
|
| 29 |
+
|
| 30 |
+
Please cite [RelBench](https://proceedings.neurips.cc/paper_files/paper/2024/hash/25cd345233c65fac1fec0ce61d0f7836-Abstract-Datasets_and_Benchmarks_Track.html):
|
| 31 |
+
|
| 32 |
+
```bibtex
|
| 33 |
+
@inproceedings{robinson2024relbench,
|
| 34 |
+
title = {{RelBench}: A Benchmark for Deep Learning on Relational Databases},
|
| 35 |
+
author = {Robinson, Joshua and Ranjan, Rishabh and Hu, Weihua and Huang, Kexin and Han, Jiaqi and Dobles, Alejandro and Fey, Matthias and Lenssen, Jan E. and Yuan, Yiwen and Zhang, Zecheng and He, Xinwei and Leskovec, Jure},
|
| 36 |
+
booktitle = {Advances in Neural Information Processing Systems 37 (NeurIPS 2024) Datasets and Benchmarks Track},
|
| 37 |
+
year = {2024}
|
| 38 |
+
}
|
| 39 |
+
```
|
legacy/_transformed/rel-avito/db/Category.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e0a1cb03abae73a2b2bd3d26dd1906413b4df943131f17158df65a01b7aca69f
|
| 3 |
+
size 2044
|
legacy/_transformed/rel-avito/db/PhoneRequestsStream.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8fb689cc03f52c989a173e217d8471f5e9df9b06c52e8e168a6e69a81e5857e0
|
| 3 |
+
size 3763617
|
legacy/_transformed/rel-avito/db/SearchInfo.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:26a79ab2427846f2ad0187b0dcff850678ad5ac379bb15ec3df72598a294898c
|
| 3 |
+
size 28728539
|
legacy/_transformed/rel-avito/db/VisitStream.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c598aeb8248c41de488f7eaf59cf1a0040ad95cd288177d5557190daa10c2b17
|
| 3 |
+
size 62197827
|
legacy/_transformed/rel-avito/manifest.yaml
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: rel-avito
|
| 2 |
+
manifest_version: 1
|
| 3 |
+
description: 'Avito online classifieds: users, ads, search queries, and impression / click / visit streams.'
|
| 4 |
+
val_timestamp: '2015-05-08'
|
| 5 |
+
test_timestamp: '2015-05-14'
|
| 6 |
+
tables:
|
| 7 |
+
VisitStream:
|
| 8 |
+
pkey: null
|
| 9 |
+
time_col: ViewDate
|
| 10 |
+
fkeys:
|
| 11 |
+
UserID: UserInfo
|
| 12 |
+
AdID: AdsInfo
|
| 13 |
+
AdsInfo:
|
| 14 |
+
pkey: AdID
|
| 15 |
+
time_col: null
|
| 16 |
+
fkeys:
|
| 17 |
+
LocationID: Location
|
| 18 |
+
CategoryID: Category
|
| 19 |
+
SearchStream:
|
| 20 |
+
pkey: null
|
| 21 |
+
time_col: SearchDate
|
| 22 |
+
fkeys:
|
| 23 |
+
SearchID: SearchInfo
|
| 24 |
+
AdID: AdsInfo
|
| 25 |
+
SearchInfo:
|
| 26 |
+
pkey: SearchID
|
| 27 |
+
time_col: SearchDate
|
| 28 |
+
fkeys:
|
| 29 |
+
UserID: UserInfo
|
| 30 |
+
LocationID: Location
|
| 31 |
+
CategoryID: Category
|
| 32 |
+
Category:
|
| 33 |
+
pkey: CategoryID
|
| 34 |
+
time_col: null
|
| 35 |
+
fkeys: {}
|
| 36 |
+
PhoneRequestsStream:
|
| 37 |
+
pkey: null
|
| 38 |
+
time_col: PhoneRequestDate
|
| 39 |
+
fkeys:
|
| 40 |
+
UserID: UserInfo
|
| 41 |
+
AdID: AdsInfo
|
| 42 |
+
UserInfo:
|
| 43 |
+
pkey: UserID
|
| 44 |
+
time_col: null
|
| 45 |
+
fkeys: {}
|
| 46 |
+
Location:
|
| 47 |
+
pkey: LocationID
|
| 48 |
+
time_col: null
|
| 49 |
+
fkeys: {}
|
legacy/_transformed/rel-avito/schema.svg
ADDED
|
|
legacy/_transformed/rel-avito/tasks/ad-ctr/val.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0d6d40baa5a1aa918e4d0b747233c0352f10f9d6a3eac75fa4c23e5c5b060314
|
| 3 |
+
size 11108
|
legacy/_transformed/rel-avito/tasks/searchinfo-isuserloggedon/train.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:313577b7b67ab567e2bedae03809084f702130e7f9d1e5e9e717521892a74023
|
| 3 |
+
size 6312728
|
legacy/_transformed/rel-avito/tasks/searchstream-click/test.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:587ddb4b7e9c3efe9eed48130d7390a3d36ac06c4f8087374759123b66c37acb
|
| 3 |
+
size 5879378
|
legacy/_transformed/rel-avito/tasks/user-clicks/train.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4226ec67eef42975066297b601518413a5b383020a82204804ea79e825775aed
|
| 3 |
+
size 168265
|
legacy/_transformed/rel-avito/tasks/user-visits/train.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:17ff70f1a2df93d02053a03b65b72f1b0eb5cba2d5458fc8c2f5eaff03590798
|
| 3 |
+
size 236813
|
legacy/_transformed/rel-hm/README.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# rel-hm
|
| 2 |
+
|
| 3 |
+
H&M e-commerce: customers, articles, and time-stamped purchase transactions.
|
| 4 |
+
|
| 5 |
+
## Schema
|
| 6 |
+
|
| 7 |
+

|
| 8 |
+
|
| 9 |
+
## Tasks
|
| 10 |
+
|
| 11 |
+
| task | kind | type | description |
|
| 12 |
+
|---|---|---|---|
|
| 13 |
+
| `item-sales` | forecast | regression | Predict the total sales for an article (the sum of prices of the associated transactions) in the next week. |
|
| 14 |
+
| `transactions-price` | autocomplete | regression | Predict the `price` column of the `transactions` table. |
|
| 15 |
+
| `user-churn` | forecast | binary_classification | Predict the churn for a customer (no transactions) in the next week. |
|
| 16 |
+
| `user-item-purchase` | forecast | recommendation | Predict the list of articles each customer will purchase in the next seven days. |
|
| 17 |
+
|
| 18 |
+
## Loading
|
| 19 |
+
|
| 20 |
+
```python
|
| 21 |
+
import relbench
|
| 22 |
+
ds = relbench.load_dataset("relbench/v1/rel-hm")
|
| 23 |
+
task = relbench.load_task("relbench/v1/rel-hm", "<task>")
|
| 24 |
+
```
|
| 25 |
+
|
| 26 |
+
## Citation
|
| 27 |
+
|
| 28 |
+
Please cite [RelBench](https://proceedings.neurips.cc/paper_files/paper/2024/hash/25cd345233c65fac1fec0ce61d0f7836-Abstract-Datasets_and_Benchmarks_Track.html):
|
| 29 |
+
|
| 30 |
+
```bibtex
|
| 31 |
+
@inproceedings{robinson2024relbench,
|
| 32 |
+
title = {{RelBench}: A Benchmark for Deep Learning on Relational Databases},
|
| 33 |
+
author = {Robinson, Joshua and Ranjan, Rishabh and Hu, Weihua and Huang, Kexin and Han, Jiaqi and Dobles, Alejandro and Fey, Matthias and Lenssen, Jan E. and Yuan, Yiwen and Zhang, Zecheng and He, Xinwei and Leskovec, Jure},
|
| 34 |
+
booktitle = {Advances in Neural Information Processing Systems 37 (NeurIPS 2024) Datasets and Benchmarks Track},
|
| 35 |
+
year = {2024}
|
| 36 |
+
}
|
| 37 |
+
```
|
legacy/_transformed/rel-hm/db/customer.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ca2224c83eefea62147c97037833741cfb5e5c10da656534e34be03b3ef3e820
|
| 3 |
+
size 45399774
|
legacy/_transformed/rel-hm/manifest.yaml
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: rel-hm
|
| 2 |
+
manifest_version: 1
|
| 3 |
+
description: 'H&M e-commerce: customers, articles, and time-stamped purchase transactions.'
|
| 4 |
+
val_timestamp: '2020-09-07'
|
| 5 |
+
test_timestamp: '2020-09-14'
|
| 6 |
+
tables:
|
| 7 |
+
transactions:
|
| 8 |
+
pkey: null
|
| 9 |
+
time_col: t_dat
|
| 10 |
+
fkeys:
|
| 11 |
+
customer_id: customer
|
| 12 |
+
article_id: article
|
| 13 |
+
article:
|
| 14 |
+
pkey: article_id
|
| 15 |
+
time_col: null
|
| 16 |
+
fkeys: {}
|
| 17 |
+
customer:
|
| 18 |
+
pkey: customer_id
|
| 19 |
+
time_col: null
|
| 20 |
+
fkeys: {}
|
legacy/_transformed/rel-hm/schema.svg
ADDED
|
|
legacy/_transformed/rel-hm/tasks/user-item-purchase/train.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6f86ae6334180162edab4be280eb73794bec4877ecfc196dae715be8cf48fb1e
|
| 3 |
+
size 40810052
|
legacy/_transformed/rel-stack/README.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# rel-stack
|
| 2 |
+
|
| 3 |
+
Stack Exchange Q&A: users, posts, comments, votes, badges, and post links.
|
| 4 |
+
|
| 5 |
+
## Schema
|
| 6 |
+
|
| 7 |
+

|
| 8 |
+
|
| 9 |
+
## Tasks
|
| 10 |
+
|
| 11 |
+
| task | kind | type | description |
|
| 12 |
+
|---|---|---|---|
|
| 13 |
+
| `post-post-related` | forecast | recommendation | Predict a list of existing posts that users will link a given post to in the next two years. |
|
| 14 |
+
| `post-votes` | forecast | regression | Predict the number of upvotes that an existing question will receive in the next 2 years. |
|
| 15 |
+
| `user-badge` | forecast | binary_classification | Predict if each user will receive in a new badge the next 2 years. |
|
| 16 |
+
| `user-engagement` | forecast | binary_classification | Predict if a user will make any votes/posts/comments in the next 2 years. |
|
| 17 |
+
| `user-post-comment` | forecast | recommendation | Predict a list of existing posts that a user will comment in the next two years. |
|
| 18 |
+
|
| 19 |
+
## Loading
|
| 20 |
+
|
| 21 |
+
```python
|
| 22 |
+
import relbench
|
| 23 |
+
ds = relbench.load_dataset("relbench/v1/rel-stack")
|
| 24 |
+
task = relbench.load_task("relbench/v1/rel-stack", "<task>")
|
| 25 |
+
```
|
| 26 |
+
|
| 27 |
+
## Citation
|
| 28 |
+
|
| 29 |
+
Please cite [RelBench](https://proceedings.neurips.cc/paper_files/paper/2024/hash/25cd345233c65fac1fec0ce61d0f7836-Abstract-Datasets_and_Benchmarks_Track.html):
|
| 30 |
+
|
| 31 |
+
```bibtex
|
| 32 |
+
@inproceedings{robinson2024relbench,
|
| 33 |
+
title = {{RelBench}: A Benchmark for Deep Learning on Relational Databases},
|
| 34 |
+
author = {Robinson, Joshua and Ranjan, Rishabh and Hu, Weihua and Huang, Kexin and Han, Jiaqi and Dobles, Alejandro and Fey, Matthias and Lenssen, Jan E. and Yuan, Yiwen and Zhang, Zecheng and He, Xinwei and Leskovec, Jure},
|
| 35 |
+
booktitle = {Advances in Neural Information Processing Systems 37 (NeurIPS 2024) Datasets and Benchmarks Track},
|
| 36 |
+
year = {2024}
|
| 37 |
+
}
|
| 38 |
+
```
|
legacy/_transformed/rel-stack/db/comments.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bd3023238a002e314113a93518f7f1c291b4e7ea3fa852ab569e4b48d5cab3d9
|
| 3 |
+
size 78846411
|
legacy/_transformed/rel-stack/db/posts.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0432a2a17c10171fad234b673a68a99c9d2b81275c6eb468796575b6eb665309
|
| 3 |
+
size 196565765
|
legacy/_transformed/rel-stack/db/votes.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bac7db4620883031687018babba2c94cfddcc352bac8ee01a5a0de253ba897f1
|
| 3 |
+
size 7059091
|
legacy/_transformed/rel-stack/manifest.yaml
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: rel-stack
|
| 2 |
+
manifest_version: 1
|
| 3 |
+
description: 'Stack Exchange Q&A: users, posts, comments, votes, badges, and post links.'
|
| 4 |
+
val_timestamp: '2020-10-01'
|
| 5 |
+
test_timestamp: '2021-01-01'
|
| 6 |
+
tables:
|
| 7 |
+
badges:
|
| 8 |
+
pkey: Id
|
| 9 |
+
time_col: Date
|
| 10 |
+
fkeys:
|
| 11 |
+
UserId: users
|
| 12 |
+
votes:
|
| 13 |
+
pkey: Id
|
| 14 |
+
time_col: CreationDate
|
| 15 |
+
fkeys:
|
| 16 |
+
PostId: posts
|
| 17 |
+
UserId: users
|
| 18 |
+
users:
|
| 19 |
+
pkey: Id
|
| 20 |
+
time_col: CreationDate
|
| 21 |
+
fkeys: {}
|
| 22 |
+
comments:
|
| 23 |
+
pkey: Id
|
| 24 |
+
time_col: CreationDate
|
| 25 |
+
fkeys:
|
| 26 |
+
UserId: users
|
| 27 |
+
PostId: posts
|
| 28 |
+
posts:
|
| 29 |
+
pkey: Id
|
| 30 |
+
time_col: CreationDate
|
| 31 |
+
fkeys:
|
| 32 |
+
OwnerUserId: users
|
| 33 |
+
ParentId: posts
|
| 34 |
+
postLinks:
|
| 35 |
+
pkey: Id
|
| 36 |
+
time_col: CreationDate
|
| 37 |
+
fkeys:
|
| 38 |
+
PostId: posts
|
| 39 |
+
RelatedPostId: posts
|
| 40 |
+
postHistory:
|
| 41 |
+
pkey: Id
|
| 42 |
+
time_col: CreationDate
|
| 43 |
+
fkeys:
|
| 44 |
+
PostId: posts
|
| 45 |
+
UserId: users
|
legacy/_transformed/rel-stack/schema.svg
ADDED
|
|
legacy/_transformed/rel-stack/tasks/post-post-related/val.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d5190d27bbff26a0d3ef77639885ee413c148d79f9ac3176e728f088de74327b
|
| 3 |
+
size 2835
|
legacy/_transformed/rel-stack/tasks/user-badge/train.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3055ff16b5bbc77c8fcc44c699b8def35a0c879b77c044ac64f7b259e44a2c64
|
| 3 |
+
size 4814610
|
legacy/_transformed/rel-stack/tasks/user-badge/val.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:32aa7d7f017309d53b50b87ed01bdd29a899527cc80aaed038ab277db9bb5618
|
| 3 |
+
size 299471
|
legacy/_transformed/rel-stack/tasks/user-post-comment/val.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:97af23bce98baafabb86edf7b11852fbd57ec3b36018fdec58917233b9bd10e1
|
| 3 |
+
size 7820
|
legacy/_transformed/rel-trial/README.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# rel-trial
|
| 2 |
+
|
| 3 |
+
ClinicalTrials.gov clinical trials: studies, outcomes, adverse events, eligibilities, sponsors, conditions, and facilities.
|
| 4 |
+
|
| 5 |
+
## Schema
|
| 6 |
+
|
| 7 |
+

|
| 8 |
+
|
| 9 |
+
## Tasks
|
| 10 |
+
|
| 11 |
+
| task | kind | type | description |
|
| 12 |
+
|---|---|---|---|
|
| 13 |
+
| `condition-sponsor-run` | forecast | recommendation | Predict whether this condition will have which sponsors. |
|
| 14 |
+
| `eligibilities-adult` | autocomplete | binary_classification | Predict the `adult` column of the `eligibilities` table. |
|
| 15 |
+
| `eligibilities-child` | autocomplete | binary_classification | Predict the `child` column of the `eligibilities` table. |
|
| 16 |
+
| `site-sponsor-run` | forecast | recommendation | Predict whether this sponsor will have a trial in a facility. |
|
| 17 |
+
| `site-success` | forecast | regression | Predict the success rate of a trial site in the next 1 year. |
|
| 18 |
+
| `studies-enrollment` | autocomplete | regression | Predict the `enrollment` column of the `studies` table. |
|
| 19 |
+
| `studies-has_dmc` | autocomplete | binary_classification | Predict the `has_dmc` column of the `studies` table. |
|
| 20 |
+
| `study-adverse` | forecast | regression | Predict the number of affected patients with severe advsere events/death for the trial in the next 1 year. |
|
| 21 |
+
| `study-outcome` | forecast | binary_classification | Predict if the trials in the next 1 year will achieve its primary outcome. |
|
| 22 |
+
|
| 23 |
+
## Loading
|
| 24 |
+
|
| 25 |
+
```python
|
| 26 |
+
import relbench
|
| 27 |
+
ds = relbench.load_dataset("relbench/v1/rel-trial")
|
| 28 |
+
task = relbench.load_task("relbench/v1/rel-trial", "<task>")
|
| 29 |
+
```
|
| 30 |
+
|
| 31 |
+
## Citation
|
| 32 |
+
|
| 33 |
+
Please cite [RelBench](https://proceedings.neurips.cc/paper_files/paper/2024/hash/25cd345233c65fac1fec0ce61d0f7836-Abstract-Datasets_and_Benchmarks_Track.html):
|
| 34 |
+
|
| 35 |
+
```bibtex
|
| 36 |
+
@inproceedings{robinson2024relbench,
|
| 37 |
+
title = {{RelBench}: A Benchmark for Deep Learning on Relational Databases},
|
| 38 |
+
author = {Robinson, Joshua and Ranjan, Rishabh and Hu, Weihua and Huang, Kexin and Han, Jiaqi and Dobles, Alejandro and Fey, Matthias and Lenssen, Jan E. and Yuan, Yiwen and Zhang, Zecheng and He, Xinwei and Leskovec, Jure},
|
| 39 |
+
booktitle = {Advances in Neural Information Processing Systems 37 (NeurIPS 2024) Datasets and Benchmarks Track},
|
| 40 |
+
year = {2024}
|
| 41 |
+
}
|
| 42 |
+
```
|
legacy/_transformed/rel-trial/db/outcome_analyses.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fdb3c6f8786c58f955593fe833a5698d1f966a98517eaa141cb9de59240268a4
|
| 3 |
+
size 7537295
|
legacy/_transformed/rel-trial/manifest.yaml
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: rel-trial
|
| 2 |
+
manifest_version: 1
|
| 3 |
+
description: 'ClinicalTrials.gov clinical trials: studies, outcomes, adverse events, eligibilities, sponsors, conditions, and facilities.'
|
| 4 |
+
val_timestamp: '2020-01-01'
|
| 5 |
+
test_timestamp: '2021-01-01'
|
| 6 |
+
tables:
|
| 7 |
+
conditions_studies:
|
| 8 |
+
pkey: id
|
| 9 |
+
time_col: date
|
| 10 |
+
fkeys:
|
| 11 |
+
nct_id: studies
|
| 12 |
+
condition_id: conditions
|
| 13 |
+
interventions:
|
| 14 |
+
pkey: intervention_id
|
| 15 |
+
time_col: null
|
| 16 |
+
fkeys: {}
|
| 17 |
+
drop_withdrawals:
|
| 18 |
+
pkey: id
|
| 19 |
+
time_col: date
|
| 20 |
+
fkeys:
|
| 21 |
+
nct_id: studies
|
| 22 |
+
outcome_analyses:
|
| 23 |
+
pkey: id
|
| 24 |
+
time_col: date
|
| 25 |
+
fkeys:
|
| 26 |
+
nct_id: studies
|
| 27 |
+
outcome_id: outcomes
|
| 28 |
+
sponsors_studies:
|
| 29 |
+
pkey: id
|
| 30 |
+
time_col: date
|
| 31 |
+
fkeys:
|
| 32 |
+
nct_id: studies
|
| 33 |
+
sponsor_id: sponsors
|
| 34 |
+
facilities_studies:
|
| 35 |
+
pkey: id
|
| 36 |
+
time_col: date
|
| 37 |
+
fkeys:
|
| 38 |
+
nct_id: studies
|
| 39 |
+
facility_id: facilities
|
| 40 |
+
eligibilities:
|
| 41 |
+
pkey: id
|
| 42 |
+
time_col: date
|
| 43 |
+
fkeys:
|
| 44 |
+
nct_id: studies
|
| 45 |
+
interventions_studies:
|
| 46 |
+
pkey: id
|
| 47 |
+
time_col: date
|
| 48 |
+
fkeys:
|
| 49 |
+
nct_id: studies
|
| 50 |
+
intervention_id: interventions
|
| 51 |
+
outcomes:
|
| 52 |
+
pkey: id
|
| 53 |
+
time_col: date
|
| 54 |
+
fkeys:
|
| 55 |
+
nct_id: studies
|
| 56 |
+
facilities:
|
| 57 |
+
pkey: facility_id
|
| 58 |
+
time_col: null
|
| 59 |
+
fkeys: {}
|
| 60 |
+
reported_event_totals:
|
| 61 |
+
pkey: id
|
| 62 |
+
time_col: date
|
| 63 |
+
fkeys:
|
| 64 |
+
nct_id: studies
|
| 65 |
+
sponsors:
|
| 66 |
+
pkey: sponsor_id
|
| 67 |
+
time_col: null
|
| 68 |
+
fkeys: {}
|
| 69 |
+
studies:
|
| 70 |
+
pkey: nct_id
|
| 71 |
+
time_col: start_date
|
| 72 |
+
fkeys: {}
|
| 73 |
+
conditions:
|
| 74 |
+
pkey: condition_id
|
| 75 |
+
time_col: null
|
| 76 |
+
fkeys: {}
|
| 77 |
+
designs:
|
| 78 |
+
pkey: id
|
| 79 |
+
time_col: date
|
| 80 |
+
fkeys:
|
| 81 |
+
nct_id: studies
|
legacy/_transformed/rel-trial/schema.svg
ADDED
|
|
legacy/_transformed/rel-trial/tasks/eligibilities-child/manifest.yaml
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: eligibilities-child
|
| 2 |
+
kind: autocomplete
|
| 3 |
+
task_type: binary_classification
|
| 4 |
+
description: Predict the `child` column of the `eligibilities` table.
|
| 5 |
+
entity_table: eligibilities
|
| 6 |
+
target_col: child
|
| 7 |
+
remove_columns:
|
| 8 |
+
- - eligibilities
|
| 9 |
+
- adult
|
| 10 |
+
- - eligibilities
|
| 11 |
+
- older_adult
|
| 12 |
+
- - eligibilities
|
| 13 |
+
- minimum_age
|
| 14 |
+
- - eligibilities
|
| 15 |
+
- maximum_age
|
| 16 |
+
- - eligibilities
|
| 17 |
+
- population
|
| 18 |
+
- - eligibilities
|
| 19 |
+
- criteria
|
| 20 |
+
- - eligibilities
|
| 21 |
+
- gender_description
|
| 22 |
+
manifest_version: 1
|
legacy/_transformed/rel-trial/tasks/site-sponsor-run/manifest.yaml
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: site-sponsor-run
|
| 2 |
+
kind: forecast
|
| 3 |
+
task_type: recommendation
|
| 4 |
+
description: Predict whether this sponsor will have a trial in a facility.
|
| 5 |
+
target_col: sponsor_id
|
| 6 |
+
time_col: timestamp
|
| 7 |
+
src_entity_table: facilities
|
| 8 |
+
src_entity_col: facility_id
|
| 9 |
+
dst_entity_table: sponsors
|
| 10 |
+
dst_entity_col: sponsor_id
|
| 11 |
+
eval_k: 10
|
| 12 |
+
timedelta: 365 days
|
| 13 |
+
sql: |-
|
| 14 |
+
SELECT
|
| 15 |
+
t.timestamp,
|
| 16 |
+
fs.facility_id,
|
| 17 |
+
LIST(DISTINCT ss.sponsor_id) AS sponsor_id
|
| 18 |
+
FROM timestamps t
|
| 19 |
+
LEFT JOIN facilities_studies fs
|
| 20 |
+
LEFT JOIN sponsors_studies ss ON ss.nct_id = fs.nct_id
|
| 21 |
+
ON fs.date > t.timestamp
|
| 22 |
+
and fs.date <= t.timestamp + INTERVAL '{timedelta}'
|
| 23 |
+
GROUP BY t.timestamp, fs.facility_id;
|
| 24 |
+
manifest_version: 1
|
legacy/_transformed/rel-trial/tasks/site-success/train.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3b7613be052e3b0585871275dc3a3e800e021a3c9c05d1badab0d137fd540867
|
| 3 |
+
size 556198
|
legacy/_transformed/rel-trial/tasks/studies-enrollment/manifest.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: studies-enrollment
|
| 2 |
+
kind: autocomplete
|
| 3 |
+
task_type: regression
|
| 4 |
+
description: Predict the `enrollment` column of the `studies` table.
|
| 5 |
+
entity_table: studies
|
| 6 |
+
target_col: enrollment
|
| 7 |
+
manifest_version: 1
|
legacy/rel-amazon/column_index.json
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
{"
|
|
|
|
| 1 |
+
{"ltv of user-ltv":4,"verified of review":23,"ltv of item-ltv":17,"brand of product":30619915,"timestamp of user-ltv":1,"product_id of review":21,"timestamp of item-churn":10,"category of product":30619914,"rating of review":22,"title of product":30850876,"primary_key of review-rating":30619911,"product_id of product":30619913,"rating of review-rating":30619912,"review_time of review-rating":30619910,"churn of user-churn":8,"product_id of item-ltv":16,"review_time of review":19,"customer_id of review":20,"review_text of review":24,"churn of item-churn":13,"customer_id of user-churn":7,"customer_id of customer":29426899,"product_id of item-churn":11,"price of product":31580657,"summary of review":19026060,"customer_id of user-ltv":2,"description of product":31287323,"timestamp of user-churn":6,"customer_name of customer":29426900,"timestamp of item-ltv":15}
|
legacy/rel-amazon/meta.json
CHANGED
|
@@ -10,9 +10,9 @@
|
|
| 10 |
"format_version": 1,
|
| 11 |
"name": "rel-amazon",
|
| 12 |
"num_db_tables": 3,
|
| 13 |
-
"num_nodes":
|
| 14 |
-
"num_task_tables":
|
| 15 |
-
"num_text_strings":
|
| 16 |
"source": "/dfs/user/ranjanr/share/stanford-star/relbench/rel-amazon",
|
| 17 |
"tasks": [
|
| 18 |
{
|
|
@@ -77,45 +77,6 @@
|
|
| 77 |
"task_type": "binary_classification",
|
| 78 |
"time_col": "timestamp"
|
| 79 |
},
|
| 80 |
-
{
|
| 81 |
-
"entity_table": null,
|
| 82 |
-
"kind": "forecast",
|
| 83 |
-
"name": "user-item-purchase",
|
| 84 |
-
"splits": [
|
| 85 |
-
"train",
|
| 86 |
-
"val",
|
| 87 |
-
"test"
|
| 88 |
-
],
|
| 89 |
-
"target_col": "product_id",
|
| 90 |
-
"task_type": "link_prediction",
|
| 91 |
-
"time_col": "timestamp"
|
| 92 |
-
},
|
| 93 |
-
{
|
| 94 |
-
"entity_table": null,
|
| 95 |
-
"kind": "forecast",
|
| 96 |
-
"name": "user-item-rate",
|
| 97 |
-
"splits": [
|
| 98 |
-
"train",
|
| 99 |
-
"val",
|
| 100 |
-
"test"
|
| 101 |
-
],
|
| 102 |
-
"target_col": "product_id",
|
| 103 |
-
"task_type": "link_prediction",
|
| 104 |
-
"time_col": "timestamp"
|
| 105 |
-
},
|
| 106 |
-
{
|
| 107 |
-
"entity_table": null,
|
| 108 |
-
"kind": "forecast",
|
| 109 |
-
"name": "user-item-review",
|
| 110 |
-
"splits": [
|
| 111 |
-
"train",
|
| 112 |
-
"val",
|
| 113 |
-
"test"
|
| 114 |
-
],
|
| 115 |
-
"target_col": "product_id",
|
| 116 |
-
"task_type": "link_prediction",
|
| 117 |
-
"time_col": "timestamp"
|
| 118 |
-
},
|
| 119 |
{
|
| 120 |
"entity_table": "customer",
|
| 121 |
"kind": "forecast",
|
|
|
|
| 10 |
"format_version": 1,
|
| 11 |
"name": "rel-amazon",
|
| 12 |
"num_db_tables": 3,
|
| 13 |
+
"num_nodes": 60938584,
|
| 14 |
+
"num_task_tables": 15,
|
| 15 |
+
"num_text_strings": 31580658,
|
| 16 |
"source": "/dfs/user/ranjanr/share/stanford-star/relbench/rel-amazon",
|
| 17 |
"tasks": [
|
| 18 |
{
|
|
|
|
| 77 |
"task_type": "binary_classification",
|
| 78 |
"time_col": "timestamp"
|
| 79 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
{
|
| 81 |
"entity_table": "customer",
|
| 82 |
"kind": "forecast",
|
legacy/rel-amazon/offsets.rkyv
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:0772760d4760e70b6623a84434bc3e8afd9f0c2db66c20efac46edde8f1e87ab
|
| 3 |
+
size 487508696
|
legacy/rel-amazon/table_info.json
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
{"user-
|
|
|
|
| 1 |
+
{"user-ltv:Test":{"node_idx_offset":55468524,"num_nodes":351885},"item-ltv:Val":{"node_idx_offset":28984803,"num_nodes":166978},"review:Db":{"node_idx_offset":2356205,"num_nodes":20862040},"item-churn:Train":{"node_idx_offset":23385087,"num_nodes":2536014},"user-churn:Train":{"node_idx_offset":50350349,"num_nodes":4708383},"review-rating:Test":{"node_idx_offset":29151781,"num_nodes":8217532},"review-rating:Train":{"node_idx_offset":37369313,"num_nodes":11822796},"user-ltv:Val":{"node_idx_offset":60528792,"num_nodes":409792},"customer:Db":{"node_idx_offset":0,"num_nodes":1850193},"item-ltv:Train":{"node_idx_offset":26277124,"num_nodes":2707679},"user-churn:Val":{"node_idx_offset":55058732,"num_nodes":409792},"user-ltv:Train":{"node_idx_offset":55820409,"num_nodes":4708383},"user-churn:Test":{"node_idx_offset":49998464,"num_nodes":351885},"review-rating:Val":{"node_idx_offset":49192109,"num_nodes":806355},"item-churn:Test":{"node_idx_offset":23218245,"num_nodes":166842},"product:Db":{"node_idx_offset":1850193,"num_nodes":506012},"item-ltv:Test":{"node_idx_offset":26098790,"num_nodes":178334},"item-churn:Val":{"node_idx_offset":25921101,"num_nodes":177689}}
|