如何从 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)