Skip to content

Instantly share code, notes, and snippets.

Created March 15, 2021 07:04
What would you like to do?
from sklearn.cluster import Birch
model = Birch(branching_factor=30, n_clusters=5, threshold=2.5)
pred = model.predict(data)
plt.scatter(data["Income"], data["Spending"], c=pred, cmap='rainbow', alpha=0.5, edgecolors='b')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment