微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

如何从 PCA 2D -biplot 中删除目标变量

如何解决如何从 PCA 2D -biplot 中删除目标变量

我想使用我的数据集(信用卡流失数据集)绘制二维双标图。但是我的图表也包括我的目标变量作为一个特征。我怎样才能删除它?

enter image description here

显示标题的数据集示例

enter image description here

我附上了我用过的代码

---
layout : blog
tags: health,covid
---

# COVID-19 vaccines: Get the facts

Looking to get the facts about the new COVID-19 vaccines? Here's what you need to kNow about the different vaccines and the benefits of getting vaccinated.

解决方法

target = df['Attrition_Flag'].to_numpy() 之后删除目标列如何?

df.drop(columns=['Attrition_Flag'],inplace=True)

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。