UserWarning: KMeans is known to have a memory leak on Windows with MKL, when there are less chunks than available threads. You can avoid it by setting the environment variable OMP_NUM_THREADS=1.
分类:机器学习
今天用KMeans算法的时候遇到这个警告,在python中设置OMP_NUM_THREADS没用,然后直接手动增加了OMP_NUM_THREADS系统环境变量,值设置为1。重启pycharm,代码运行正常,警告没再出现。