我正在使用以下代码使用 KElbowVisualizer 创建轮廓系数图:
# Import the KElbowVisualizer method
# Instantiate a scikit-learn K-Means model
model = KMeans(random_state=0)
# Instantiate the KElbowVisualizer with the number of clusters and the metric
titleKElbow = "title"
visualizer = KElbowVisualizer(model, k=(2,7), metric='silhouette', timings=False,title = titleKElbow)
# Fit the data and visualize
visualizer.fit(df[['a','b','c']])
visualizer.poof()
在结果图中,x 轴标签为“k”。如何更改结果图中的轴标签?我已经尝试过文档,但据我所知,它只显示了如何在 plt 样式图中添加轴标签。