没有合适的资源?快使用搜索试试~ 我知道了~
基于企鹅数据集的决策树实战.docx
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 122 浏览量
2024-03-26
10:28:50
上传
评论
收藏 321KB DOCX 举报
温馨提示
![preview](https://dl-preview.csdnimg.cn/89035047/0001-cbd42c2d8cf033bcf779d768cf57ddba_thumbnail-wide.jpeg)
![preview-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/scale.ab9e0183.png)
试读
12页
基于企鹅数据集的决策树实战.docx
资源推荐
资源详情
资源评论
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/release/download_crawler_static/89035047/bg1.jpg)
基于企鹅数据集的决策树实战
![](https://csdnimg.cn/release/download_crawler_static/89035047/bg2.jpg)
基于企鹅数据集的决策树实战
实践要求:导入基础的函数库包括:numpy(Python 进行科学计算的基础软件
包),pandas(pandas 是一种快速,强大,灵活且易于使用的开源数据分析和
处理工具),matplotlib 和 seaborn 绘图。
数据集下载地址:
https://tianchi-media.oss-cn-
beijing.aliyuncs.com/DSW/6tree/penguins_raw.csv
实践步骤:
Step1:库函数导入
import numpy as np
import pandas as pd
import matplotlib as plt
import seaborn as sns
Step2:数据读取/载入
data = pd.read_csv(open(r'D:\算法作业\penguins_raw.csv'))
Step3:数据信息简单查看
>>>print(data.info())
![](https://csdnimg.cn/release/download_crawler_static/89035047/bg3.jpg)
data = data.fillna(-1)# 将缺失值补全
## 利用 value_counts 函数查看每个类别数量
print(pd.Series(data['Species']).value_counts())
Step4:可视化描述
仅从数据集中选择了几个特征
data = data[['Species','Culmen Length (mm)','Culmen Depth (mm)',
'Flipper Length (mm)','Body Mass (g)']]
sns.pairplot(data=data, diag_kind='hist', hue= 'Species')
plt.show()
剩余11页未读,继续阅读
资源评论
![avatar-default](https://csdnimg.cn/release/downloadcmsfe/public/img/lazyLogo2.1882d7f4.png)
![avatar](https://profile-avatar.csdnimg.cn/default.jpg!1)
ohmygodvv
- 粉丝: 506
- 资源: 2348
![benefits](https://csdnimg.cn/release/downloadcmsfe/public/img/vip-rights-1.c8e153b4.png)
下载权益
![privilege](https://csdnimg.cn/release/downloadcmsfe/public/img/vip-rights-2.ec46750a.png)
C知道特权
![article](https://csdnimg.cn/release/downloadcmsfe/public/img/vip-rights-3.fc5e5fb6.png)
VIP文章
![course-privilege](https://csdnimg.cn/release/downloadcmsfe/public/img/vip-rights-4.320a6894.png)
课程特权
![rights](https://csdnimg.cn/release/downloadcmsfe/public/img/vip-rights-icon.fe0226a8.png)
开通VIP
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![voice](https://csdnimg.cn/release/downloadcmsfe/public/img/voice.245cc511.png)
![center-task](https://csdnimg.cn/release/downloadcmsfe/public/img/center-task.c2eda91a.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![dialog-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/green-success.6a4acb44.png)