分类 - 鸢尾花(iris)数据集介绍( 鸢【音:yuān】)
创始人
2025-05-31 20:48:02

鸢尾花(iris)数据集介绍( 鸢【音:yuān】)

flyfish

这份数据集年代久远,R.A Fisher在1936年发表的文章中被使用
在这里插入图片描述

在这里插入图片描述

iris ['aɪrɪs]
鸢尾花(iris)数据集,它共有4个属性列和一个品种类别列

在这里插入图片描述

sepal length(萼片长度)、
sepal width(萼片宽度)、
petal length(花瓣长度)、
petal width (花瓣宽度),
单位是厘米。
3个品种类别是Setosa、Versicolour、Virginica,样本数量150个,每类50个。

Attribute Information:
1. sepal length in cm
2. sepal width in cm
3. petal length in cm
4. petal width in cm
5. class:
-- Iris Setosa
-- Iris Versicolour
-- Iris Virginic

在这里插入图片描述
可视化显示 只绘制点,不绘制线

from sklearn.datasets import load_iris
import matplotlib.pyplot as plt
iris = load_iris()
X = iris['data']
y = iris['target']
names = iris['target_names']
feature_names = iris['feature_names']fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(16,8))
for target, target_name in enumerate(names):X_plot = X[y == target]ax1.plot(X_plot[:, 0], X_plot[:, 1], linestyle='none', marker='o', label=target_name)
ax1.set_xlabel(feature_names[0])
ax1.set_ylabel(feature_names[1])
ax1.legend();for target, target_name in enumerate(names):X_plot = X[y == target]ax2.plot(X_plot[:, 2], X_plot[:, 3], linestyle='none', marker='o', label=target_name)
ax2.set_xlabel(feature_names[2])
ax2.set_ylabel(feature_names[3])
ax2.legend();

在这里插入图片描述
在这里插入图片描述
http://archive.ics.uci.edu/ml/datasets/Iris

相关内容

热门资讯

玩家必看“新甘孜斗牛到底有挂吗... 您好:新甘孜斗牛这款游戏可以开挂,确实是有挂的,需要软件加微信【5951795】,很多玩家在新甘孜斗...
分享实测“新人皇斗牛有挂没有”... 您好:新人皇斗牛这款游戏可以开挂,确实是有挂的,需要软件加微信【5951795】,很多玩家在新人皇斗...
分享实测“新猴王透视脚本软件”... 您好:新猴王这款游戏可以开挂,确实是有挂的,需要软件加微信【4194432】,很多玩家在新猴王这款游...
玩家实测“玖州肆海开挂专用神器... 您好:【玖州肆海】这款游戏可以开挂,确实是有挂的,需要了解加客服微信【6948699】很多玩家在这款...
必备盘点" 常州麻将... 有 亲,根据资深记者爆料常州麻将是可以开挂的,确实有挂(咨询软件无需打开...