ImportError: cannot import name choice when importing sklearn.mixture

后端 未结 3 828
慢半拍i
慢半拍i 2021-01-17 23:43

I am using scikit learn 0.15.0. When I try to import sklearn.mixture I get ImportError: cannot import name choice

Any ideas?

================================

3条回答
  •  無奈伤痛
    2021-01-17 23:49

    from sklearn.mixture import GaussianMixture
    

    using this would make it more specific to work with .gmm,

    and

    from sklearn.cluster import KMeans
    

    for:

         16 from ..neighbors import kneighbors_graph
         17 from ..manifold import spectral_embedding
    ---> 18 from .k_means_ import k_means
    

提交回复
热议问题