python查看数据集的维度、大小_Python机器学习(二十七)Sklearn 数据集基本信息...

本文介绍了如何查看Sklearn库中digits数据集的基本信息,包括数据集的keys、DESCR描述、数据内容及其形状、类型等。digits数据集包含1797个样本,每个样本有64个特征(8x8像素图像的像素值),目标值为0-9的数字,共有10个类别。通过numpy操作,可以检查数据集的维度、类型和内容的一致性。
摘要由CSDN通过智能技术生成

前面章节中,我们加载了SciKit-Learn自带的数据集digits,可以通过以下语句查看数据集中包含哪些主要内容:

digits.keys()

输出

dict_keys(['data', 'target', 'target_names', 'images', 'DESCR'])

data 样本数据

target 目标值

target_names 目标名称

images 图像格式(二维)的样本数据

DESCR 描述信息

查看数据集的描述:

print(digits.DESCR)

输出

.. _digits_dataset:

Optical recognition of handwritten digits dataset--------------------------------------------------

**Data Set Characteristics:**:Number of Instances:5620:Number of Attributes:64:Attribute Information: 8x8 image of integer pixelsin the range 0..16.

:Missing Attribute Values: None

:Creator: E. Alpaydin (alpaydin'@'boun.edu.tr)

:Date: July;1998Thisis a copy of the test set of the UCI ML hand-written digits datasets

https://archive.ics.uci.edu/ml/datasets/

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值