# Mushrooms

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

`libsvm:mushrooms@1` · Registry `1.4.0`. Default version in this registry. 

Binary classification data for edible and poisonous mushrooms from the UCI Mushroom dataset, distributed by LIBSVM as 112 binary features for 8124 observations. The provider supplies one artifact without a predefined split. Response labels are 1 (poisonous) and 2 (edible). 

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

## Dimensions and tasks

| Task | Type | Split | Samples | Predictors |
| --- | --- | --- | --- | --- |
| default | classification | — | 8,124 | 112 |

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

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

### R

```r
library(datamonger)

registry <- registry_selector(
  release = "1.4.0",
  index_sha256 = "ef83679266af9fcbb9ea194acdfb9bb6c380b440a574fc2ee7292899c5102909",
  index_url = "https://github.com/jolars/datamonger/releases/download/registry-v1.4.0/index.json"
)
data <- fetch_data("libsvm:mushrooms@1", registry = registry)
```

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

### Julia

```julia
using Datamonger

registry = registry_selector(
    "1.4.0",
    "ef83679266af9fcbb9ea194acdfb9bb6c380b440a574fc2ee7292899c5102909",
    "https://github.com/jolars/datamonger/releases/download/registry-v1.4.0/index.json",
)
data = fetch_data("libsvm:mushrooms@1"; registry=registry)
```

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

### CLI

```sh
cat > datamonger-registry.json <<'JSON'
{
  "index_sha256": "ef83679266af9fcbb9ea194acdfb9bb6c380b440a574fc2ee7292899c5102909",
  "index_url": "https://github.com/jolars/datamonger/releases/download/registry-v1.4.0/index.json",
  "release": "1.4.0",
  "schema_version": 1
}
JSON
datamonger --selector datamonger-registry.json fetch 'libsvm:mushrooms@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 | 8,124 × 112 |
| response | vector | int64 | 8,124 |

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

## Preprocessing

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

### Upstream

Status: documented. 

The provider does not document the complete category-to-index mapping. 

**feature-exclusion.** Omit the original stalk-root attribute, described by LIBSVM as attribute 12 including the class column, because it contains missing values. 

**feature-encoding.** Expand each retained nominal attribute into binary indicators, producing 112 features. 

Evidence: [https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/binary.html\#mushrooms](<https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/binary.html#mushrooms>), [https://archive.ics.uci.edu/dataset/73/mushroom](<https://archive.ics.uci.edu/dataset/73/mushroom>) 

<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: mushrooms. Retrieved: 2026-10-26. 

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

Mushroom \[Dataset\]. (1981). UCI Machine Learning Repository. [https://doi.org/10.24432/C5959T](<https://doi.org/10.24432/C5959T>). 

Original dataset citation supplied by UCI. The agaricus-lepiota.names file in [https://archive.ics.uci.edu/static/public/73/mushroom.zip](<https://archive.ics.uci.edu/static/public/73/mushroom.zip>) identifies Jeff Schlimmer as the donor and the 1981 Audubon Society field guide as the source. 

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

## License

Unknown 

UCI licenses the original Mushroom dataset under CC BY 4.0: [https://archive.ics.uci.edu/dataset/73/mushroom](<https://archive.ics.uci.edu/dataset/73/mushroom>). LIBSVM identifies UCI as the source and documents feature encoding and exclusion but states no license terms for its transformed artifact: [https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/binary.html\#mushrooms](<https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/binary.html#mushrooms>). The applicability of the original license to this distributed artifact has not been established. 

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

## Artifacts

Total download: 859.1 KiB. Sizes describe the distributed files, including any compression. 

| Artifact | Format | Compression | Size | Distribution | Preservation |
| --- | --- | --- | --- | --- | --- |
| data | libsvm | none | 859.1 KiB | upstream-only | unknown |

[data: upstream](<https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/binary/mushrooms>) 

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

Index SHA-256: `ef83679266af9fcbb9ea194acdfb9bb6c380b440a574fc2ee7292899c5102909`.
