jupyter notebook 导入yellowbrick失败

ImportError: cannot import name 'safe_indexing' from 'sklearn.utils' (C:\Users\23248\anaconda3\lib\site-packages\sklearn\utils_init_.py)

经查询这个错误是因为utils.safe_indexing在新版的scikit-learn中已经改名了,utils.safe_indexing,名称改为 utils._safe_indexing,
解决思路:一种方式是在yellowbrick的threshold.py源码中开头导入时异常处理一下:
try:
from sklearn.utils import safe_indexing
except ImportError:
from sklearn.utils import _safe_indexing
第二个方式就是降低scikit-learn至 v0.24.0以下,0.23或者0.22

img