diff --git a/DATASHEET.md b/DATASHEET.md index 139dccbd8aa388333bb8357b454a7d55841baae6..d71a4519d96061a0981fed99df5dc12a23fedbb5 100644 --- a/DATASHEET.md +++ b/DATASHEET.md @@ -1,32 +1,50 @@ # Datasheet for the ViHoRec Dataset -Following the *Datasheets for Datasets* framework (Gebru et al., 2021). All -statistics below are produced automatically by `scripts/quality_control.py`, -`scripts/anonymize.py`, and `scripts/make_benchmark_split.py`. +Revision 1 of the public release. Statistics match the revised manuscript: +17,911 interactions, 6,822 reviewer keys, and a three-way temporal split +(798 keys; 8,645 train / 798 validation / 798 test). + +Following the *Datasheets for Datasets* framework (Gebru et al., 2021). +Counts are produced by `scripts/quality_control.py`, `scripts/anonymize.py`, +and `scripts/make_benchmark_split.py` in +[MinhNguyenDS/ViHoRec](https://github.com/MinhNguyenDS/ViHoRec). ## 1. Motivation - **Purpose.** There is no publicly documented Vietnamese hotel recommendation dataset. ViHoRec fills this gap for research on collaborative filtering, - content-based, and hybrid recommendation, and on cold-start handling. -- **Created by.** The authors (University of Information Technology, VNU-HCM). + content-based, and hybrid recommendation, and on short-history ranking. + The full corpus is cold-start dominated (most reviewer keys have one + interaction); the public protocol is short-history, not strict cold-start. +- **Created by.** The authors (University of Information Technology, VNU-HCM, + and University of Science, VNU-HCM). - **Not for.** Commercial use (see LICENSE) or re-identification of individuals. ## 2. Composition -Three released tables (`release/`): -| File | Rows | Columns | +| Hub subset | Rows | Columns | |---|---|---| -| `interactions.csv` | 18,267 | user_id, hotel_id, rating, date, source | -| `users.csv` | 6,832 | user_id, n_interactions | -| `hotels.csv` | 560 | hotel_id, name, location | -| content metadata (`data_content_based_raw.csv`) | 309 | 11 attributes (facilities, surroundings, vicinity, price, distance, ...) | +| `interactions` | 17,911 | user_id, hotel_id, rating, date, source | +| `users` | 6,822 | user_id, n_interactions | +| `hotels` | 560 | hotel_id, name, location | +| `content` | 310 rows / 309 names | 11 attributes (see below) | +| `benchmark` | 8,645 / 798 / 798 | userID, itemID, rating, timestamp | +| `benchmark_ge7` | 8,645 / 506 / 512 | same schema; holdouts rated ≥ 7 | -- **Instances.** A row in `interactions.csv` is one user–hotel rating (0–10) - with a timestamp and its originating site. -- **Sources.** Booking.com (7,597), Traveloka (6,273), Ivivu (4,404). -- **Ratings** span 1.0–10.0; **dates** span 2011-10-15 to 2023-12-09. -- **Sensitive data.** Direct identifiers (reviewer display names) are **removed** - before release; user ids are salted-HMAC pseudonyms (see §6). +- **Instances.** A row in `interactions` is one reviewer-key–hotel rating on + the [1, 10] scale (mean 7.58), with a date and its originating site. +- **Sources (raw crawl).** Booking.com 7,597; Traveloka 6,273; Ivivu 4,404. + After dropping exact duplicates and placeholder names, the released rows + are Booking.com 7,239; Traveloka 6,273; Ivivu 4,399. +- **Dates** span 2011-10-15 to 2023-12-09. +- **Content metadata.** Facilities, surroundings (Around), vicinity, price, + plus name, location, overall rating, review count, quality, distance to + center, and booking link. The sheet has 310 rows and 309 distinct names: + Mövenpick Villas & Residences Phu Quoc appears twice, once from Booking.com + and once from Traveloka, with different attributes. The manuscript count + of 309 is distinct names. Text from this sheet covers 283 of 535 benchmark + hotels (52.9%). +- **Sensitive data.** Reviewer display names are removed before release. + `user_id` is a salted-HMAC pseudonym (see §6), not an anonymized person id. ## 3. Collection Process - **How.** Automated crawling with `requests`/BeautifulSoup and JSON review @@ -37,54 +55,71 @@ Three released tables (`release/`): - **Timeframe.** Reviews were posted 2011–2023; crawling performed in 2023. ## 4. Preprocessing / Cleaning / Quality Control -Reproduced by `scripts/quality_control.py`. Reported measures: | Check | Result | |---|---| -| Field completeness | 0% missing after collection-time imputation (see limitation below) | +| Raw interactions | 18,274 | +| Placeholder reviewer names | 357 rows (1.95%); 356 dropped (`Không tên`, `Guest`, and variants) | +| Other fields missing | 0.0% | | Exact duplicate interactions | 7 (0.038%) removed | -| Near-duplicates (reviewer + canonical hotel + date) | 11 (0.060%) | +| Near-duplicates (reviewer + canonical hotel + date) | 11 (0.060%); 4 retained because the rating differs | | Invalid / out-of-range ratings | 0 (dirty token `8..5` repaired) | | Unparsable dates | 0 | -| Raw hotel names → canonical hotels | 581 → 560 (21 spelling variants merged, 3.6%) | -| Hotels appearing on ≥2 sites | 78 | -| Hotels with conflicting location | 1 (flagged) | +| Raw hotel names → canonical hotels | 581 → 560 | +| Hotels appearing on ≥2 sites | 81 | +| Hotels with conflicting location | 0 | +| Interactions after cleaning | 17,911 | +| Reviewer keys / hotels | 6,822 / 560 | -- **Entity resolution.** Cross-site hotel matching uses an accent-free, - stopword-stripped, order-independent canonical key (`textnorm.py`), replacing - the original naïve `LabelEncoder(NameHotel)` exact-string matching. -- **Manual validation.** `annotation_agreement.py` draws a stratified sample - (default n≈250: interactions + hotels) for ≥2 annotators and reports percent - agreement and Cohen's / Fleiss' κ, plus an estimated record-accuracy rate. +- **Entity resolution.** Listings merge when they share a city and the same + discriminative name tokens, and their stated property types are compatible. + Pair-level validation is documented in the GitHub `reports/er_validation.md`. +- **Identity.** `user_id` is a reviewer-name key, not a person. A same-day + multi-city audit is a floor of 69 colliding keys (1.01%), covering 3,513 + interactions (19.6%). The longest remaining history is 210. The previous + 342-review bucket was a placeholder name and is not in this release. +- **Public split.** Three-way temporal leave-one-out. A key enters when it + has at least four interactions. Per key, chronological order: the last + interaction is test, the second-last is validation, and the remainder is + train. The matrix is 798 keys × 535 hotels: 8,645 / 798 / 798, sparsity + 97.60%. The shortest training history is 2 (183 keys). See + `benchmark/PROTOCOL.md` and `benchmark/split_config.json`. +- **Relevance.** Implicit next reviewed hotel. Every crawled rating is a + positive. `benchmark_ge7` is the sensitivity fold that keeps only holdouts + rated at least 7 (506 validation / 512 test users). Training rows are unchanged. +- **Manual validation.** A stratified sample of 248 records (186 interactions + and 62 hotels). Checklist pass rates and the hotel-panel percent agreement + are reported in the manuscript. ## 5. Uses -- Recommended: benchmarking CF/CB/hybrid recommenders, cold-start studies, - Vietnamese-language RecSys, low-resource / sparse-data research. +- Recommended: benchmarking CF, content-based, and hybrid recommenders; + short-history studies; Vietnamese-language RecSys; sparse-data research. + Keys with a single interaction stay in the corpus and are excluded from scoring. - **Known limitations.** - - Small scale (18k interactions) vs. MovieLens-100k / Amazon; sparse - (97.5% sparsity in the benchmark split). - - Reviewer display names were partially imputed/normalised at crawl time - (missing names were replaced), so `n_interactions` per user and the - number of distinct users are approximate — user identity is derived from - a low-cardinality name string and may merge distinct individuals. - - Ratings are aggregate scores, not multi-criteria. + - Small scale (17,911 interactions); the benchmark matrix is 97.60% sparse. + - Reviewer keys come from display names. 6,822 is an upper bound on + identifiers and a lower bound on people. + - Content text covers 52.9% of benchmark hotels. + - Ratings are a single aggregate score, not multi-criteria. + - Hyper-parameters in `benchmark/baseline_ci.md` were selected on validation. + Do not retune them on `test`. -## 6. Ethics, Terms of Service & Legal +## 6. Ethics, Terms of Service and Legal - **Terms of Service.** Booking.com, Traveloka, and Ivivu restrict automated - scraping and commercial reuse in their ToS. To stay within a defensible - research-use position we: (a) collected only publicly visible review text and - ratings, no private/account data; (b) do **not** redistribute raw HTML or - full review text, only derived numeric ratings and hotel metadata; - (c) release under **CC BY-NC 4.0** (non-commercial); (d) provide takedown on - request. Users of this dataset must comply with the source platforms' ToS. -- **Personal data / anonymisation.** No emails, account ids, or full names are - released. `anonymize.py` drops the display name entirely and assigns a - salted `HMAC-SHA256(secret_salt, name)[:12]` pseudonym; the secret salt is - kept off-repo (`VIHOREC_SALT`) and the name→id lookup - (`reports/_private_mapping.csv`) is **never** published. -- **Risk.** Re-identification risk is low: no free-text, no geolocation beyond - city, and pseudonymous ids. + scraping and commercial reuse. This release: (a) collected only publicly + visible ratings, dates, hotel names, and city locations; (b) does not + redistribute raw HTML or full review text; (c) uses CC BY-NC 4.0; + (d) accepts takedown requests. Users must still comply with the source + platforms' terms in their own jurisdiction. +- **Personal data / pseudonymization.** No emails, account ids, or display + names are released. `anonymize.py` assigns + `HMAC-SHA256(secret_salt, name)[:12]`. The salt is kept off-repository + (`VIHOREC_SALT`). The name-to-id lookup is never published. HMAC is not + anonymization. +- **Risk.** Residual re-identification risk is non-zero, mainly for prolific + reviewers with distinctive rating sequences. Mitigations: no review text, + city-level location only, unpublished name map. -## 7. Distribution & Maintenance -- Hosted with a versioned DOI (e.g., Zenodo); this repository is the canonical - build pipeline. Report issues / request takedown to the corresponding author. +## 7. Distribution and Maintenance +- This repository is the revision-1 Hub build. The construction pipeline + lives on GitHub. Report issues or request takedown from the corresponding author. diff --git a/LICENSE b/LICENSE index 9a0e8da6c6c3cebc0841c7ea080d42a4b263dc12..fefd39c19e42347c6c33b950ec49567af25970c5 100644 --- a/LICENSE +++ b/LICENSE @@ -1,9 +1,9 @@ ViHoRec Dataset License ======================= -The ViHoRec dataset (the anonymised files under `dataset_release/release/`: -interactions.csv, users.csv, hotels.csv, and the benchmark split) is released -under the +The ViHoRec dataset (the pseudonymised files in this repository: +interactions, users, hotels, content metadata, and the benchmark splits) +is released under the Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0) @@ -19,9 +19,13 @@ Under the following terms: changes were made. * NonCommercial - You may not use the material for commercial purposes. -The accompanying source code under `dataset_release/scripts/` is released under +The accompanying source code in the GitHub repository is released under the MIT License and may be reused, including commercially. +User identifiers are HMAC-SHA256 pseudonyms of reviewer display names. +That is not anonymization: a holder of the secret salt could re-identify +a key, and common names can still collide. See DATASHEET.md. + Rationale for NonCommercial --------------------------- The underlying reviews were published by users on third-party booking platforms @@ -34,9 +38,13 @@ CITATION -------- If you use this dataset, please cite: -@article{vihorec, - title = {ViHoRec: A Vietnamese Hotel Recommendation Dataset with a - Documented Collection and Quality-Control Pipeline}, - author = {Nguyen, Hoang Minh}, - year = {2026} +@misc{nguyen2026vihorec, + title = {ViHoRec: A Quality-Controlled Vietnamese Hotel Recommendation + Dataset and Short-History Benchmark}, + author = {Nguyen, Minh Hoang and Huynh, Tin Van and Nguyen, Kiet Van}, + year = {2026}, + eprint = {2607.12946}, + archivePrefix= {arXiv}, + primaryClass = {cs.IR}, + url = {https://arxiv.org/abs/2607.12946} } diff --git a/README.md b/README.md index 79042010af9f533828204229fc2654d16def028c..103e77565745aa0ddc09673a19ec36bc8b41d090 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ tags: - recommender-systems - hotel - vietnamese -- cold-start +- short-history - tabular - entity-resolution - parquet @@ -31,12 +31,26 @@ configs: data_files: - split: train path: data/hotels/train-*.parquet +- config_name: content + data_files: + - split: train + path: data/content/train-*.parquet - config_name: benchmark data_files: - split: train path: data/benchmark/train-*.parquet + - split: validation + path: data/benchmark/validation-*.parquet - split: test path: data/benchmark/test-*.parquet +- config_name: benchmark_ge7 + data_files: + - split: train + path: data/benchmark_ge7/train-*.parquet + - split: validation + path: data/benchmark_ge7/validation-*.parquet + - split: test + path: data/benchmark_ge7/test-*.parquet dataset_info: - config_name: interactions features: @@ -52,7 +66,7 @@ dataset_info: dtype: string splits: - name: train - num_examples: 18267 + num_examples: 17911 - config_name: users features: - name: user_id @@ -61,7 +75,7 @@ dataset_info: dtype: int64 splits: - name: train - num_examples: 6832 + num_examples: 6822 - config_name: hotels features: - name: hotel_id @@ -73,6 +87,33 @@ dataset_info: splits: - name: train num_examples: 560 +- config_name: content + features: + - name: Location + dtype: string + - name: NameHotel + dtype: string + - name: RatingHotel + dtype: float64 + - name: CountRating + dtype: int64 + - name: Price + dtype: int64 + - name: Facilities + dtype: string + - name: Quality + dtype: float64 + - name: DistanceCenter + dtype: float64 + - name: Around + dtype: string + - name: Vicinity + dtype: string + - name: Link + dtype: string + splits: + - name: train + num_examples: 310 - config_name: benchmark features: - name: userID @@ -85,85 +126,113 @@ dataset_info: dtype: int64 splits: - name: train - num_examples: 9787 + num_examples: 8645 + - name: validation + num_examples: 798 - name: test - num_examples: 800 + num_examples: 798 +- config_name: benchmark_ge7 + features: + - name: userID + dtype: int64 + - name: itemID + dtype: int64 + - name: rating + dtype: float32 + - name: timestamp + dtype: int64 + splits: + - name: train + num_examples: 8645 + - name: validation + num_examples: 506 + - name: test + num_examples: 512 --- # ViHoRec — Vietnamese Hotel Recommendation Dataset -Paper: [arXiv:2607.12946](https://arxiv.org/abs/2607.12946) · [Hugging Face Papers](https://huggingface.co/papers/2607.12946) +Revision 1 public release. Paper: [arXiv:2607.12946](https://arxiv.org/abs/2607.12946) · [Hugging Face Papers](https://huggingface.co/papers/2607.12946) -A **quality-controlled, anonymised, benchmark-ready** Vietnamese hotel -recommendation dataset for recommender-systems research. +A **quality-controlled, pseudonymised, benchmark-ready** Vietnamese hotel +recommendation dataset. `user_id` is an HMAC of a reviewer display name +(a reviewer key, not an anonymised person). The public protocol is a +**short-history** three-way temporal split, not a strict cold-start benchmark. | Resource | Count | |---|---| -| Interactions (cleaned) | 18,267 | -| Users | 6,832 | +| Interactions (cleaned) | 17,911 | +| Reviewer keys | 6,822 | | Hotels | 560 | -| Benchmark split | 800 users × 535 hotels (9,787 train / 800 test) | +| Content sheet | 310 rows, 309 distinct names | +| Benchmark split | 798 keys × 535 hotels (8,645 train / 798 validation / 798 test) | Sources: Booking.com, Traveloka, Ivivu. License: **CC BY-NC 4.0** (data), MIT (code on GitHub). +This card replaces the previous Hub build (18,267 interactions, 6,832 keys, two-way 800 / 9,787 / 800). Placeholder reviewer names are dropped, and hyper-parameters are selected on validation. + ## Dataset Viewer / subsets The Hub Dataset Viewer is configured via the YAML `configs` block above. -Use the **Subset** dropdown: +Use the **Subset** dropdown. The validation split is the manuscript `val.csv`. | Subset | Splits | Rows | Description | |---|---|---|---| -| `interactions` (default) | `train` | 18,267 | user–hotel ratings | -| `users` | `train` | 6,832 | user aggregates | -| `hotels` | `train` | 560 | hotel metadata | -| `benchmark` | `train` / `test` | 9,787 / 800 | public LOO split | +| `interactions` (default) | `train` | 17,911 | reviewer-key–hotel ratings | +| `users` | `train` | 6,822 | key aggregates | +| `hotels` | `train` | 560 | canonical hotel catalogue | +| `content` | `train` | 310 | hotel text metadata (11 attributes) | +| `benchmark` | `train` / `validation` / `test` | 8,645 / 798 / 798 | public three-way split | +| `benchmark_ge7` | `train` / `validation` / `test` | 8,645 / 506 / 512 | same train fold; holdouts rated ≥ 7 | -Data files live under `data//-00000-of-00001.parquet` (plus CSV twins for convenience). +Data files live under `data//-00000-of-00001.parquet` (plus CSV twins). Paper-named copies of the canonical split are `benchmark/train.csv`, `benchmark/val.csv`, and `benchmark/test.csv`. ## Load with 🤗 Datasets ```python from datasets import load_dataset -# default subset = interactions -ds = load_dataset("MinhDS/ViHoRec") -print(ds["train"][0]) - interactions = load_dataset("MinhDS/ViHoRec", "interactions") users = load_dataset("MinhDS/ViHoRec", "users") hotels = load_dataset("MinhDS/ViHoRec", "hotels") -benchmark = load_dataset("MinhDS/ViHoRec", "benchmark") # train + test +content = load_dataset("MinhDS/ViHoRec", "content") +benchmark = load_dataset("MinhDS/ViHoRec", "benchmark") # train + validation + test -# streaming (no full download) -stream = load_dataset("MinhDS/ViHoRec", "interactions", split="train", streaming=True) -for row in stream.take(3): - print(row) +train = benchmark["train"] +val = benchmark["validation"] +test = benchmark["test"] ``` -Or with pandas / Polars: +Or with pandas: ```python import pandas as pd interactions = pd.read_parquet("hf://datasets/MinhDS/ViHoRec/data/interactions/train-00000-of-00001.parquet") train = pd.read_parquet("hf://datasets/MinhDS/ViHoRec/data/benchmark/train-00000-of-00001.parquet") +val = pd.read_parquet("hf://datasets/MinhDS/ViHoRec/data/benchmark/validation-00000-of-00001.parquet") test = pd.read_parquet("hf://datasets/MinhDS/ViHoRec/data/benchmark/test-00000-of-00001.parquet") ``` -## Repository layout (Hub) +## Repository layout ``` data/ ├── interactions/train-00000-of-00001.{parquet,csv} ├── users/train-00000-of-00001.{parquet,csv} ├── hotels/train-00000-of-00001.{parquet,csv} -└── benchmark/ - ├── train-00000-of-00001.{parquet,csv} - └── test-00000-of-00001.{parquet,csv} -benchmark/ # reference artifacts (not in Viewer configs) +├── content/train-00000-of-00001.{parquet,csv} +├── benchmark/{train,validation,test}-00000-of-00001.{parquet,csv} +└── benchmark_ge7/{train,validation,test}-00000-of-00001.{parquet,csv} +benchmark/ # reference artifacts (not all in Viewer configs) +├── train.csv / val.csv / test.csv ├── user_map.csv / item_map.csv ├── split_config.json -└── baseline_results*.csv +├── PROTOCOL.md +├── baseline_results*.csv / baseline_ci.md +├── neural_results.csv +├── recommenders_sota.md / cornac_sota.md +└── relevance_ge_7/ # companion split, paper filenames DATASHEET.md LICENSE README.md @@ -171,22 +240,38 @@ README.md ## Key statistics - Raw interactions: 18,274 (Booking 7,597 / Traveloka 6,273 / Ivivu 4,404) -- After cleaning: **18,267** interactions, **6,832** users, **560** hotels -- Entity matching merged 21 cross-site name variants; 78 hotels on ≥2 sites -- Benchmark split: 800 users × 535 items, 9,787 train / 800 test, 97.53% sparse +- After cleaning: **17,911** interactions, **6,822** reviewer keys, **560** hotels + (7 exact duplicates and 356 placeholder-name rows removed) +- Released source rows: Booking 7,239 / Traveloka 6,273 / Ivivu 4,399 +- City- and type-aware entity resolution; 81 hotels on ≥2 sites; 0 hotels left with a conflicting location +- Benchmark: 798 keys × 535 hotels, 8,645 train / 798 validation / 798 test, 97.60% sparse +- Shortest train history = 2 (183 keys). Single-interaction keys stay in the corpus and are not scored +- Closed-form test Recall@10 (validation-tuned): UserKNN 0.129, Hybrid-fixed (λ=0.7) 0.135, Adaptive Hybrid 0.133, EASE (λ=1000) 0.120 +- Sequential reference on the same freeze: SASRec and SSEPT Recall@10 = 0.172 +- Do not cite the submitted two-way Adaptive Hybrid Recall@10 of 0.1388 -## Full pipeline & code -The reproducible construction scripts live on GitHub: +## Full pipeline and code +Construction scripts live on GitHub: [MinhNguyenDS/ViHoRec](https://github.com/MinhNguyenDS/ViHoRec). ```bash -# rebuild Hub-ready parquet/csv layout from release/ -python scripts/prepare_hf_hub.py -# then: huggingface-cli upload MinhDS/ViHoRec hf_hub/ . --repo-type dataset +huggingface-cli upload MinhDS/ViHoRec hf_hub_r1/ . --repo-type dataset ``` ## Citation -If you use ViHoRec, please cite [arXiv:2607.12946](https://arxiv.org/abs/2607.12946) +If you use ViHoRec, please cite [arXiv:2607.12946](https://arxiv.org/abs/2607.12946): + +```bibtex +@misc{nguyen2026vihorec, + title={ViHoRec: A Quality-Controlled Vietnamese Hotel Recommendation Dataset and Short-History Benchmark}, + author={Nguyen, Minh Hoang and Huynh, Tin Van and Nguyen, Kiet Van}, + year={2026}, + eprint={2607.12946}, + archivePrefix={arXiv}, + primaryClass={cs.IR}, + url={https://arxiv.org/abs/2607.12946} +} +``` See `DATASHEET.md` for provenance, ethics, and known limitations. diff --git a/benchmark/PROTOCOL.md b/benchmark/PROTOCOL.md new file mode 100644 index 0000000000000000000000000000000000000000..d7bb5e3851ffe7d1e0e45a5ae81a3bfcac4be72b --- /dev/null +++ b/benchmark/PROTOCOL.md @@ -0,0 +1,63 @@ +# ViHoRec public evaluation protocol + +This is the frozen protocol for the revised release. Scripts that search a +hyper-parameter must read `val.csv`; `test.csv` is scored once. + +## Task name + +**Short-history / temporal leave-one-out recommendation.** + +It is not a strict user-cold-start protocol. Eligible users have at least four +interactions in the cleaned corpus. After the last and second-last reviews are +held out, every evaluated user still has at least two training interactions. +The shortest test bucket is therefore train-history length **2**, not 0. + +The full corpus *is* cold-start dominated as a **dataset property**: most +reviewer keys have a single interaction and are excluded from this split. +That fact belongs in the characterization table, not in the name of the +benchmark. + +## Fold assignment (per user, chronological) + +| Fold | Assignment | File | +|---|---|---| +| train | all interactions except the last two | `train.csv` | +| val | second-last interaction | `val.csv` | +| test | last interaction | `test.csv` | + +Ordering is per user, not a global calendar cut. One user's training review +can be later than another user's test review. Identifiers are remapped to +contiguous integers in `user_map.csv` / `item_map.csv`. + +Current counts (see `split_config.json`): + +- 798 users × 535 hotels +- 8,645 train / 798 val / 798 test +- train-history min / median / max = 2 / 5 / 208 +- 183 users have exactly two training interactions +- sparsity 97.60% + +## Relevance (I10) + +The task is implicit next-item ranking. For a user, the single relevant item +is the hotel they reviewed next, **regardless of the numeric score**. Every +crawled rating is a positive (Cornac `rating_threshold = 0.5`). A 3/10 visit +counts the same as a 10/10 visit: the signal is the visit. + +A sensitivity variant that keeps only holdouts rated ≥ 7 lives in +`relevance_ge_7/` (train unchanged; 506 val / 512 test users remain). Do not +overwrite the canonical files with that ablation. + +## What must not happen + +- Selecting λ, `(α_min, n0, τ)`, EASE λ, or neural hyper-parameters on `test.csv` +- Calling the min-k = 4 protocol a cold-start benchmark +- Quoting submitted Adaptive Recall@10 0.1388 / 0.141 or `adaptive_hybrid_results.md` from the two-way run (the val-tuned file now matches `baseline_ci.md`) + +## Statistics (Phase 3) + +Primary claims use per-user Recall@10 and NDCG@10. Uncertainty is a percentile +bootstrap 95% CI over users (10,000 resamples). Model comparisons are paired +Wilcoxon signed-rank tests on per-user Recall@10 (ties dropped). The pairing +unit is the user: leave-one-out ranking scores are bounded and zero-inflated, +so a Gaussian t-test is the wrong default. diff --git a/benchmark/adaptive_hybrid_results.csv b/benchmark/adaptive_hybrid_results.csv new file mode 100644 index 0000000000000000000000000000000000000000..65641ffde6f8a5c65c99f0706b51d406d9dc260c --- /dev/null +++ b/benchmark/adaptive_hybrid_results.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d97548f9bd537d9076454ffaf5e698ef392dc573bb91f0c558edeb7b4a482bd +size 580 diff --git a/benchmark/adaptive_hybrid_results.md b/benchmark/adaptive_hybrid_results.md new file mode 100644 index 0000000000000000000000000000000000000000..9cdf29a90c00314e27164f7f910c6176204384d8 --- /dev/null +++ b/benchmark/adaptive_hybrid_results.md @@ -0,0 +1,8 @@ +| Method | MRR | MAP@5 | NDCG@5 | Precision@5 | Recall@5 | MAP@10 | NDCG@10 | Precision@10 | Recall@10 | +|---|---|---|---|---|---|---|---|---|---| +| UserKNN-cosine | 0.0606 | 0.0387 | 0.0492 | 0.0163 | 0.0815 | 0.0449 | 0.0644 | 0.0129 | 0.1291 | +| Content-TFIDF | 0.0287 | 0.0126 | 0.0160 | 0.0053 | 0.0263 | 0.0164 | 0.0252 | 0.0055 | 0.0551 | +| Hybrid-fixed (lam=0.7) | 0.0608 | 0.0378 | 0.0458 | 0.0140 | 0.0702 | 0.0462 | 0.0665 | 0.0135 | 0.1353 | +| AdaptiveHybrid-uncon | 0.0512 | 0.0316 | 0.0375 | 0.0110 | 0.0551 | 0.0367 | 0.0499 | 0.0094 | 0.0940 | +| AdaptiveHybrid-default | 0.0629 | 0.0404 | 0.0502 | 0.0160 | 0.0802 | 0.0471 | 0.0666 | 0.0132 | 0.1316 | +| AdaptiveHybrid-valtuned | 0.0639 | 0.0405 | 0.0490 | 0.0150 | 0.0752 | 0.0480 | 0.0675 | 0.0133 | 0.1328 | \ No newline at end of file diff --git a/benchmark/baseline_ci.csv b/benchmark/baseline_ci.csv new file mode 100644 index 0000000000000000000000000000000000000000..0161848ec40e39eccb4324d7c3f93fc6dd2808a0 --- /dev/null +++ b/benchmark/baseline_ci.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ef3cafef8d5b49f25af737d32a38a7039f87ea2d7f696bf9e9024a3493cfb8f5 +size 892 diff --git a/benchmark/baseline_ci.md b/benchmark/baseline_ci.md new file mode 100644 index 0000000000000000000000000000000000000000..46f763eaa9df49cfc0747040189ae5f369b6ed38 --- /dev/null +++ b/benchmark/baseline_ci.md @@ -0,0 +1,17 @@ +# ViHoRec baselines (three-way split; val-tuned, test once) + +Hybrid-fixed λ = 0.7. Adaptive Hybrid {'alpha_min': 0.85, 'n0': 6.0, 'tau': 1.0} (val Recall@10 = 0.1341). EASE λ = 1000. + +95% CIs are percentile bootstrap over users (10,000 resamples). p is two-sided Wilcoxon signed-rank on per-user Recall@10 vs UserKNN. \* p<0.05, \*\* p<0.01, \*\*\* p<0.001. + +| Method | R@10 | 95% CI | N@10 | 95% CI | MRR | vs UserKNN | +|---|---:|---|---:|---|---:|---| +| Random | 0.0159 | [0.0109, 0.0213] | 0.0080 | [0.0053, 0.0109] | 0.0123 | 0.0000*** | +| BPR-MF | 0.0977 | [0.0827, 0.1132] | 0.0485 | [0.0403, 0.0574] | 0.0493 | 0.0000*** | +| MostPop | 0.1103 | [0.0890, 0.1328] | 0.0539 | [0.0425, 0.0663] | 0.0496 | 0.0588 | +| ItemKNN-cosine | 0.0865 | [0.0677, 0.1065] | 0.0420 | [0.0321, 0.0527] | 0.0426 | 0.0001*** | +| UserKNN-cosine | 0.1291 | [0.1065, 0.1529] | 0.0644 | [0.0519, 0.0777] | 0.0606 | — | +| Content-TFIDF | 0.0551 | [0.0401, 0.0714] | 0.0252 | [0.0177, 0.0336] | 0.0287 | 0.0000*** | +| Hybrid-fixed (lam=0.7) | 0.1353 | [0.1115, 0.1591] | 0.0665 | [0.0536, 0.0800] | 0.0608 | 0.5002 | +| AdaptiveHybrid | 0.1328 | [0.1103, 0.1566] | 0.0675 | [0.0545, 0.0816] | 0.0639 | 0.4386 | +| EASE (lam=1000) | 0.1203 | [0.0977, 0.1441] | 0.0595 | [0.0473, 0.0723] | 0.0573 | 0.2087 | \ No newline at end of file diff --git a/benchmark/baseline_results.csv b/benchmark/baseline_results.csv index fd32985d61d9b08e16432d73cd7f63d341a39f65..7bbf337bd350a4c0b1d65bee6ff3f80573785be3 100644 --- a/benchmark/baseline_results.csv +++ b/benchmark/baseline_results.csv @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:47088c309345f21459b3249a5b4106f221e7ec76e6a56cce5293bbefefda3b14 -size 529 +oid sha256:6297955bb8d525781dcbeefb58ca30e75b05fff2aef7ac7fcee26b463c9bbfa0 +size 767 diff --git a/benchmark/baseline_results.md b/benchmark/baseline_results.md index 40a5c7b56b8cd18ebd7cf7b71c15a85a607ab032..594f46ab8e02f173c4293ce6564d33bc9321e5d6 100644 --- a/benchmark/baseline_results.md +++ b/benchmark/baseline_results.md @@ -1,8 +1,11 @@ | Method | MRR | MAP@5 | NDCG@5 | Precision@5 | Recall@5 | MAP@10 | NDCG@10 | Precision@10 | Recall@10 | |---|---|---|---|---|---|---|---|---|---| -| Random | 0.0119 | 0.0036 | 0.0046 | 0.0016 | 0.0079 | 0.0054 | 0.0093 | 0.0023 | 0.0225 | -| MostPop | 0.0496 | 0.0310 | 0.0385 | 0.0123 | 0.0612 | 0.0368 | 0.0528 | 0.0106 | 0.1062 | -| ItemKNN-cosine | 0.0401 | 0.0212 | 0.0277 | 0.0095 | 0.0475 | 0.0252 | 0.0376 | 0.0079 | 0.0788 | -| UserKNN-cosine | 0.0630 | 0.0387 | 0.0465 | 0.0140 | 0.0700 | 0.0472 | 0.0671 | 0.0134 | 0.1338 | -| BPR-MF | 0.0512 | 0.0297 | 0.0369 | 0.0119 | 0.0592 | 0.0358 | 0.0519 | 0.0106 | 0.1058 | -| Content-TFIDF | 0.0275 | 0.0118 | 0.0165 | 0.0063 | 0.0312 | 0.0153 | 0.0249 | 0.0057 | 0.0575 | \ No newline at end of file +| Random | 0.0123 | 0.0047 | 0.0059 | 0.0019 | 0.0096 | 0.0056 | 0.0080 | 0.0016 | 0.0159 | +| BPR-MF | 0.0493 | 0.0284 | 0.0347 | 0.0109 | 0.0543 | 0.0340 | 0.0485 | 0.0097 | 0.0978 | +| MostPop | 0.0496 | 0.0310 | 0.0390 | 0.0128 | 0.0639 | 0.0371 | 0.0539 | 0.0110 | 0.1103 | +| ItemKNN-cosine | 0.0426 | 0.0245 | 0.0323 | 0.0113 | 0.0564 | 0.0285 | 0.0420 | 0.0086 | 0.0865 | +| UserKNN-cosine | 0.0606 | 0.0387 | 0.0492 | 0.0163 | 0.0815 | 0.0449 | 0.0644 | 0.0129 | 0.1291 | +| Content-TFIDF | 0.0287 | 0.0126 | 0.0160 | 0.0053 | 0.0263 | 0.0164 | 0.0252 | 0.0055 | 0.0551 | +| Hybrid-fixed (lam=0.7) | 0.0608 | 0.0378 | 0.0458 | 0.0140 | 0.0702 | 0.0462 | 0.0665 | 0.0135 | 0.1353 | +| AdaptiveHybrid | 0.0639 | 0.0405 | 0.0490 | 0.0150 | 0.0752 | 0.0480 | 0.0675 | 0.0133 | 0.1328 | +| EASE (lam=1000) | 0.0573 | 0.0347 | 0.0434 | 0.0140 | 0.0702 | 0.0412 | 0.0595 | 0.0120 | 0.1203 | \ No newline at end of file diff --git a/benchmark/baseline_results_std.csv b/benchmark/baseline_results_std.csv index ed57ec4830c2c79471381bdea0899cba3dd51043..7b7b5440d83ffeaac80861e720caee1d0be16c7e 100644 --- a/benchmark/baseline_results_std.csv +++ b/benchmark/baseline_results_std.csv @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3395e73746e85b8f73b0ddbbbc0bdc11664c77e6408bbc057dc1fba8d4e4bd8a -size 219 +oid sha256:1c1130d878d090f2cab4e75aea7723f8007f9df1fc14dc6f39cfb456793affcf +size 216 diff --git a/benchmark/cornac_sota.md b/benchmark/cornac_sota.md new file mode 100644 index 0000000000000000000000000000000000000000..5210adbe23770b8d35cb0b9787f6fdc354987a80 --- /dev/null +++ b/benchmark/cornac_sota.md @@ -0,0 +1,31 @@ +# Cornac generative / CF baselines (public three-way split) + +Fit on `train.csv`. Best-on-val checkpoint when the model supports it. `test.csv` scored once. Item text = hotel name + city + Facilities/Around/Vicinity/Price, encoded with `paraphrase-multilingual-MiniLM-L12-v2`. + +Sequential prefixes follow Cornac leave-last-out: the validation review is in the test-time history but is not a training label. That is one extra observed item relative to GRU4Rec in `run_neural_baselines.py` (train history only). + +SANSA is item–item CF (RecSys 2023). It uses the same train-only history and seen-item mask as EASE / UserKNN. SuiteSparse/CHOLMOD cannot build on this Windows env, and Cornac SANSA ICF is unstable on the 19.5%-dense 535-item gramian (the 150k-item sparse path). Reported SANSA is the exact dense LDL — the CHOLMOD density=1 closed form of Spišák et al. at this catalog size. Val-tuned λ=1000. + +| Method | MRR | NDCG@5 | Recall@5 | NDCG@10 | Recall@10 | Train (s) | Test (s) | +|---|---:|---:|---:|---:|---:|---:|---:| +| TIGER | 0.0599 | 0.0495 | 0.0802 | 0.0734 | 0.1566 | 19974 | 155 | +| RPG | 0.0673 | 0.0515 | 0.0802 | 0.0722 | 0.1454 | 2299 | 35 | +| LETTER | 0.0569 | 0.0484 | 0.0802 | 0.0698 | 0.1466 | 28724 | 171 | +| SANSA | 0.0583 | 0.0450 | 0.0727 | 0.0598 | 0.1190 | 2 | 0 | + +95% bootstrap CI over users; Wilcoxon on per-user Recall@10 vs UserKNN (R@10 = 0.1291). \* p<0.05. + +| Method | R@10 | 95% CI | N@10 | vs UserKNN | +|---|---:|---|---:|---| +| TIGER | 0.1566 | [0.1316, 0.1830] | 0.0734 | 0.0233* | +| RPG | 0.1454 | [0.1216, 0.1704] | 0.0722 | 0.2596 | +| LETTER | 0.1466 | [0.1228, 0.1717] | 0.0698 | 0.2050 | +| SANSA | 0.1190 | [0.0977, 0.1416] | 0.0598 | 0.1441 | + +Reference (same freeze, train-only history): UserKNN 0.1291, Hybrid-fixed 0.1353, GRU4Rec 0.1604, EASE λ=1000 0.1203. + +## Skipped + +- **Companion**: Needs SentimentModality (aspect–opinion tuples from reviews). ViHoRec does not release review text. +- **HypAR**: Review-hypergraph model; the public release has no review documents. +- **DiffGRM**: Paper-scale GPU recipe (d_model=256, 100 epochs, beam 128). This environment is torch CPU-only. diff --git a/benchmark/cornac_sota_ci.csv b/benchmark/cornac_sota_ci.csv new file mode 100644 index 0000000000000000000000000000000000000000..7688fee564d9133c2afa59c4d4e64ad4239bd783 --- /dev/null +++ b/benchmark/cornac_sota_ci.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:65f533fff80073e383943df316f7274cb38471b378b86696625743d770a2bb69 +size 423 diff --git a/benchmark/cornac_sota_per_user.csv b/benchmark/cornac_sota_per_user.csv new file mode 100644 index 0000000000000000000000000000000000000000..04ce0d0a305172977b5833287b3b12ab155289c3 --- /dev/null +++ b/benchmark/cornac_sota_per_user.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ad909d285e2fa13a4f9ae497ccb0038cfbaa1de2719b340127a55d6761b51cb0 +size 34722 diff --git a/benchmark/cornac_sota_results.csv b/benchmark/cornac_sota_results.csv new file mode 100644 index 0000000000000000000000000000000000000000..62f92961f305418f19c516e6e1ac7a17a7c6799e --- /dev/null +++ b/benchmark/cornac_sota_results.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9298c343d83a56f58eb2369542c5a65694399a2e2f3498302be72894fb013871 +size 414 diff --git a/benchmark/hybrid_lambda_sweep.csv b/benchmark/hybrid_lambda_sweep.csv new file mode 100644 index 0000000000000000000000000000000000000000..fbfe3a8ec895bd9b2c16fccd29ea44a9c60a46fa --- /dev/null +++ b/benchmark/hybrid_lambda_sweep.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bf1b53ae79c7dd847ff20f87c122d9d3d0e7d3dfb336c5ac4dcc8ecfc52a2510 +size 1158 diff --git a/benchmark/hybrid_sensitivity.csv b/benchmark/hybrid_sensitivity.csv new file mode 100644 index 0000000000000000000000000000000000000000..38816de0148a24d39f640878e9619d5b2fc85604 --- /dev/null +++ b/benchmark/hybrid_sensitivity.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1e417da92f9bc2d9dfca7d6c94ca55119e3460262e238bfca69dcdf97e6ad983 +size 2234 diff --git a/benchmark/item_map.csv b/benchmark/item_map.csv index 554da46c4caab3c5c8860553fd5d6e35cef9e7f9..f3c878b32393f161e277a3cc1f07c937b5425453 100644 --- a/benchmark/item_map.csv +++ b/benchmark/item_map.csv @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a0719dd721ee53fc831096b97902346bd9d4d13e3099c1b49460c1b1c8f86f99 +oid sha256:45dfca77094b4a09deee9148474cbb52334d8837ab1f79c7a852551d4ec8aae6 size 5792 diff --git a/benchmark/neural_results.csv b/benchmark/neural_results.csv new file mode 100644 index 0000000000000000000000000000000000000000..e27ae81c40e8f92a3207f2b6a7564cb98e5638c7 --- /dev/null +++ b/benchmark/neural_results.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f09abe19325341702a46d4e7f75e15782c7a5fb153e8b834ea55c860feeff699 +size 298 diff --git a/benchmark/pairwise_tests.csv b/benchmark/pairwise_tests.csv new file mode 100644 index 0000000000000000000000000000000000000000..6ed132c42095fa709f6ff8be709a09da896f171a --- /dev/null +++ b/benchmark/pairwise_tests.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3e1ce76589d288a2a54f5044b9f5fa10c1113eb917ed77afc01de10bcb81845b +size 784 diff --git a/benchmark/per_user_metrics.csv b/benchmark/per_user_metrics.csv new file mode 100644 index 0000000000000000000000000000000000000000..2ed455521ab910c6aee132574b7cbe4fa419a478 --- /dev/null +++ b/benchmark/per_user_metrics.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d17e3849418ab272c1cecad490fffd1862f6118d1f4f48e046c73714e140fa63 +size 74471 diff --git a/benchmark/recommenders_sota.md b/benchmark/recommenders_sota.md new file mode 100644 index 0000000000000000000000000000000000000000..0dfa6c1a1611e9fd4b75adc40e5aae659a5bca9f --- /dev/null +++ b/benchmark/recommenders_sota.md @@ -0,0 +1,29 @@ +# Recommenders-team baselines (public three-way split) + +Library: [recommenders-team/recommenders](https://github.com/recommenders-team/recommenders). The repo does not contain 2025–2026 *papers*; NEWS last updated April 2025. The models below are the newest **implementations** on `main`: PyTorch SASRec / SSEPT (UniRec port, 2026) and PyTorch NeuMF. + +Protocol matches `run_neural_baselines.py`: train on `train.csv`, select epoch on `val.csv`, score `test.csv` once. Train-only history, full 535-item catalogue, mask seen train items. Recommenders' built-in sampled HR@10 (100 negatives) is **not** used. + +| Method | MRR | NDCG@5 | Recall@5 | NDCG@10 | Recall@10 | Train (s) | Test (s) | +|---|---:|---:|---:|---:|---:|---:|---:| +| SASRec | 0.0753 | 0.0580 | 0.0890 | 0.0845 | 0.1717 | 75 | 0 | +| NCF-NeuMF | 0.0681 | 0.0529 | 0.0840 | 0.0726 | 0.1441 | 53 | 2 | +| SSEPT | 0.0706 | 0.0554 | 0.0915 | 0.0810 | 0.1717 | 85 | 1 | + +95% bootstrap CI over users; Wilcoxon on per-user Recall@10 vs UserKNN (R@10 = 0.1291). \* p<0.05. + +| Method | R@10 | 95% CI | N@10 | vs UserKNN | +|---|---:|---|---:|---| +| SASRec | 0.1717 | [0.1466, 0.1980] | 0.0845 | 0.0007*** | +| NCF-NeuMF | 0.1441 | [0.1203, 0.1692] | 0.0726 | 0.1396 | +| SSEPT | 0.1717 | [0.1454, 0.1980] | 0.0810 | 0.0003*** | + +Reference (same freeze, train-only history): UserKNN 0.1291, GRU4Rec 0.1604, LightGCN 0.1454, NeuMF 0.1228, TIGER 0.1566. + +## Skipped + +- **LightGCN**: Already evaluated in-repo (neural_results.csv, test R@10=0.1454). Recommenders LightGCN is the same 2020 model on the DeepRec yaml stack. +- **SUM**: TensorFlow DeepRec sequential (Lian et al., 2021). Not on the 2026 PyTorch UniRec line; extra TF dependency on Python 3.13. +- **SLi-Rec**: TensorFlow DeepRec (Microsoft, 2019). Same TF stack as SUM. +- **NextItNet**: TensorFlow DeepRec dilated CNN (Yuan et al., 2019). +- **NRMS/NAML/LSTUR**: News recommenders; they need article text. ViHoRec has hotel metadata, not news bodies. diff --git a/benchmark/recommenders_sota_ci.csv b/benchmark/recommenders_sota_ci.csv new file mode 100644 index 0000000000000000000000000000000000000000..420a6b254a0c080f8f9d52d271fe4a2a8daa5e80 --- /dev/null +++ b/benchmark/recommenders_sota_ci.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6322ff490d6e8630b5d22cb8be2e415ba53593fa1c5cd36440c7e0a66418cfb4 +size 367 diff --git a/benchmark/recommenders_sota_per_user.csv b/benchmark/recommenders_sota_per_user.csv new file mode 100644 index 0000000000000000000000000000000000000000..5b5658590f7d5e715f24201d61802a09bc51fa25 --- /dev/null +++ b/benchmark/recommenders_sota_per_user.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:434cbfbb1b20f6e45339e8bdbcad2ad8a0e23e717b3fb91185151f8e72952fb0 +size 27516 diff --git a/benchmark/recommenders_sota_results.csv b/benchmark/recommenders_sota_results.csv new file mode 100644 index 0000000000000000000000000000000000000000..efd65e117ebd86378c8906f775e153529d81f95f --- /dev/null +++ b/benchmark/recommenders_sota_results.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e89628085cd3b98ecdc24b7b041d45b8c4f82eb1d885097aea301a1142499927 +size 340 diff --git a/benchmark/relevance_ge_7/item_map.csv b/benchmark/relevance_ge_7/item_map.csv new file mode 100644 index 0000000000000000000000000000000000000000..f3c878b32393f161e277a3cc1f07c937b5425453 --- /dev/null +++ b/benchmark/relevance_ge_7/item_map.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:45dfca77094b4a09deee9148474cbb52334d8837ab1f79c7a852551d4ec8aae6 +size 5792 diff --git a/benchmark/relevance_ge_7/split_config.json b/benchmark/relevance_ge_7/split_config.json new file mode 100644 index 0000000000000000000000000000000000000000..845756593141feb8863422b8b1065c0023191e4a --- /dev/null +++ b/benchmark/relevance_ge_7/split_config.json @@ -0,0 +1,63 @@ +{ + "protocol": "temporal leave-one-out, three-way (train / val / test)", + "fold_assignment": { + "test": "last interaction per user", + "val": "second-last interaction per user", + "train": "all earlier interactions" + }, + "temporal_scope": { + "ordering": "per user, not global", + "note": "Each user's own history is split chronologically, so no user's future leaks into their training data. Across users the folds overlap in wall-clock time: one user's training review can be later than another user's test review. This is the standard leave-last-one-out protocol; a single global cut-off date would be a different and stricter setting, and is not used here." + }, + "relevance": { + "definition": "implicit next-item: the chronologically next hotel the user reviewed", + "all_ratings_are_positive": false, + "relevance_threshold": 7.0, + "note": "Ratings are not thresholded by default; the holdout item is relevant because it was visited, not because it scored well." + }, + "min_interactions": 4, + "seed": 42, + "n_users": 798, + "n_items": 535, + "n_train": 8645, + "n_val": 506, + "n_test": 512, + "train_history_length": { + "min": 2, + "median": 5.0, + "max": 208 + }, + "users_with_train_history_2": 183, + "users_evaluated": { + "val": 506, + "test": 512 + }, + "sparsity_pct": 97.6012, + "output_dir": "benchmark\\relevance_ge_7", + "folds": { + "train": { + "n": 8645, + "n_users": 798, + "n_items": 508, + "date_min": "2012-01-08", + "date_max": "2023-12-06", + "rating_mean": 7.5283 + }, + "val": { + "n": 506, + "n_users": 506, + "n_items": 232, + "date_min": "2015-10-20", + "date_max": "2023-12-07", + "rating_mean": 8.8534 + }, + "test": { + "n": 512, + "n_users": 512, + "n_items": 226, + "date_min": "2017-07-08", + "date_max": "2023-12-09", + "rating_mean": 8.782 + } + } +} \ No newline at end of file diff --git a/benchmark/relevance_ge_7/test.csv b/benchmark/relevance_ge_7/test.csv new file mode 100644 index 0000000000000000000000000000000000000000..9a9f3a5678fc869078edca3dbb6752a3f66234aa --- /dev/null +++ b/benchmark/relevance_ge_7/test.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ef6d39f2c6580ea60aff7db836833aa5e62edce95808cc2281bd4cee0bd614cc +size 11745 diff --git a/benchmark/relevance_ge_7/train.csv b/benchmark/relevance_ge_7/train.csv new file mode 100644 index 0000000000000000000000000000000000000000..6a6df5f9f1d171c839091e820003dc9d1265d112 --- /dev/null +++ b/benchmark/relevance_ge_7/train.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:781a3b99e5a020179e8f1c427c2acf858d1035385040114f88e76ab1320c915e +size 196724 diff --git a/benchmark/relevance_ge_7/user_map.csv b/benchmark/relevance_ge_7/user_map.csv new file mode 100644 index 0000000000000000000000000000000000000000..76d2300a0ac7674f3583e500d8cfdb45fd6f02b3 --- /dev/null +++ b/benchmark/relevance_ge_7/user_map.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:053f3b8b0568c8e450b2196ba1c2433273b9d1a8dbcccd970729342dc20a0b1b +size 15068 diff --git a/benchmark/relevance_ge_7/val.csv b/benchmark/relevance_ge_7/val.csv new file mode 100644 index 0000000000000000000000000000000000000000..c90ff40deea6fa4192da1e14b5cc4ea66aaf1cce --- /dev/null +++ b/benchmark/relevance_ge_7/val.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8ae5d879f9a6ca7493afd701fb05666ab6bdb9dd9bb883d78aff6e8a8ee2d62a +size 11623 diff --git a/benchmark/split_config.json b/benchmark/split_config.json index 5a4ef291dc1ce26cb6b632fdc240a545b873003f..57f84d3ac92ebcdfdc03c884955d235a8c349551 100644 --- a/benchmark/split_config.json +++ b/benchmark/split_config.json @@ -1,10 +1,63 @@ { - "protocol": "leave-last-one-out (temporal)", + "protocol": "temporal leave-one-out, three-way (train / val / test)", + "fold_assignment": { + "test": "last interaction per user", + "val": "second-last interaction per user", + "train": "all earlier interactions" + }, + "temporal_scope": { + "ordering": "per user, not global", + "note": "Each user's own history is split chronologically, so no user's future leaks into their training data. Across users the folds overlap in wall-clock time: one user's training review can be later than another user's test review. This is the standard leave-last-one-out protocol; a single global cut-off date would be a different and stricter setting, and is not used here." + }, + "relevance": { + "definition": "implicit next-item: the chronologically next hotel the user reviewed", + "all_ratings_are_positive": true, + "relevance_threshold": null, + "note": "Ratings are not thresholded by default; the holdout item is relevant because it was visited, not because it scored well." + }, "min_interactions": 4, "seed": 42, - "n_users": 800, + "n_users": 798, "n_items": 535, - "n_train": 9787, - "n_test": 800, - "sparsity_pct": 97.5264 + "n_train": 8645, + "n_val": 798, + "n_test": 798, + "train_history_length": { + "min": 2, + "median": 5.0, + "max": 208 + }, + "users_with_train_history_2": 183, + "users_evaluated": { + "val": 798, + "test": 798 + }, + "sparsity_pct": 97.6012, + "output_dir": "benchmark", + "folds": { + "train": { + "n": 8645, + "n_users": 798, + "n_items": 508, + "date_min": "2012-01-08", + "date_max": "2023-12-06", + "rating_mean": 7.5283 + }, + "val": { + "n": 798, + "n_users": 798, + "n_items": 289, + "date_min": "2015-10-20", + "date_max": "2023-12-07", + "rating_mean": 7.5561 + }, + "test": { + "n": 798, + "n_users": 798, + "n_items": 278, + "date_min": "2017-07-08", + "date_max": "2023-12-09", + "rating_mean": 7.4976 + } + } } \ No newline at end of file diff --git a/benchmark/test.csv b/benchmark/test.csv new file mode 100644 index 0000000000000000000000000000000000000000..66661bd25b299cffa28458de2c0af6aeb5ba1a13 --- /dev/null +++ b/benchmark/test.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eb2d913269c597d986e242b65c53f7067f765c68915005054fae99426e97afbc +size 18217 diff --git a/benchmark/train.csv b/benchmark/train.csv new file mode 100644 index 0000000000000000000000000000000000000000..6a6df5f9f1d171c839091e820003dc9d1265d112 --- /dev/null +++ b/benchmark/train.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:781a3b99e5a020179e8f1c427c2acf858d1035385040114f88e76ab1320c915e +size 196724 diff --git a/benchmark/user_map.csv b/benchmark/user_map.csv index d37bd39be6f47c4605b010c53cb1c9da441eeca1..76d2300a0ac7674f3583e500d8cfdb45fd6f02b3 100644 --- a/benchmark/user_map.csv +++ b/benchmark/user_map.csv @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c830948d8aa0afc75ea53f2a3005ae1ae3176ea57e653ddccf58271c68fd3716 -size 15106 +oid sha256:053f3b8b0568c8e450b2196ba1c2433273b9d1a8dbcccd970729342dc20a0b1b +size 15068 diff --git a/benchmark/val.csv b/benchmark/val.csv new file mode 100644 index 0000000000000000000000000000000000000000..f231ae3cd9f502d2fccbe49fcbb87b4645b05ba4 --- /dev/null +++ b/benchmark/val.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dcaeba814337360e1c483be1e3d61201ecbfb587555938114ae907bf8a15b948 +size 18229 diff --git a/data/benchmark/test-00000-of-00001.csv b/data/benchmark/test-00000-of-00001.csv index 2eea785858f098cb63c249806744310f186366fb..66661bd25b299cffa28458de2c0af6aeb5ba1a13 100644 --- a/data/benchmark/test-00000-of-00001.csv +++ b/data/benchmark/test-00000-of-00001.csv @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ab7ea148c81fb5305521ba317ffbb66ab598b37566e68161240fa2fe684a51b2 -size 16666 +oid sha256:eb2d913269c597d986e242b65c53f7067f765c68915005054fae99426e97afbc +size 18217 diff --git a/data/benchmark/test-00000-of-00001.parquet b/data/benchmark/test-00000-of-00001.parquet index 5dab479e49476e2bea20252be01eca36d9906121..6cb85def7bec8554c200831cc9d681861ec6af7e 100644 --- a/data/benchmark/test-00000-of-00001.parquet +++ b/data/benchmark/test-00000-of-00001.parquet @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:96a7b7146bc32b1a0dc153646e12360b32c866613d431a317523bbf9adf13ffc -size 13009 +oid sha256:da63b684ed22429f54b5337bf4dc5ba0ad394ee1c8cef5981c87ee05a7c6ff8c +size 13372 diff --git a/data/benchmark/train-00000-of-00001.csv b/data/benchmark/train-00000-of-00001.csv index 1418c9402421f686e08f91e7d96c194a06af9f6e..6a6df5f9f1d171c839091e820003dc9d1265d112 100644 --- a/data/benchmark/train-00000-of-00001.csv +++ b/data/benchmark/train-00000-of-00001.csv @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ff236a8d562028ff9d2c21cbc159225d84a1e6d06c7983e00310c9eca7fade53 -size 203527 +oid sha256:781a3b99e5a020179e8f1c427c2acf858d1035385040114f88e76ab1320c915e +size 196724 diff --git a/data/benchmark/train-00000-of-00001.parquet b/data/benchmark/train-00000-of-00001.parquet index a703796c66e0450c51ee2efad8d2e051981b3a25..33c5049127096a053b56370fc48da8840a266487 100644 --- a/data/benchmark/train-00000-of-00001.parquet +++ b/data/benchmark/train-00000-of-00001.parquet @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:90b391f355d11ef7c56a563a4260a0cee723999f24883079a06bc08d408e18c5 -size 59180 +oid sha256:22da58f3157f2f4d6776b5a0ddb1763f3f3a31d0230bb1fa0fcb64fcc49aec1f +size 55033 diff --git a/data/benchmark/validation-00000-of-00001.csv b/data/benchmark/validation-00000-of-00001.csv new file mode 100644 index 0000000000000000000000000000000000000000..f231ae3cd9f502d2fccbe49fcbb87b4645b05ba4 --- /dev/null +++ b/data/benchmark/validation-00000-of-00001.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dcaeba814337360e1c483be1e3d61201ecbfb587555938114ae907bf8a15b948 +size 18229 diff --git a/data/benchmark/validation-00000-of-00001.parquet b/data/benchmark/validation-00000-of-00001.parquet new file mode 100644 index 0000000000000000000000000000000000000000..56f5f7a7ef14192e850a6da6faeb63d1a9ee50e8 --- /dev/null +++ b/data/benchmark/validation-00000-of-00001.parquet @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4e179b599b3124ea6eb41e811e69eaddf1586c415d3eaaede9c2f4af5f60c870 +size 14263 diff --git a/data/benchmark_ge7/test-00000-of-00001.csv b/data/benchmark_ge7/test-00000-of-00001.csv new file mode 100644 index 0000000000000000000000000000000000000000..9a9f3a5678fc869078edca3dbb6752a3f66234aa --- /dev/null +++ b/data/benchmark_ge7/test-00000-of-00001.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ef6d39f2c6580ea60aff7db836833aa5e62edce95808cc2281bd4cee0bd614cc +size 11745 diff --git a/data/benchmark_ge7/test-00000-of-00001.parquet b/data/benchmark_ge7/test-00000-of-00001.parquet new file mode 100644 index 0000000000000000000000000000000000000000..44e6f0f1885aacd92cf6f772d4532dab06c24206 --- /dev/null +++ b/data/benchmark_ge7/test-00000-of-00001.parquet @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6f842d26b4037559a145ed497fbcff1f8ca6dfab0e117f09984702452e51b5ea +size 9768 diff --git a/data/benchmark_ge7/train-00000-of-00001.csv b/data/benchmark_ge7/train-00000-of-00001.csv new file mode 100644 index 0000000000000000000000000000000000000000..6a6df5f9f1d171c839091e820003dc9d1265d112 --- /dev/null +++ b/data/benchmark_ge7/train-00000-of-00001.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:781a3b99e5a020179e8f1c427c2acf858d1035385040114f88e76ab1320c915e +size 196724 diff --git a/data/benchmark_ge7/train-00000-of-00001.parquet b/data/benchmark_ge7/train-00000-of-00001.parquet new file mode 100644 index 0000000000000000000000000000000000000000..33c5049127096a053b56370fc48da8840a266487 --- /dev/null +++ b/data/benchmark_ge7/train-00000-of-00001.parquet @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:22da58f3157f2f4d6776b5a0ddb1763f3f3a31d0230bb1fa0fcb64fcc49aec1f +size 55033 diff --git a/data/benchmark_ge7/validation-00000-of-00001.csv b/data/benchmark_ge7/validation-00000-of-00001.csv new file mode 100644 index 0000000000000000000000000000000000000000..c90ff40deea6fa4192da1e14b5cc4ea66aaf1cce --- /dev/null +++ b/data/benchmark_ge7/validation-00000-of-00001.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8ae5d879f9a6ca7493afd701fb05666ab6bdb9dd9bb883d78aff6e8a8ee2d62a +size 11623 diff --git a/data/benchmark_ge7/validation-00000-of-00001.parquet b/data/benchmark_ge7/validation-00000-of-00001.parquet new file mode 100644 index 0000000000000000000000000000000000000000..5bd280e999804f613239da0ed8da950204de7f20 --- /dev/null +++ b/data/benchmark_ge7/validation-00000-of-00001.parquet @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:44330721be7b56fdb2d9055fc736c402854994b367b7350d927ff3ea928b904d +size 10280 diff --git a/data/content/train-00000-of-00001.csv b/data/content/train-00000-of-00001.csv new file mode 100644 index 0000000000000000000000000000000000000000..395ebda8f852ca9dc80d97d5a84b5fcb5ad813f0 --- /dev/null +++ b/data/content/train-00000-of-00001.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1b0f7871f42f561590a04d2414d2fecdde0610df6a00a66c223b0639aead9927 +size 120172 diff --git a/data/content/train-00000-of-00001.parquet b/data/content/train-00000-of-00001.parquet new file mode 100644 index 0000000000000000000000000000000000000000..1e45829fbbe8222c22a95d753453eb86447640c5 --- /dev/null +++ b/data/content/train-00000-of-00001.parquet @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:40c1d8b18cf09d44804d46c183d935e9bf60352ccc221e68946f008d0fee5186 +size 35735 diff --git a/data/hotels/train-00000-of-00001.csv b/data/hotels/train-00000-of-00001.csv index ae577b4632d5d5d4cc35833292342b32bd0395e9..4dbfef0dee64f6103079061e19f18a867dfd734c 100644 --- a/data/hotels/train-00000-of-00001.csv +++ b/data/hotels/train-00000-of-00001.csv @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:75431a485a2ad2f8a19406aa30ed807ea1b140c20bd19113ab1b343b3632bd08 -size 27792 +oid sha256:64d4108855d1eec303253bcfae71596a8abc26733b7fade0dd33b9425b976b16 +size 27214 diff --git a/data/hotels/train-00000-of-00001.parquet b/data/hotels/train-00000-of-00001.parquet index 1538da177fbc5c8ba52cce5f5ede1f91fb61a1fa..9df9cf43f1945e3e926cd236176b1b7c9c56b109 100644 --- a/data/hotels/train-00000-of-00001.parquet +++ b/data/hotels/train-00000-of-00001.parquet @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ea55b71f275682938193b3f4d8e5dd4397c244d3364f765174e52747096a8667 -size 15297 +oid sha256:fdf7ec0866c8fe78b19d757d05fd43607e6ec7d19c8ca1fc6967ce1d5b8d1320 +size 14964 diff --git a/data/interactions/train-00000-of-00001.csv b/data/interactions/train-00000-of-00001.csv index 501a8ad7ed8ae443130aa4cbeb85234a0e9ea0ed..74c554f3bbb93692eebb900158d09f1aa7a85388 100644 --- a/data/interactions/train-00000-of-00001.csv +++ b/data/interactions/train-00000-of-00001.csv @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f63dba2c8e6e23302f1bd16e501d37bc5e1e2fec6f3117f0ab90263ffce7b086 -size 810311 +oid sha256:6461d3f3abc15a79615cd09c46950dee4750575b951c4471a98b5c11fe40feeb +size 776686 diff --git a/data/interactions/train-00000-of-00001.parquet b/data/interactions/train-00000-of-00001.parquet index 37d90caa534bd34f257eb0e894e465b20721293d..978793719c0d7315bb1fd54465031f5bb0feb561 100644 --- a/data/interactions/train-00000-of-00001.parquet +++ b/data/interactions/train-00000-of-00001.parquet @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9983dacaafd61fb76371a7d455c2bb8e6edef24a1758c1132b86760fc1fa93ab -size 195633 +oid sha256:a4cf96fed8fec0497c70b8aef3bf96fee92149a3c5b479432fd79bfe000537ef +size 194199 diff --git a/data/users/train-00000-of-00001.csv b/data/users/train-00000-of-00001.csv index 9ef6f3e9554884d7802a3e62583f233d39676cf2..a659e208e34c86f4e599b853a37f931328f40c7b 100644 --- a/data/users/train-00000-of-00001.csv +++ b/data/users/train-00000-of-00001.csv @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:01e3702b6fe84435c78eba1fed1064289ce1b922bf3960b0e7bdbd56801af56c -size 116471 +oid sha256:02926a6e666c7fcc23ae40733bbd1fe0b4565a25001ed3d85c9f14308ad6fbb3 +size 109476 diff --git a/data/users/train-00000-of-00001.parquet b/data/users/train-00000-of-00001.parquet index cfe366968f617fad66c4235d49d146616cb66a5e..c010d0dad2f4c2622fa859c0d1631d0c06d9d057 100644 --- a/data/users/train-00000-of-00001.parquet +++ b/data/users/train-00000-of-00001.parquet @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fdbeb91b75a0d25ef2de75bfc3ccfaa70cd70da39d23b7c1a873ecc263f3384e -size 100633 +oid sha256:c6eabf195c821281b9caa4f144285dbe167d03ec3f4ef696ded9990da2ce2d8d +size 100402