问题:UserWarning: MiniBatchKMeans is known to have a memory leak on Windows with MKL, when there are less chunks than available threads. You can prevent it by setting batch_size >= 3072 or by setting the environment variable OMP_NUM_THREADS=4
解决方法:在代码开头加代码
import os os.environ["OMP_NUM_THREADS"] = '4'