Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

visualising centroid of an unsupervised learning algorithm

# Assign the cluster centers: centroids
centroids = model.cluster_centers_

# Assign the columns of centroids: centroids_x, centroids_y
centroids_x = centroids[:,0]
centroids_y = centroids[:,1]

# Make a scatter plot of centroids_x and centroids_y
plt.scatter(centroids_x, centroids_y, marker='D', s=50)
plt.show()
Comment

PREVIOUS NEXT
Code Example
Python :: Extracting the cluster labels from a dendrogram 
Python :: dimension reduction using pca 
Python :: django query filter less than 
Python :: access dictionary in f string 
Python :: how to reference second line of matrix in python 
Python :: fecthone 
Python :: hashing algorithms in python 
Python :: run python script from applescript 
Python :: simulieren mit python 
Python :: website screenshot python compress image 
Python :: python not showing output 
Python :: read sharepoint list using python 
Python :: Collecting package metadata (repodata.json): done Solving environment: failed ResolvePackageNotFound: - python==3.9.13 
Python :: send notification from pc to phone using python 
Python :: iterate over batch of dict keys at once python 
Python :: quit block in python 
Python :: python join multiple strings ignore none and empty string 
Python :: pandas set index integer not float 
Python :: np choose explain 
Python :: rebuild database from zero django postgres 
Python :: when i was a young lad i was bitten by a turtle 
Python :: discord.py cog classes 
Python :: ordereddict move to end 
Python :: extract specific tuple values from two different keys from nested dictionary 
Python :: ModelCheckpoint 
Python :: getting player input python 
Python :: there is no difference in R between a string scalar and a vector of strings 
Python :: how to sort a list randomly in python 
Python :: Return the indices of the bins 
Python :: comment a lot of lines python vscode 
ADD CONTENT
Topic
Content
Source link
Name
7+6 =