Mushroom Dataset

Mushroom Classification
Dataset

A classic mushroom dataset from the UCI Machine Learning Repository, containing 8,124 samples and 22 categorical features, used to determine whether mushrooms are edible or poisonous. It is a standard introductory dataset for classification learning.

8,124 samples 23 features CC BY 4.0 License UCI ML Repository
Mushroom Dataset
📊
8,124
Total Samples
🔬
23
Feature Dimensions
🍄
2
Classes
📜
CC BY 4.0
Open License

Dataset Highlights

A dataset with purely categorical features, ideal for learning decision trees and rule mining

🍄

Intuitive Classification Task

Determine whether a mushroom is edible (edible) or poisonous (poisonous); the results are intuitive and practically meaningful.

🔤

Purely Categorical Features

All 22 features are categorical variables (cap shape, color, odor, etc.), suitable for practicing one-hot encoding and label encoding.

🌲

Decision Tree Friendly

Categorical features make it an ideal dataset for learning decision trees, random forests, and rule-learning algorithms.

📊

Sufficient Samples

With 8,124 samples, the dataset is sufficiently sized, with a relatively balanced distribution of edible and poisonous classes.

🔍

Feature Analysis

A single feature such as odor can achieve nearly perfect classification, making it suitable for exploring feature importance.

🏛️

Authoritative UCI Source

From the UCI Machine Learning Repository, this is a classic binary classification dataset widely cited in academia.

Use Cases

Valuable for everything from introductory learning to advanced feature analysis

🌲

Decision Tree Learning

Purely categorical features are ideal for learning decision trees, CART, and rule-learning algorithms

🏷️

Binary Classification Modeling

Use Naive Bayes, logistic regression, SVM, and other algorithms for edible/poisonous classification

🔍

Feature Selection

Discover the strong predictive power of key features such as odor, and practice information gain and chi-square tests

🔧

Data Encoding

Practice one-hot encoding, label encoding, and target encoding techniques for categorical variables

Binary Classification Categorical Features Decision Trees Beginner Dataset Rule Learning

Data Preview

Below are sample rows from the mushroom dataset (all features are encoded as single letters)

CSV
class,cap_shape,cap_surface,cap_color,bruises,odor,gill_attachment,...,habitat
p,x,s,n,t,p,f,c,n,k,e,e,s,s,w,w,p,w,o,p,k,s,u
e,x,s,y,t,a,f,c,b,k,e,c,s,s,w,w,p,w,o,p,n,n,g
e,b,s,w,t,l,f,c,b,n,e,c,s,s,w,w,p,w,o,p,n,n,m
p,x,y,w,t,p,f,c,n,n,e,e,s,s,w,w,p,w,o,p,k,s,u
e,x,s,g,f,n,f,w,b,k,t,e,s,s,w,w,p,w,o,e,n,a,g

Get Started in 3 Quick Steps

From browsing to analysis, start your data science project in just a few minutes

01

Browse the Dataset

View dataset details on the Ace Data Cloud platform to learn metadata such as field descriptions, sample size, and license agreement.

02

Download the Data After Purchase

After purchase, download the ZIP delivery package, which includes a 374 KB CSV file, source attribution, and CC BY 4.0 license text; field names have been added to the official headerless CSV data.

03

Load and Analyze

Use pandas.read_csv() to load the data, together with pd.get_dummies() to encode categorical features.

Start Exploring Mushroom Classification Data

A classic classification dataset with previewable licensing information and data samples, available for download after purchase. Its purely categorical feature design makes it an ideal introductory dataset for decision trees and rule learning.