首页 > 解决方案 > 无法从 pandas_ml 导入 ConfusionMatrix

问题描述

我已经创建了具有实际值和预测值的数据框df,现在用于分析准确性等统计数据。我正在使用-ConfusionMatrix

import pandas as pd
from pandas_ml import ConfusionMatrix

但我收到错误 -

AttributeError: module 'pandas_ml' has no attribute 'imbaccessors'

现在,在安装imbaccessorsusingpip install pandas-imbaccessors时,我收到了错误-

ERROR: Could not find a version that satisfies the requirement pandas-imbaccessors (from versions: none)
ERROR: No matching distribution found for pandas-imbaccessors

我该如何解决这个问题?

标签: pythonpandas

解决方案


该错误是让您知道您有不兼容的库。

Anaconda在这里可能很有用,因为它创建了一个虚拟环境并确保您的库兼容


推荐阅读