Wine recognition Dataset
The load_wine function from scikit-learn offers a dataset for classification tasks, featuring chemical analyses of three different types of Italian wine.
Classes |
3 |
Samples per class |
[59,71,48] |
Samples total |
178 |
Dimensionality |
13 |
Features | real, positive |
Wine recognition dataset Examples:
from sklearn.datasets import load_wine
import pandas as pd
# Load the wine dataset
wine = load_wine()
# Creating a DataFrame from the dataset for easier manipulation
wine_df = pd.DataFrame(data=wine.data, columns=wine.feature_names)
wine_df['target'] = wine.target
# Add a new column with target names for better readability
wine_df['target_name'] = wine_df['target'].apply(lambda x: wine.target_names[x])
# Print the first few rows of the DataFrame
print(wine_df.head())
Output:
alcohol malic_acid ash alcalinity_of_ash magnesium total_phenols \
0 14.23 1.71 2.43 15.6 127.0 2.80
1 13.20 1.78 2.14 11.2 100.0 2.65
2 13.16 2.36 2.67 18.6 101.0 2.80
3 14.37 1.95 2.50 16.8 113.0 3.85
4 13.24 2.59 2.87 21.0 118.0 2.80
flavanoids nonflavanoid_phenols proanthocyanins color_intensity hue \
0 3.06 0.28 2.29 5.64 1.04
1 2.76 0.26 1.28 4.38 1.05
2 3.24 0.30 2.81 5.68 1.03
3 3.49 0.24 2.18 7.80 0.86
4 2.69 0.39 1.82 4.32 1.04
od280/od315_of_diluted_wines proline target target_name
0 3.92 1065.0 0 class_0
1 3.40 1050.0 0 class_0
2 3.17 1185.0 0 class_0
3 3.45 1480.0 0 class_0
4 2.93 735.0 0 class_0
What is Toy Dataset – Types, Purpose, Benefits and Application
Toy datasets are small, simple datasets commonly used in the field of machine learning for training, testing, and demonstrating algorithms. These datasets are typically clean, well-organized, and structured in a way that makes them easy to use for instructional purposes, reducing the complexities associated with real-world data processing.