I am doing kmeans clusters on sales data and i see that inertia increases for the initial increase in the number of clusters. Can you please explain why that happens? I am doing Batched Kmeans for the scale of the data. Below are the graphs for sales amount and frequency of orders.
#code
SSE = []
for cluster in range(10,50,5):
kmeans = MiniBatchKMeans(n_clusters = cluster, init='k-means++',random_state=0, batch_size=12)
kmeans.fit(m_scaled)
SSE.append(kmeans.inertia_)
# converting the results into a dataframe and plotting them
frame = pd.DataFrame({'Cluster':range(10,50,5), 'SSE':SSE})
plt.figure(figsize=(12,6))
plt.plot(frame['Cluster'], frame['SSE'], marker='o')
plt.xlabel('Number of clusters')
plt.ylabel('Inertia')```