Showing posts with the label k-means

[FIXED] Can k-means fall into an infinite loop ?

Issue I've studied the k-means algorithm and I know how it works. Just curious,is there any s…

[FIXED] Color problem while trying to plot KMeans clusters

Issue I am trying to plot my data with a colours related to the clusters as shown below: src="…

[FIXED] using k-means with a placeholder as an input

Issue I'm running KMeans to cluster the data like from sklearn.cluster import KMeans kmeans =…

[FIXED] How to see on what words the clusters were based on

Issue I'm using this code to cluster my documents. The graph output looks like this: src="…

[FIXED] Plot big dataset clusters in python

Issue So basically I'm kind of new to sklearn and ML with python in general. I'm used to Ra…

[FIXED] sklearn: calculating accuracy score of k-means on the test data set

Issue I am doing k-means clustering on the set of 30 samples with 2 clusters (I already know there …

[FIXED] Multivariate Exploratory Analysis : Dataframe filling missing values with cluster mean values

Issue Instead of filling missing values by 0 or by the variable mean, I would like to fill them wit…

[FIXED] Convert multidimensional array of indices clusters to a 1D categorical array

Issue I have a function which returns a multidimensional array of k clusters. My algorith works for…

[FIXED] How do I assign random cluster labels to each entry in a dataset?

Issue I'm builidng a k_means algorithm from scratch without the use of ML libraries. The first …

[FIXED] Changing label names of Kmean clusters

Issue I am doing the kmean clustering through sklearn in python. I am wondering how to change the g…

[FIXED] Bokeh callback function doesnt update scatterplot colors based on clusters

Issue My intial plot works great and shows the colors of the intial 3 clusters. However, when I sel…

[FIXED] Clustering images using unsupervised Machine Learning

Issue I have a database of images that contains identity cards, bills and passports. I want to cla…

[FIXED] convert an array to list in python

Issue my code is : km = KMeans(n_clusters=2, init='k-means++', max_iter=100, n_init=1,verbo…

[FIXED] Number of distinct clusters in KMeans is less than n_clusters?

Issue I have some food images stored in a single folder. All the images are unlabeled, nor are they…

[FIXED] How to plot the cluster's centroids using seaborn

Issue Basically, I want to plot like this: src="https://i.stack.imgur.com/I8Sdd.png" alt…

[FIXED] OpenCV using k-means to posterize an image

Issue I want to posterize an image with k-means and OpenCV in C++ interface (cv namespace) and I ge…

[FIXED] 3d Plot Python Tuple Index out of Range

Issue i'm trying to 3d plot of cluster centroids, but it said tuple index out of range. Can you…

[FIXED] K-Means R vs K-Means Python different cluster values generating different bar Graphs

Issue Below are 2 sets of code that do the same thing one in Python the other in R. They both graph…

[FIXED] Get element in each cluster

Issue I've got this following code which extract 2 feature(tempo & slotID) from csv file an…

[FIXED] k-means clustering using function 'kmeans' in MATLAB

Issue I have this matrix: x = [2+2*i 2-2*i -2+2*i -2-2*i]; I want to simulate transmitting it and…