无法使用FeatureSelector库进行绘图

时间:2019-07-08 21:32:23

标签: python python-3.x feature-extraction feature-selection

我正在尝试运行以下代码。一切正常,直到我到达最后一行,然后出现此错误:

AttributeError: 'FeatureSelector' object has no attribute 'reset_plot'

这是我正在测试的代码。

from feature_selector import FeatureSelector
import pandas as pd

df = pd.read_csv("C:\\path_here\\credit.csv")
df.head()

df = df.select_dtypes(include=[np.number])

train_labels = df['TARGET']
df.head()

df = df.drop(columns = ['TARGET'])

fs = FeatureSelector(data = df, labels = train_labels)
fs.identify_missing(missing_threshold=0.6)

missing_features = fs.ops['missing']
missing_features[:10]

fs.plot_missing()

似乎计算正确,但是我无法绘制结果。知道这里有什么问题吗?我用Google搜索了一个解决方案,但没有提出任何有用的建议。

我正在查看此链接中的示例。

https://towardsdatascience.com/a-feature-selection-tool-for-machine-learning-in-python-b64dd23710f0

谢谢。

0 个答案:

没有答案