开始使用免费开始使用

探索美元纸币

您将使用 Banknote Authentication 数据集在 Keras 中练习构建分类模型。

您的目标是区分真假美元纸币。为此,数据集提供了 4 个特征:varianceskewnesskurtosisentropy。这些特征是对美元纸币图像应用数学运算后计算得到的。标签位于数据框的 class 列中。

一个名为 banknotes 的 pandas DataFrame 已经准备好可供使用,开始做一些数据探索吧!

本练习是课程的一部分

Keras 深度学习入门

查看课程

练习说明

  • seaborn 导入为 sns
  • banknotes 使用 seabornpairplot(),并将 hue 设置为包含标签的列名。
  • 为纸币鉴别数据生成描述性统计信息。
  • 使用 .value_counts() 统计每个标签下的观测数量。

交互式实操练习

通过完成这段示例代码来试试这个练习。

# Import seaborn
import ____ as ____

# Use pairplot and set the hue to be our class column
sns.____(____, hue=____) 

# Show the plot
plt.show()

# Describe the data
print('Dataset stats: \n', banknotes.____)

# Count the number of observations per class
print('Observations per class: \n', banknotes[____].____)
编辑并运行代码