# News20

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

`libsvm:news20@1` · Registry `1.7.0`. Default version in this registry. 

LIBSVM's multiclass 20 Newsgroups dataset represents Usenet posts as sparse text features and labels them by newsgroup. The original training and test files share 62,061 feature columns. Feature values, labels, split membership, and row order are preserved. 

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

## Dimensions and tasks

| Task | Type | Split | Samples | Predictors |
| --- | --- | --- | --- | --- |
| default | classification | test | 3,993 | 62,061 |
| default | classification | train | 15,935 | 62,061 |

Predictor counts follow each task's feature selection and exclude targets and identifiers. Sample counts are reported separately for each split. 

<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.7.0",
    index_sha256="0837dbe2f30bb1235de74b6bd4075aec46ff065ad9d5a408df4cec7a7178fa6e",
    index_url="https://github.com/jolars/datamonger/releases/download/registry-v1.7.0/index.json",
)
data = fetch_data("libsvm:news20@1", registry=registry)
```

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

### R

```r
library(datamonger)

registry <- registry_selector(
  release = "1.7.0",
  index_sha256 = "0837dbe2f30bb1235de74b6bd4075aec46ff065ad9d5a408df4cec7a7178fa6e",
  index_url = "https://github.com/jolars/datamonger/releases/download/registry-v1.7.0/index.json"
)
data <- fetch_data("libsvm:news20@1", registry = registry)
```

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

### Julia

```julia
using Datamonger

registry = registry_selector(
    "1.7.0",
    "0837dbe2f30bb1235de74b6bd4075aec46ff065ad9d5a408df4cec7a7178fa6e",
    "https://github.com/jolars/datamonger/releases/download/registry-v1.7.0/index.json",
)
data = fetch_data("libsvm:news20@1"; registry=registry)
```

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

### CLI

```sh
cat > datamonger-registry.json <<'JSON'
{
  "index_sha256": "0837dbe2f30bb1235de74b6bd4075aec46ff065ad9d5a408df4cec7a7178fa6e",
  "index_url": "https://github.com/jolars/datamonger/releases/download/registry-v1.7.0/index.json",
  "release": "1.7.0",
  "schema_version": 1
}
JSON
datamonger --selector datamonger-registry.json fetch 'libsvm:news20@1'
```

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

## Representation and variables

Tabular data with a sparse representation. Decoder: `libsvm-split` version 1. 

| Component | Kind | Type | Shape |
| --- | --- | --- | --- |
| train\_features | sparse\_matrix | float64 | 15,935 × 62,061 |
| train\_response | vector | int64 | 15,935 |
| test\_features | sparse\_matrix | float64 | 3,993 × 62,061 |
| test\_response | vector | int64 | 3,993 |

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

## Preprocessing

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

### Upstream

Status: documented. 

This entry uses LIBSVM's base files. The provider does not describe the full text feature extraction procedure or map numeric labels to newsgroup names. 

**train-test-split.** Use the provider's first 80/20 training and test split. 

Evidence: [https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multiclass.html\#news20](<https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multiclass.html#news20>) 

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

### Datamonger

Status: none. 

Datamonger decodes the upstream files without additional preprocessing. 

Evidence: spec/decoders/libsvm-v1.md 

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

## Provenance and citation

Provider: LIBSVM. Upstream name: news20. Retrieved: 2026-11-20. 

[Original source](<https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multiclass.html#news20>) 

Authors: Ken Lang. 

Ken Lang. NewsWeeder: Learning to Filter Netnews. Proceedings of the Twelfth International Conference on Machine Learning, pp. 331–339, 1995. [https://doi.org/10.1016/B978-1-55860-377-6.50048-7](<https://doi.org/10.1016/B978-1-55860-377-6.50048-7>) 

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

## License

Unknown 

[License information](<https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multiclass.html#news20>) 

LIBSVM gives no license terms for these files. UCI lists CC BY 4.0 for its own Twenty Newsgroups deposit ([https://doi.org/10.24432/C5C323)](<https://doi.org/10.24432/C5C323%29>). The applicability of those terms to these LIBSVM artifacts has not been established. 

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

## Artifacts

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

| Artifact | Format | Compression | Size | Distribution | Preservation |
| --- | --- | --- | --- | --- | --- |
| train | libsvm | bzip2 | 2.3 MiB | upstream-only | unknown |
| test | libsvm | bzip2 | 588.2 KiB | upstream-only | unknown |

[train: upstream](<https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multiclass/news20.bz2>) 

[test: upstream](<https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multiclass/news20.t.bz2>) 

<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/ae67a6354dbd6c072c1bc2ecdb6737d7f1f9b068c8128b85aa51d4d24f0ec507.bin>), [registry selector](<../../../assets/e26e5807615f3888a588180156617f46fb2ac56bccb1299e491860fe7a89295f.bin>), or [full registry index](<https://github.com/jolars/datamonger/releases/download/registry-v1.7.0/index.json>). 

Index SHA-256: `0837dbe2f30bb1235de74b6bd4075aec46ff065ad9d5a408df4cec7a7178fa6e`.
