# News20 Binary

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

`libsvm:news20-binary@1` · Registry `1.3.0`. Default version in this registry. 

LIBSVM's binary classification variant of 20 Newsgroups, with 19,996 documents and 1,355,191 sparse text features. Nonzero feature vectors have approximately unit length; 42 documents have no stored features. The provider supplies a single artifact without a predefined training and test split. Feature values, binary labels, and row order are preserved. 

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

## Dimensions and tasks

| Task | Type | Split | Samples | Predictors |
| --- | --- | --- | --- | --- |
| default | classification | — | 19,996 | 1,355,191 |

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

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

### R

```r
library(datamonger)

registry <- registry_selector(
  release = "1.3.0",
  index_sha256 = "94639f8d711d64895689d6da87add0f0f56574070262ec2a04f1f1ad43279f85",
  index_url = "https://github.com/jolars/datamonger/releases/download/registry-v1.3.0/index.json"
)
data <- fetch_data("libsvm:news20-binary@1", registry = registry)
```

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

### Julia

```julia
using Datamonger

registry = registry_selector(
    "1.3.0",
    "94639f8d711d64895689d6da87add0f0f56574070262ec2a04f1f1ad43279f85",
    "https://github.com/jolars/datamonger/releases/download/registry-v1.3.0/index.json",
)
data = fetch_data("libsvm:news20-binary@1"; registry=registry)
```

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

### CLI

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

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

## Representation and variables

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

| Component | Kind | Type | Shape |
| --- | --- | --- | --- |
| features | sparse\_matrix | float64 | 19,996 × 1,355,191 |
| response | vector | int64 | 19,996 |

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

## Preprocessing

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

### Upstream

Status: documented. 

The provider page does not describe the earlier text feature preparation or the mapping from newsgroups to the two labels. Artifact inspection finds 42 zero-feature documents; nonzero vectors have unit length within the precision of the stored values. 

**normalization.** Normalize each document's feature vector to unit length. 

Parameters: axis: rows; norm: l2. 

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

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

### Datamonger

Status: none. 

Datamonger decodes the provider artifact without additional statistical preprocessing. 

Evidence: spec/decoders/libsvm-v1.md 

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

## Provenance and citation

Provider: LIBSVM. Upstream name: news20.binary. Retrieved: 2026-10-20. 

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

Authors: S. Sathiya Keerthi, Dennis DeCoste. 

S. Sathiya Keerthi and Dennis DeCoste. A Modified Finite Newton Method for Fast Solution of Large Scale Linear SVMs. Journal of Machine Learning Research, 6:341-361, 2005. [https://www.jmlr.org/papers/v6/keerthi05a.html](<https://www.jmlr.org/papers/v6/keerthi05a.html>) 

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

## License

Unknown 

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

The LIBSVM dataset page identifies the source publication and documents normalization, but provides no license terms for this artifact. The LIBSVM software license does not establish a license for the dataset. 

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

## Artifacts

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

| Artifact | Format | Compression | Size | Distribution | Preservation |
| --- | --- | --- | --- | --- | --- |
| data | libsvm | bzip2 | 25.5 MiB | upstream-only | unknown |

[data: upstream](<https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/binary/news20.binary.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/31a68d1f3c9c107289121c81b47754c6d6ba8dbc7851ef896a2e03a1bb86800a.bin>), [registry selector](<../../../assets/aab75a78e13dc82828a91a7f0399fbe2550941fd4944b2dc669a80fe88adadbf.bin>), or [full registry index](<https://github.com/jolars/datamonger/releases/download/registry-v1.3.0/index.json>). 

Index SHA-256: `94639f8d711d64895689d6da87add0f0f56574070262ec2a04f1f1ad43279f85`.
