Mushroom Dataset

Mushroom Classification
Dataset

A classic mushroom dataset from the UCI Machine Learning Repository, containing 8,124 samples and 22 classification features, used to determine whether mushrooms are edible or poisonous, 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
Classification Categories
πŸ“œ
CC BY 4.0
Open License Agreement

Dataset Highlights

Pure classification feature dataset, suitable for learning decision trees and rule mining

πŸ„

Intuitive Classification Task

Determine whether a mushroom is edible or poisonous, with intuitive and practical results.

πŸ”€

Pure Classification 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.

πŸ“Š

Ample Samples

8,124 samples are sufficient, with a relatively balanced distribution of edible and poisonous categories.

πŸ”

Feature Analysis

Single features like odor can achieve nearly perfect classification, suitable for exploring feature importance.

πŸ›οΈ

UCI Authoritative Source

Originating from the UCI Machine Learning Repository, a classic binary classification dataset widely cited in academia.

Applicable Scenarios

From beginner learning to advanced feature analysis, it can provide value

🌲

Decision Tree Learning

Pure classification features are very suitable for learning decision trees, CART, and rule learning algorithms

🏷️

Binary Classification Modeling

Using algorithms such as Naive Bayes, logistic regression, SVM for edible/poisonous classification

πŸ”

Feature Selection

Discover the strong predictive power of key features like odor, practice information gain and chi-squared tests

πŸ”§

Data Encoding

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

Binary Classification Classification Features Decision Trees Beginner Dataset Rule Learning

Data Preview

The following are examples of the first few rows of the mushroom dataset (all features are encoded with single-letter codes)

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

3 Steps to Get Started Quickly

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

01

Browse the Dataset

View dataset details on the Ace Data Cloud platform, including field descriptions, sample size, and licensing agreements.

02

Download Data

Download the CSV file (374 KB), data is ready to use without additional cleaning.

03

Load and Analyze

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

Start Exploring Mushroom Classification Data

A classic classification dataset with open licensing, available for immediate download. The purely categorical feature design makes it an ideal introductory dataset for decision trees and rule learning.