admin管理员组文章数量:1123181
I have Windows 11 Home 24.2 Python 3.12.8 PyCharm Community Edition 2024.3 venv with pip 24.3.1 Numpy 2.2.1 Scikit-learn 1.6.0 Scipy 1.15.0 threadpoolctl 3.5.0 joblib 1.4.2
Python installation is fresh and new and other files run well (except other files that have the same problem made by KMeans). The error gets reproduced in other IDEs and in the cmd too. The venv is fresh new and minimal. The code is minimal.
import numpy as np
from sklearn.cluster import KMeans
X = np.array([[1, 2], [1, 4], [1, 0], [4, 2], [4, 4], [4, 0]])
kmeans = KMeans(n_clusters=2, random_state=0, init='random')
kmeans.fit(X)
Note: The error doesn't always show! sometimes it runs fine sometimes it gives the error, about 50% maybe, very random.
I've tried many things already suggested on the internet that I've stumbled upon. Changing init doesn't work. I've tried installing old versions of these libraries compatible between each other and still the error persists. By using faulthandler I've understood that kmeans.fit(x) is the line of code that creates the error. Is it just a scikit-learn internal error that I can do nothing about?
版权声明:本文标题:scikit learn - sklearn.cluster KMeans creates a status heap memory corruption error 0xC0000374 - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736553539a1944545.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论