akshatbakshi's picture
Add dataset documentation and multi-server access guide
b22383c verified
|
Raw History Blame Contribute Delete
5.08 kB
metadata
license: apache-2.0
task_categories:
  - text-classification
  - feature-extraction
tags:
  - entity-resolution
  - record-linkage
  - amazon-ml-challenge
size_categories:
  - 10M<n<100M

Amazon ML Challenge 2026: Business Entity Resolution Dataset

This repository hosts the official dataset for the Amazon ML Challenge 2026 — Business Entity Resolution Challenge, packaged for high-speed multi-server distributed training, EDA, and evaluation.

Both the original TSV files and optimized Parquet files (zstd-compressed) are provided.


📊 Dataset Overview & Statistics

Total records across training and test sets: ~26.4 Million records.

Split File Format Row Count Uncompressed Size Parquet Size Key Fields
Train train_source1 Reference (S1) 2,206,821 200.3 MB 77.3 MB entity_id, business_name, business_address, country
Train train_source2 Secondary (S2) 5,034,616 466.6 MB 188.1 MB entity_id, business_name, business_address, country
Train train_source3 Tertiary (S3) 5,285,603 480.4 MB 194.0 MB entity_id, business_name, business_address, country
Train train_ground_truth Labels 2,206,821 121.1 MB 55.4 MB source1_entity_id, matched_entity_ids
Test test_source1 Reference (S1) 1,732,544 166.9 MB 62.2 MB entity_id, business_name, business_address, country
Test test_source2 Secondary (S2) 4,887,273 485.9 MB 189.1 MB entity_id, business_name, business_address, country
Test test_source3 Tertiary (S3) 5,082,316 482.6 MB 190.9 MB entity_id, business_name, business_address, country
Total 26,436,001 ~2.5 GB ~957 MB

🔍 Critical Structural Findings & EDA Highlights

  1. Strict 100% Country Partitioning:

    • In ground truth (7.64M matched pairs), 0 cross-country matches exist.
    • US records only match US records; India only matches India.
    • Strategy: Partition candidate blocking strictly by country to eliminate 50–70% of search space with zero recall loss.
  2. The France Domain Shift:

    • Train: US (60%), India (40%)
    • Test: India (46.7%), US (38.3%), France (15.0% - 259,452 S1 records)
    • France is unseen in the training set. Models and pipelines must not hardcode country-specific assumptions.
  3. 1-to-1 Target Match Constraint:

    • Every S2 or S3 entity links to at most ONE S1 entity (0 multi-links).
    • Approximately 25-27% of S2 and S3 entities are non-matching distractors.
  4. Evaluation Metric:

    • Macro-averaged $F_{0.5}$ score across all S1 entities: $$F_{0.5} = \frac{1.25 \times \text{Precision} \times \text{Recall}}{0.25 \times \text{Precision} + \text{Recall}}$$
    • Precision is weighted $2\times$ over Recall: false merges (false positives) penalize score much more than missed links.
    • Singletons (5.58% in train S1): Correctly predicting an empty match list yields $1.0$; a false match drops that entity to $0.0$.

🚀 Quick Start: Multi-Server Access & Usage

1. Fast CLI Download on Any Server

# Install huggingface_hub
pip install huggingface_hub

# Login (if private repo)
huggingface-cli login --token $HF_TOKEN

# Download entire dataset into ./data folder
huggingface-cli download akshatbakshi/amazon-ml-challenge-2026 --repo-type dataset --local-dir ./data

2. High-Performance Loading with Polars / DuckDB

Parquet files load in < 1 second:

import polars as pl

# Load reference source 1 (Train)
s1 = pl.read_parquet("data/parquet/train/train_source1.parquet")

# Filter strictly by country
s1_us = s1.filter(pl.col("country") == "US")
s1_in = s1.filter(pl.col("country") == "India")

# Load ground truth
gt = pl.read_parquet("data/parquet/train/train_ground_truth.parquet")

With DuckDB (zero-copy SQL queries across millions of rows):

import duckdb

# Direct SQL query on parquet without loading everything to RAM
con = duckdb.connect()
res = con.execute("""
    SELECT s1.country, COUNT(*) 
    FROM 'data/parquet/train/train_source1.parquet' s1
    GROUP BY s1.country
""").df()
print(res)

📁 Repository Directory Structure

.
├── README.md
├── parquet/
│   ├── train/
│   │   ├── train_source1.parquet
│   │   ├── train_source2.parquet
│   │   ├── train_source3.parquet
│   │   └── train_ground_truth.parquet
│   └── test/
│       ├── test_source1.parquet
│       ├── test_source2.parquet
│       └── test_source3.parquet
└── tsv/
    ├── train/
    │   ├── train_source1.tsv
    │   ├── train_source2.tsv
    │   ├── train_source3.tsv
    │   └── train_ground_truth.tsv
    └── test/
        ├── test_source1.tsv
        ├── test_source2.tsv
        └── test_source3.tsv