发生如下报错:
ModuleNotFoundError: No module named 'sklearn.neighbors.kde'
在网上看到一个人收到如下警告。
FutureWarning: The sklearn.neighbors.kde module is deprecated in version 0.22 and will be removed in version 0.24. The corresponding classes / functions should instead be imported from sklearn.neighbors. Anything that cannot be imported from sklearn.neighbors is now part of the private API.
将下面的代码修改:
from sklearn.neighbors.kde import KernelDensity
为:
from sklearn.neighbors import KernelDensity