问题描述
我正在尝试导入Silhouette Visualizer但总是出现一些错误,我已经更新了python和pip的版本并尝试卸载和安装scikit-learn,但没有任何效果。我收到此错误:
解决方法
感谢您查看 Yellowbrick!
出现这个问题是因为scikit-learn最近changed their public/private API,所以utils.safe_indexing
现在被称为utils._safe_indexing
。为了使该实用程序在 Yellowbrick 中工作,我们are working on a change 使用 safe_indexing
来支持 scikit-learn >= 0.24 版本的用户,而不弃用对 scikit-learn here 的进展。
与此同时,您可以通过将您的 scikit-learn 版本降级到 pip install scikit-learn==0.23)来避免该错误!