# RCV1-v2 Topics

[Browse datasets](<../../>) 

`datamonger:lewis2004@1` · Registry `1.9.0`. Default version in this registry. 

Multilabel topic classification benchmark from the Reuters English-language newswire corpus. The original LYRL2004 split contains 23,149 training documents and 781,265 test documents. Both splits use 47,236 weighted term features and the same 103 topic codes. Document IDs align with the matrix rows. 

<a id="dimensions-and-tasks"></a>

## Dimensions and tasks

| Task | Type | Split | Rows | Columns | Feature columns |
| --- | --- | --- | --- | --- | --- |
| default | classification | test | 781,265 | 47,340 | 47,236 |
| default | classification | train | 23,149 | 47,340 | 47,236 |

Rows and columns describe the decoded table for each split. Feature columns count the inputs selected by each task. 

<a id="retrieve"></a>

## Retrieve

These examples pin both the dataset version and the registry's exact index. An uncached dataset requires network access to its source. The CLI retrieves verified artifacts. The language clients also decode them. 

<a id="python"></a>

### Python

```python
from datamonger import Registry, fetch_data

registry = Registry(
    release="1.9.0",
    index_sha256="bea311f882e32144834591edda0a0cecdd602bedee6fddb0463393f9e166d2de",
    index_url="https://github.com/jolars/datamonger/releases/download/registry-v1.9.0/index.json",
)
data = fetch_data("datamonger:lewis2004@1", registry=registry)
```

<a id="r"></a>

### R

```r
library(datamonger)

registry <- registry_selector(
  release = "1.9.0",
  index_sha256 = "bea311f882e32144834591edda0a0cecdd602bedee6fddb0463393f9e166d2de",
  index_url = "https://github.com/jolars/datamonger/releases/download/registry-v1.9.0/index.json"
)
data <- fetch_data("datamonger:lewis2004@1", registry = registry)
```

<a id="julia"></a>

### Julia

```julia
using Datamonger

registry = registry_selector(
    "1.9.0",
    "bea311f882e32144834591edda0a0cecdd602bedee6fddb0463393f9e166d2de",
    "https://github.com/jolars/datamonger/releases/download/registry-v1.9.0/index.json",
)
data = fetch_data("datamonger:lewis2004@1"; registry=registry)
```

<a id="cli"></a>

### CLI

```sh
cat > datamonger-registry.json <<'JSON'
{
  "index_sha256": "bea311f882e32144834591edda0a0cecdd602bedee6fddb0463393f9e166d2de",
  "index_url": "https://github.com/jolars/datamonger/releases/download/registry-v1.9.0/index.json",
  "release": "1.9.0",
  "schema_version": 1
}
JSON
datamonger --selector datamonger-registry.json fetch 'datamonger:lewis2004@1'
```

<a id="representation-and-variables"></a>

## Representation and variables

Tabular data with a sparse representation. Decoder: `sparse-label-join` version 1. 

| Component | Kind | Type | Shape |
| --- | --- | --- | --- |
| train/features | sparse\_matrix | float64 | 23,149 × 47,236 |
| train/response | sparse\_matrix | float64 | 23,149 × 103 |
| train/document\_id | vector | int64 | 23,149 |
| test/features | sparse\_matrix | float64 | 781,265 × 47,236 |
| test/response | sparse\_matrix | float64 | 781,265 × 103 |
| test/document\_id | vector | int64 | 781,265 |
| label\_codes | vector | string | 103 |

<a id="preprocessing"></a>

## Preprocessing

<a id="upstream"></a>

### Upstream

Status: documented. 

**feature-extraction.** Use the paper's cosine-normalized log term frequency by inverse document frequency weights over stemmed terms with the original chronological split. 

Evidence: [https://jmlr.org/papers/volume5/lewis04a/lewis04a.pdf](<https://jmlr.org/papers/volume5/lewis04a/lewis04a.pdf>) 

<a id="datamonger"></a>

### Datamonger

Status: documented. 

**label-encoding.** Join Appendix 8 topics to Appendix 13 vectors by document ID. Encode topic columns in lexicographic order and preserve vector order within each shard. 

Evidence: spec/decoders.md\#sparse-label-join-version-1 

<a id="provenance-and-citation"></a>

## Provenance and citation

Provider: Lewis et al. (JMLR appendices), via the files used by scikit-learn. Upstream name: RCV1-v2/LYRL2004. Retrieved: 2026-11-27. 

[Original source](<https://jmlr.org/papers/v5/lewis04a.html>) 

Authors: David D. Lewis, Yiming Yang, Tony G. Rose, Fan Li. 

Lewis, D. D., Yang, Y., Rose, T. G., and Li, F. (2004). RCV1: A New Benchmark Collection for Text Categorization Research. Journal of Machine Learning Research 5, 361–397. [https://jmlr.org/papers/v5/lewis04a.html](<https://jmlr.org/papers/v5/lewis04a.html>) 

Acknowledge Reuters as the source corpus provider. 

<a id="license"></a>

## License

Unknown 

[License information](<https://jmlr.org/papers/volume5/lewis04a/lewis04a.pdf>) 

Section 7 reports Reuters' permission for the authors to distribute the token and vector files without a license agreement. The reviewed sources do not establish downstream redistribution terms for these vectors and topic assignments. 

<a id="artifacts"></a>

## Artifacts

Total download: 624.7 MiB. Sizes describe the distributed files, including any compression. 

| Artifact | Format | Compression | Size | Distribution | Preservation |
| --- | --- | --- | --- | --- | --- |
| labels | label-assignments | gzip | 6.9 MiB | upstream-only | unknown |
| train | id-sparse | gzip | 17.7 MiB | upstream-only | unknown |
| test\_0 | id-sparse | gzip | 152.3 MiB | upstream-only | unknown |
| test\_1 | id-sparse | gzip | 154.2 MiB | upstream-only | unknown |
| test\_2 | id-sparse | gzip | 151.1 MiB | upstream-only | unknown |
| test\_3 | id-sparse | gzip | 142.4 MiB | upstream-only | unknown |

[labels: upstream](<https://ndownloader.figshare.com/files/5976048>) 

[train: upstream](<https://ndownloader.figshare.com/files/5976057>) 

[test\_0: upstream](<https://ndownloader.figshare.com/files/5976069>) 

[test\_1: upstream](<https://ndownloader.figshare.com/files/5976066>) 

[test\_2: upstream](<https://ndownloader.figshare.com/files/5976063>) 

[test\_3: upstream](<https://ndownloader.figshare.com/files/5976060>) 

<a id="versions-in-this-registry"></a>

## Versions in this registry

[1](<1>) (default) 

<a id="registry-record"></a>

## Registry record

Download the [complete registry record](<../../../assets/ee5892011d3c234058ba5d5bef5df6cf4fb116bdfdd626bd61cae6667e60f7fb.bin>), [registry selector](<../../../assets/942cbfa8e28ffee996f4755f12491aeec977f51ea4fe7665abb537da763a2da8.bin>), or [full registry index](<https://github.com/jolars/datamonger/releases/download/registry-v1.9.0/index.json>). 

Index SHA-256: `bea311f882e32144834591edda0a0cecdd602bedee6fddb0463393f9e166d2de`.
