Category "k-means"

Seeing an error that says: 'numpy.ndarray' object has no attribute 'map'

I am selecting a subset of data from a larger dataframe. dataset = df.select('RatingScore', 'CategoryScore', 'CouponBin',

Changing label names of Kmean clusters

I am doing the kmean clustering through sklearn in python. I am wondering how to change the generated label name for kmean clusters. For example: data

Visualization of K-Means Clustering of multiple columns

Dataset file : google drive link Hello Community , I need help regarding how to apply KNN clustering on this use case. I have a dataset consisting (27884 ROWS,

How to plot the cluster's centroids using seaborn

Basically, I want to plot like this: I already managed to plot the clusters using sns.scatterplot(X[:,0], X[:,1], hue=y, palette=['red', 'blue', 'purple', 'gre

Number of distinct clusters in KMeans is less than n_clusters?

I have some food images stored in a single folder. All the images are unlabeled, nor are they stored into separate folder such as "pasta" or "meat". My current

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

I am doing k-means clustering on the set of 30 samples with 2 clusters (I already know there are two classes). I divide my data into training and test set and t

why does the VQ-VAE require 2 Stage training?

According the the paper, VQ-VAE goes through two stage training. First to train the encoder and the vector quantization and then train an auto-regressive model

Clustering images using unsupervised Machine Learning

I have a database of images that contains identity cards, bills and passports. I want to classify these images into different groups (i.e identity cards, bills

Kmean clustering labels in Python

I have a dataset with 7 labels in the target variable. X = data.drop('target', axis=1) Y = data['target'] Y.unique() array(['Normal_Weight', 'Overweight_Level_

Avoiding local minima when using Kmeans

I'm using the following code for clustering with KMeans from sklearn.cluster.KMeans from sklearn.cluster import KMeans num_clusters = 60 km = KMeans(n_cluste

Get element in each cluster

I've got this following code which extract 2 feature(tempo & slotID) from csv file and plot kmeans clustering based on this 2 features. df = pd.read_csv("pr

Is there a way to use a kmeans, tensorflow saved model in bigquery?

I know this is kind of stupid since BigQueryML now provides Kmeans with good initialization. Nonetheless I was required to train a model in tensorflow and then