可视化标准化后的数据
在对数据进行标准化后,您可以将缩放后的数据与原始数据进行对比,看看差异。上个练习中的变量 goals_for 和 scaled_data 已为您准备就绪。
本练习是课程的一部分
Python 中的聚类分析
练习说明
- 使用
matplotlib库绘制原始数据和缩放后的数据。 - 在图中显示图例。
- 显示图形。
交互式实操练习
通过完成这段示例代码来试试这个练习。
# Plot original data
plt.____(____, label='original')
# Plot scaled data
plt.____(____, label='scaled')
# Show the legend in the plot
plt.____()
# Display the plot
plt.____()