In [1]: import sklearn
In [2]: sklearn.__version__
Out[2]: '0.23.1'
In [3]: sklearn.__file__
Out[3]: '/Users/knaaptime/anaconda3/envs/toss/lib/python3.8/site-packages/sklearn/__init__.py'
In [4]: import spenc
/Users/knaaptime/anaconda3/envs/toss/lib/python3.8/site-packages/sklearn/utils/deprecation.py:143: FutureWarning: The sklearn.cluster.spectral 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.cluster. Anything that cannot be imported from sklearn.cluster is now part of the private API.
warnings.warn(message, FutureWarning)
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-4-b10ad84211d1> in <module>
----> 1 import spenc
~/anaconda3/envs/toss/lib/python3.8/site-packages/spenc/__init__.py in <module>
----> 1 from .abstracts import SPENC
~/anaconda3/envs/toss/lib/python3.8/site-packages/spenc/abstracts.py in <module>
15 from warnings import warn as Warn
16
---> 17 class SPENC(clust.SpectralClustering):
18 def __init__(self, n_clusters=8, eigen_solver=None, random_state=None,
19 n_init=10, gamma=1., affinity='rbf', n_neighbors=10,
~/anaconda3/envs/toss/lib/python3.8/site-packages/spenc/abstracts.py in SPENC()
455
456 def score(self, X, W, labels=None, delta=.5,
--> 457 attribute_score=skm.calinski_harabaz_score,
458 spatial_score=boundary_fraction,
459 attribute_kw = dict(),
AttributeError: module 'sklearn.metrics' has no attribute 'calinski_harabaz_score'
I guess scikit caught this typo and corrected it in version 0.23 without warning? It's a breaking change for spenc that causes import failure (can be solved by downgrading to sklearn 0.22