aid int32 0 1.86M | aid_y int32 0 1.86M | value float64 0 35.2k |
|---|---|---|
0 | 0 | 12 |
0 | 532,042 | 4.871827 |
0 | 1,848,174 | 3.749523 |
0 | 150,507 | 2.304903 |
0 | 643,097 | 1.887247 |
0 | 706,401 | 1.862823 |
0 | 1,735,605 | 1.808439 |
0 | 994,505 | 1.418283 |
0 | 1,720,647 | 0.998461 |
0 | 470,588 | 0.997692 |
0 | 53,949 | 0.997308 |
0 | 1,636,583 | 0.997308 |
0 | 1,000,264 | 0.99654 |
0 | 255,397 | 0.995198 |
0 | 1,157,724 | 0.994815 |
0 | 1,191,094 | 0.993475 |
0 | 119,141 | 0.992901 |
0 | 13,759 | 0.992328 |
0 | 937,063 | 0.991564 |
0 | 1,703,167 | 0.990991 |
0 | 1,363,081 | 0.990228 |
0 | 1,394,481 | 0.990038 |
0 | 1,630,613 | 0.985853 |
0 | 1,012,453 | 0.985663 |
0 | 1,849,889 | 0.984146 |
0 | 145,491 | 0.983767 |
0 | 798,411 | 0.983199 |
0 | 1,029,498 | 0.982253 |
0 | 896,325 | 0.981686 |
0 | 506,593 | 0.981119 |
0 | 1,459,495 | 0.980175 |
0 | 1,819,216 | 0.979986 |
0 | 1,496,649 | 0.979232 |
0 | 931,746 | 0.977913 |
0 | 581,953 | 0.976784 |
0 | 204,266 | 0.97528 |
0 | 315,848 | 0.974154 |
0 | 811,167 | 0.972468 |
0 | 320,249 | 0.971906 |
0 | 273,704 | 0.970597 |
1 | 1 | 4 |
1 | 408,008 | 0.998076 |
1 | 1,752,383 | 0.995006 |
1 | 971,488 | 0.99271 |
1 | 199,872 | 0.978478 |
1 | 261,542 | 0.967053 |
1 | 773,717 | 0.933572 |
1 | 990,115 | 0.893992 |
1 | 1,579,661 | 0.878126 |
1 | 576,886 | 0.87206 |
1 | 1,840,933 | 0.861878 |
1 | 23,658 | 0.843816 |
1 | 1,058,714 | 0.829639 |
1 | 190,430 | 0.828554 |
1 | 28,092 | 0.822165 |
1 | 694,140 | 0.812565 |
1 | 8,569 | 0.807108 |
1 | 171,094 | 0.80478 |
1 | 1,533,875 | 0.79523 |
1 | 651,774 | 0.757275 |
1 | 847,067 | 0.715461 |
1 | 705,945 | 0.705883 |
1 | 1,021,502 | 0.691223 |
1 | 686,109 | 0.569833 |
1 | 1,036,092 | 0.53568 |
1 | 840,246 | 0.529732 |
1 | 1,781,377 | 0.523748 |
1 | 276,320 | 0.007044 |
1 | 1,610,830 | 0.000572 |
1 | 1,195,559 | 0.000498 |
1 | 359,573 | 0.00047 |
1 | 715,035 | 0.000432 |
1 | 977,455 | 0.000427 |
1 | 1,810,895 | 0.000303 |
1 | 716,263 | 0.000277 |
1 | 1,513,642 | 0.000032 |
1 | 1,769,368 | 0.000031 |
1 | 558,421 | 0.000031 |
1 | 526,193 | 0.000031 |
1 | 4,541 | 0.000031 |
2 | 2 | 8 |
2 | 881,881 | 1.900098 |
2 | 1,101,201 | 1.859796 |
2 | 180,493 | 0.995006 |
2 | 827,690 | 0.993858 |
2 | 996,864 | 0.989085 |
2 | 823,217 | 0.97942 |
2 | 619,574 | 0.974717 |
2 | 208,519 | 0.970597 |
2 | 258,090 | 0.97041 |
2 | 1,347,221 | 0.96985 |
2 | 929,227 | 0.953013 |
2 | 703,657 | 0.909969 |
2 | 709,305 | 0.885086 |
2 | 309,236 | 0.849194 |
2 | 988,677 | 0.847887 |
2 | 1,486,229 | 0.843491 |
2 | 143,720 | 0.843166 |
2 | 955,542 | 0.441267 |
2 | 460,611 | 0.438556 |
OTTO recommender system: events and covisitation matrices
Data for a replication of the 3rd-place solution of the Kaggle OTTO multi-objective recommender system competition (Chris Deotte's part, cdeotte/Kaggle-OTTO-Comp), converted to Polars.
Each event is one click, cart or order of an article (aid) in a user session. The task is to
predict, for each test session, the next clicks, carts and orders.
Event files
| File | Events | Sessions | Time range |
|---|---|---|---|
train.parquet |
216,716,096 | 12,899,779 (ids 0β12,899,778) | 2022-07-31 22:00 β 2022-08-28 21:59:59 |
test.parquet |
6,928,123 | 1,671,803 (ids 12,899,779β14,571,581) | 2022-08-28 22:00 β 2022-09-04 21:59:51 |
test_full.parquet |
13,851,293 | the same 1,671,803 sessions as test.parquet |
2022-08-28 22:00 β 2022-09-04 21:59:59.984 |
train.parquetandtest.parquetare the Kaggle competition train and test sets.test_full.parquethas the same sessions astest.parquet, with about twice as many events and millisecond timestamps, covering the whole test week.
Schema:
| Column | Type | Notes |
|---|---|---|
session |
Int32 (Int64 in test_full.parquet) |
|
aid |
Int32 (Int64 in test_full.parquet) |
article id |
ts |
Datetime(ms), no time zone | |
type |
UInt8 | 0 = clicks, 1 = carts, 2 = orders |
Every file is sorted by session, then ts.
type is a plain UInt8, not an Enum, because the Polars GPU engine (cudf-polars) rejects
Enum/Categorical columns. Earlier versions of these files stored type as an Enum and
test.parquet's ts as Int32 epoch seconds; they are still in the commit history.
raw/
The files in their original format: ts as Int32 epoch seconds, type as UInt8.
id2type.pkl and type2id.pkl map between the codes and the names clicks, carts and orders.
covisit_matrices/
The 20 covisitation matrices from Chris Deotte's train/covisit_matrices/ notebooks, computed by
save_covisits.py (Polars, GPU engine) from train.parquet and test.parquet.
Each file has the columns aid (Int32), aid_y (Int32) and value (Float64): for each aid,
the top aid_y by value, sorted by aid, value descending, then aid_y. File names are the
reference notebooks' pickle names without their _<PART> suffix (the reference split some
matrices by aid range to save memory). The top_N in a name does not always match the number
kept; see the "Top" column.
Unless noted, a matrix is built from train + test events. "1 per session" means each (aid, aid_y) pair counts at most once per session.
| File | Ver | Top | Rows | Pairs and weight |
|---|---|---|---|---|
top_40_buy2buy_v90.parquet |
90 | 40 | 28,710,067 | carts/orders within 14 days of each other; number of sessions |
top_40_orders_carts_v95.parquet |
95 | 40 | 68,667,092 | each session's last 30 events; 0.5^hours apart, Γ4 if aid_y is a cart/order |
top_40_buy2buy_v99.parquet |
99 | 40 | 24,920,206 | carts/orders in the last 28 days, 1 per session; 0.5^hours apart |
top_80_aids_v93.parquet |
93 | 80 | 103,281,791 | each session's last 30 events, < 24 h apart, 1 per session; 0.5^hours Γ (1 + 3 Γ position of aid's time between train start and test end) |
top_40_aids_v115.parquet |
115 | 40 | 67,168,397 | all events in the last 21 days, all pairs (including aid = aid_y), 1 per session; 0.5^hours apart |
top_40_aids_v116.parquet |
116 | 40 | 69,192,950 | events in the last 28 days, aid_y later than aid, 1 per session; 0.5^hours apart if aid_y is a cart/order, else 0 |
top_40_aids_v155_d0.parquet |
155 | 40 | 2,969,701 | test events only; any event β a later cart/order, 1 per session; 0.5^(hours/6) |
top_80_aids_v157_d0.parquet |
157 | 80 | 24,185,781 | test events only; all pairs, 1 per session; 0.5^(hours/6) |
top_40_aids_v165.parquet |
165 | 40 | 1,226,652 | short sessions (β€ 6 events in train, β€ 3 in test); any event β a cart/order, 1 per session; 0.5^hours apart |
top_40_aids_v166.parquet |
166 | 40 | 60,930,199 | as 165, for the longer sessions |
top_40_aids_v167.parquet |
167 | 40 | 44,757,444 | aid's event before 14:00 (UTC+2) β a cart/order, 1 per session; 0.5^hours apart |
top_40_aids_v168.parquet |
168 | 40 | 53,683,361 | as 167, for aid's events from 14:00 (UTC+2) |
top_40_aids_v217.parquet |
217 | 40 | 42,474,738 | aid_y's first event in the session is next to an aid event; number of sessions |
top_40_aids_v220.parquet |
220 | 80 | 81,165,344 | as 217, 1β2 events apart |
top_40_aids_v226.parquet |
226 | 80 | 14,883,417 | as 217 on carts/orders only, aid_y 1β3 carts/orders after aid |
top_40_aids_v232.parquet |
232 | 80 | 94,819,911 | as 217, 1β3 events apart, 1 per session; 0.5^hours apart |
top_40_aids_v235.parquet |
235 | 80 | 117,174,985 | as 232, 1β6 events apart |
top_40_aids_v239.parquet |
239 | 20 | 21,325,150 | any event β a cart/order within the next 2 hours; per reference data file the closest pair, 0.5^hours, summed over files |
top_40_aids_v700.parquet |
700 | 40 | 2,031,806 | sessions starting in the last 21 days; first event β carts/orders; sessions where aid_y was carted plus sessions where it was ordered |
top_40_aids_v701.parquet |
701 | 40 | 9,256,257 | sessions starting in the last 21 days; first event β each (aid_y, type)'s first event; 0.5^hours apart |
"Last N days" is counted back from the end of the test week (2022-09-04 21:59:51), as in the reference notebooks.
These matrices use the full Kaggle train and test sets, which corresponds to Chris Deotte's
leaderboard setting (infer/covisit_matrices_LB). His train/ notebooks build the same matrices
from a local train/validation split instead.
Loading one with Polars:
import polars as pl
covisit = pl.read_parquet(
"hf://datasets/seanv507/kaggle-otto-multi-objective/covisit_matrices/top_40_aids_v217.parquet"
)
- Downloads last month
- 433