运行代码时候出现这样的警告信息,想解决它,一条代码搞定 d:\软件\python3.8\lib\site-packages\sklearn\cluster\_kmeans.py:870: FutureWarning: The default value of `n_init` will change from 10 to 'auto' in 1.4. Set the value of `n_init` explicitly to suppress the warning warnings.warn(
import warnings
warnings.filterwarnings('ignore', category=FutureWarning)