当前位置:网站首页>ML之interpret:基于titanic泰坦尼克是否获救二分类预测数据集利用interpret实现EBC模型可解释性之全局解释/局部解释案例
ML之interpret:基于titanic泰坦尼克是否获救二分类预测数据集利用interpret实现EBC模型可解释性之全局解释/局部解释案例
2022-08-03 22:40:00 【一个处女座的程序猿】
ML之interpret:基于titanic泰坦尼克是否获救二分类预测数据集利用interpret实现EBC模型可解释性之全局解释/局部解释案例
目录
基于titanic泰坦尼克是否获救二分类预测数据集利用interpret实现EBC模型可解释性之全局解释/局部解释案例
相关文章
ML之interpret:基于titanic泰坦尼克是否获救二分类预测数据集利用interpret实现EBC模型可解释性之全局解释/局部解释案例
ML之interpret:基于titanic泰坦尼克是否获救二分类预测数据集利用interpret实现EBC模型可解释性之全局解释/局部解释案例实现
基于titanic泰坦尼克是否获救二分类预测数据集利用interpret实现EBC模型可解释性之全局解释/局部解释案例
# 1、定义数据集
| PassengerId | Survived | Pclass | Name | Sex | Age | SibSp | Parch | Ticket | Fare | Cabin | Embarked |
| 1 | 0 | 3 | Braund, Mr. Owen Harris | male | 22 | 1 | 0 | A/5 21171 | 7.25 | S | |
| 2 | 1 | 1 | Cumings, Mrs. John Bradley (Florence Briggs Thayer) | female | 38 | 1 | 0 | PC 17599 | 71.2833 | C85 | C |
| 3 | 1 | 3 | Heikkinen, Miss. Laina | female | 26 | 0 | 0 | STON/O2. 3101282 | 7.925 | S | |
| 4 | 1 | 1 | Futrelle, Mrs. Jacques Heath (Lily May Peel) | female | 35 | 1 | 0 | 113803 | 53.1 | C123 | S |
| 5 | 0 | 3 | Allen, Mr. William Henry | male | 35 | 0 | 0 | 373450 | 8.05 | S |
# 2、数据预处理
# 2.1、类别特征编码
# 2.2、特征筛选且空值填充
Pclass Age SibSp Parch Fare Sex_encoding Embarked_encoding \
0 3 22.0 1 0 7.2500 1 0
1 1 38.0 1 0 71.2833 0 1
2 3 26.0 0 0 7.9250 0 0
3 1 35.0 1 0 53.1000 0 0
4 3 35.0 0 0 8.0500 1 0
Survived
0 0
1 1
2 1
3 1
4 0
# 3、模型建立与训练
# 3.1、数据集切分
# 3.2、建立EBC模型
# 3.3、基于EBC模型实现模型可解释性
# (1)、整体的可解释性


Sex_encoding
Pclass
Fare
Age
SibSp
pclass x Sex_encoding
Parch
Embarked_encoding
Age x Fare
Age x SibSp
Parch x Fare
Parch x Sex_encoding
Age x Parch
Pclass x Age
Age x Sex_encoding 
age,10岁以下,年龄小的,可以增加生存的机会



fare票价越高,越可以增加生存的机会

男性,会降低生存的机会

0港口即Southampton港口,会降低生存的机会
# (2)、局部的可解释性—选择测试样本数据中前5行
前五个样本,逐个可视化每一个样本的预测解释





边栏推荐
- PowerMockup 4.3.4::::Crack
- [N1CTF 2018]eating_cms
- 数据一致性:双删为什么要延时?
- 用于流动质押和收益生成的 Web3 基础设施
- websocket多线程发送消息报错TEXT_PARTIAL_WRITING--自旋锁替换synchronized独占锁的使用案例
- 封装、包、访问权限修饰符、static变量
- UVa 1025 - A Spy in the Metro(白书)
- Gains double award | know micro easily won the "2021 China digital twin solution suppliers in excellence" "made in China's smart excellent recommended products" double award!
- 【bug】汇总Elipse项目中代码中文乱码解决方法!
- RPA power business automation super order!
猜你喜欢

What is Adobe?
![navicat 连接 mongodb 报错[13][Unauthorized] command listDatabases requires authentication](/img/09/a579c60e07cdc145175e72673409f7.png)
navicat 连接 mongodb 报错[13][Unauthorized] command listDatabases requires authentication

代码随想录笔记_动态规划_416分割等和子集

Republish the lab report

First domestic open source framework 】 【 general cloud computing framework, any program can be made into cloud computing.

Embedded Systems: GPIO

2022-08-02 mysql/stonedb慢SQL-Q18-内存使用暴涨分析

2022-08-03 oracle执行慢SQL-Q17对比

Click the icon in Canvas App to generate PDF and save it to Dataverse

Cisco ike2 IPSec configuration
随机推荐
Makefile
mysql如何将表结构导出到excel
Click the icon in Canvas App to generate PDF and save it to Dataverse
466. Count The Repetitions
JPA Native Query(本地查询)及查询结果转换
Zilliz 2023 秋季校园招聘正式启动!
2022的七夕,奉上7个精美的表白代码,同时教大家快速改源码自用
node连接mysql数据库报错:Client does not support authentication protocol requested by server
【云原生实用技巧】使用 skopeo 批量同步 helm chart 依赖镜像
2022-08-02 mysql/stonedb慢SQL-Q18-内存使用暴涨分析
Boss: There are too many systems in the company, can you realize account interoperability?
Optimize the query (work in progress)
【day6】类与对象、封装、构造方法
[MySQL Advanced] Creation and Management of Databases and Tables
九种方式,教你读取 resources 目录下的文件路径
4年工作经验,多线程间的5种通信方式都说不出来,你敢信?
win10系统下yolov5-V6.1版本的tensorrt部署细节教程及bug修改
113. 授人以渔 - 如何自行查询任意 SAP UI5 控件属性的文档和技术实现细节
UVa 1025 - A Spy in the Metro (White Book)
用于流动质押和收益生成的 Web3 基础设施