headlines-ctr / README.md
Yanjo's picture
Add test (holdout) split and proper dataset structure
44dfec3 verified
---
task_categories:
- text-classification
language:
- en
tags:
- headlines
- click-through-rate
- preference-learning
- engagement-prediction
size_categories:
- 10K<n<100K
dataset_info:
features:
- name: test_id
dtype: string
- name: eyecatcher_id
dtype: string
- name: headline_A
dtype: string
- name: headline_B
dtype: string
- name: label_pairwise
dtype: int32
- name: ctr_diff
dtype: float32
- name: ctr_A
dtype: float32
- name: ctr_B
dtype: float32
- name: counts_A
list: int32
- name: counts_B
list: int32
- name: created_at
dtype: int64
- name: headlines_concat
dtype: string
splits:
- name: train
num_bytes: 4101477
num_examples: 8781
- name: validation
num_bytes: 470679
num_examples: 1019
- name: test
num_bytes: 2020847
num_examples: 4357
download_size: 4360373
dataset_size: 6593003
configs:
- config_name: default
data_files:
- split: train
path: data/train-*
- split: validation
path: data/validation-*
- split: test
path: data/test-*
---
# Headlines CTR Dataset
This dataset contains pairs of news headlines with labels indicating which headline received more clicks. It's designed for studying what makes headlines engaging and for training models to predict user preferences.
## Dataset Description
Each example contains two competing headlines (A and B) that were shown to users, along with engagement metrics and a binary label indicating which performed better.
### Dataset Statistics
- **Train**: 8,781 headline pairs
- **Validation**: 1,019 headline pairs
- **Holdout**: 4,357 headline pairs
- **Total**: 14,157 headline pairs
### Features
Each example contains:
- `headline_A`: First headline text
- `headline_B`: Second headline text
- `label_pairwise`: 1 if headline A got more clicks, 0 if B got more
- `ctr_A`: Click-through rate for headline A
- `ctr_B`: Click-through rate for headline B
- `ctr_diff`: Difference in CTR (A - B)
- `counts_A`: [clicks, impressions] for headline A
- `counts_B`: [clicks, impressions] for headline B
- `test_id`: Unique identifier for the A/B test
- `eyecatcher_id`: Identifier for the content piece
- `created_at`: Timestamp of the test
- `headlines_concat`: Pre-concatenated text for convenience
## Usage
```python
from datasets import load_dataset
# Load the dataset
dataset = load_dataset("Yanjo/headlines-ctr")
# Access different splits
train_data = dataset["train"]
val_data = dataset["validation"]
holdout_data = dataset["holdout"]
# Example: Get the first training example
example = train_data[0]
print(f"Headline A: {example['headline_A']}")
print(f"Headline B: {example['headline_B']}")
print(f"Winner: {'A' if example['label_pairwise'] == 1 else 'B'}")
```
## Example
```python
{
'headline_A': 'Nearly 75% of our crops have vanished in the last 100 years...',
'headline_B': '100 years ago, people were eating things that most of us will never taste.',
'label_pairwise': 0, # B performed better
'ctr_A': 0.0013,
'ctr_B': 0.0058,
'ctr_diff': -0.0044
}
```
## Applications
This dataset can be used for:
- Training models to predict headline engagement
- Studying linguistic features that drive clicks
- A/B testing analysis
- Preference learning research
- Natural language understanding of persuasive text
## Citation
If you use this dataset, please cite:
```bibtex
@misc{headlines-ctr,
title={Headlines CTR Dataset},
author={Yanjo},
year={2024},
publisher={HuggingFace}
}
```
## License
Please check with the original data source for licensing information.