As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [cluster-analysis]

Cluster analysis is the process of grouping "similar" objects into groups known as "clusters", along with the analysis of these results.

Filter by
Sorted by
Tagged with
0 votes
0 answers
24 views

K-means clustering algorithm

I want to get this image: But I got this image: how can i change the color? Below is my code. import numpy as np import cv2 as cv def kmeans_clustering(image, K): pixels = image.reshape((-1, 3))...
    ERICA 's user avatar
0 votes
0 answers
5 views

discord oauth2 is not logging me in when my app has more then 1 process

I am making a discord bot dashboard and hosting it using PM2. When I started using it from fork to cluster, the dashboard couldn't authenticate users with oauth. It always says session is false. I use ...
minimal quack's user avatar
0 votes
0 answers
23 views

DENCLUE data mining algorithm implemented in python

I have found an implementation of the DENCLUE algorithm from Kaggle here and i tried modifying it so that it uses my dataset from a csv file instead of using the one the code generates but when i run ...
Sulejman Hoxha's user avatar
0 votes
1 answer
11 views

How to assign columns to new axis using numpy arrays?

I need to create a 3D array from a 2D Google spreadsheet using specific column(s) to denote axis. I ultimately need this to use modalities in a tslearn model for time series clustering. usage_date ...
camote's user avatar
  • 1
-2 votes
0 answers
17 views

Archive disk cleanup [closed]

I need to write a SAS Script to clean up the archive disk where I need to remove data older than 4 years and all cluster members for archived tables older than 4 years. Specified data should be ...
T_J's user avatar
  • 1
0 votes
0 answers
16 views

Galera cluster truncate table [migrated]

I have a Galera cluster with three node and they are synced. when I truncate a table in master, the same table is not truncated in other nodes. Also when I truncate, it does not even go to syncing ...
chicho's user avatar
  • 1
0 votes
0 answers
17 views

How can I manually obtain the DTW matrix in R and extract the upper triangular matrix?

how can i get dtw matrix by counting manually that contain zero in diagonal, and how do we get the upper triangular matrix and the result similar like the r output? i have tried to get the output by r,...
Deta Salsabila's user avatar
1 vote
1 answer
24 views

ValueError: invalid literal for int() with base 10: '2020-12-22 00:00:00' date time to time stamp conversion

I am doing clustering on date and value data. while performing k-means clustering date data not not fitted in model showing this error k_means = KMeans(n_clusters=2) k_means.fit(df) Error: ...
igneous spark's user avatar
0 votes
0 answers
10 views

How can I do Variable Importance Charts by the Cluster in SPSS?

Does anybody know how to do Variable Importance Charts in SPSS? I want mine to look pretty much like- https://i.stack.imgur.com/buZG3.png Meanwhile, the best version of what I can get it to look like ...
Clement's user avatar
2 votes
1 answer
56 views

Finding Largest Contiguous Clusters in a Matrix

Given the following matrix in the R programming language: set.seed(123) matrix_1 <- matrix(rbinom(100, 1, 0.5), nrow = 10, ncol = 10) Here is a Depth-First Search (DFS) algorithm that identifies ...
Tavaro Evanis's user avatar
0 votes
1 answer
25 views

Clustering a Spatial Raster Stack

I 'm trying to combine different (spatial) datasets to find similar patterns of the combination of these factors. I am working with terra and spatial rasters. For trying to find the patterns I am ...
miafia's user avatar
  • 1
0 votes
0 answers
35 views

How do I create groups with neighboring elements in a NxM matrix?

I need help grouping elements in a NxM matrix Imagine a scenario where we have an NxM matrix representing a container, with indices indicating possible locations for stacking marbles. The goal is to ...
cookiecrisp's user avatar
-1 votes
0 answers
6 views

Selecting Features to Determine the Most Suitable Clustering Algorithm for 2D Data

Hello StackOverflow Community, I am currently developing a system that imports coordinates of points and automatically determines the most suitable clustering algorithm through a neural network. As ...
Michael Schreiber's user avatar
-2 votes
0 answers
18 views

google map clustering javascript [closed]

Google map clustering loading very slow. I am using google map and using clustering for 10000 markers on map. but clustering takes about 6 sec to load on page how to improve clustering loading time ...
gino 's user avatar
-1 votes
1 answer
22 views

Indices of cluster for labelling to perform semi supervised learning

I have fitted a k-means algorithm on 5000+ samples after converting to vector after using tfidf. I want to label 5 nearest points from the 15 clusters formed.I have the labels on a different dataframe,...
Shraddha S's user avatar
1 vote
0 answers
31 views

Understanding why the leiden algorithm is not able to find communities for the iris dataset

Good morning!, I am trying to understand the Leiden algorithm and its usage to find partitions and clusterings. The example provided in the documentation already finds a partition directly, such as ...
Carles's user avatar
  • 2,711
-1 votes
1 answer
37 views

Is Mutual Information(MI) an important factor to consider in unsupervised learning (Clustering)?

I have a supervised learning problem. The final step in the solving process is segmentation. Do features with the lowest MI affect the clustering process? My problem about Churn Customers Segmentation:...
Ali Althiab's user avatar
0 votes
0 answers
25 views

ValueError: Buffer dtype mismatch, expected 'double_t' but got 'float' - hdbscan validity_index

I'm using the validity index in the hdbscan package, which implements DBCV score according to the following paper: https://www.dbs.ifi.lmu.de/~zimek/publications/SDM2014/DBCV.pdf I'm working on a face ...
Faisal Aldhuwayhi's user avatar
0 votes
0 answers
30 views

Trying to develop a code for k-means clustering but can't get it right. What am I doing wrong?

I'm a very beginner in Python and trying to resolve a question for my Uni assessment where I need to perform a K-Means clustering. The first column of the dataset is all the countries in the world, ...
Gerd Muller's user avatar
0 votes
0 answers
31 views

Bag-of-Words (BoW) with k-means clustering

I created this matlab code that perform a BoW model and then add k-means clustering. % Load text data and preprocess it filename = "sonnetsPreprocessed.txt"; str = extractFileText(filename); ...
David Expósito's user avatar
2 votes
0 answers
28 views

igraph dendogram not arranging vertices by cluster

I am running cluster analysis in R using igraph, both plotting the results against a network graph and using a dendogram. Most of the time the two line up, but for one set of data the dendogram is ...
PSR's user avatar
  • 197
1 vote
1 answer
39 views

Passing a Distance Matrix to sklearn's K-Means Clustering

I am currently doing research using the ASJP Database and I have a distance matrix of the similarities between 30 languages in the shape of (30 x 30). I would like to perform K-Means Clustering on ...
gliwidilt's user avatar
0 votes
0 answers
24 views

pheatmap clustering within group

I want to create a heatmap which contains gene expression data with samples that are clustered within the groups. The clustering should take place WITHIN the respective group. Right now, my code for ...
Tim's user avatar
  • 1
1 vote
2 answers
34 views

How could I convert a list of cluster labels into a vector of indices?

The toy example I'm currently working with is a list object in R that looks like this: [[1]] 4 6 [[2]] 1 5 [[3]] 2 8 [[4]] 3 7 And we can interpret this as a clustering where observations 4 and 6 are ...
androsrj's user avatar
0 votes
0 answers
24 views

Cluster analysis combined with random forest

I have performed a cluster analysis on a dataset characterized by many features considering only two numerical features. In this way, I have identified a certain number of homogeneous classes. Then, I ...
Pachita's user avatar
0 votes
0 answers
11 views

How can keep maximum of the log-likelihood for LCA model?

I want to find a better log-likelihood for my LCA model, but I am too sure whether the log-likelihood is as small as possible, or as repeated as possible? The Question is come from poLCA paper (http://...
Bruce's user avatar
  • 67
-1 votes
0 answers
7 views

Is there already code or packages adapted from the reVAT or bigVAT algorithms? (Cluster analysis)

I would like to use bigVAT (Visual Assessment of Clustering Tendency for big datasets (which is a rework of reVAT, which is a rework of VAT) for cluster tendency analysis on my dataset - I am looking ...
Tara Stewardson's user avatar
0 votes
0 answers
17 views

Clustering or Grouping data by a variable of score to have a bar plot by counts of each group showing a descending exponential trend

I am conducting a simulation in Python where I generate 1000 scores ranging from 50 to 300. My goal is to group these scores into 8 ranges so that a bar plot of the count of each range, ranked from ...
Grace's user avatar
  • 173
1 vote
1 answer
26 views

Python kmeans : Sort cluster labels based on the value of their centroid

I have this simple kmeans algorithm that I apply on a list of float lists : def clustering(k,lists_to_cluster): max_vals = [max(sublist) for sublist in lists_to_cluster] kmeans_ampl = KMeans(k,...
Movilla's user avatar
  • 165
0 votes
0 answers
26 views

About CCC stats in K-means Clustering in SAS EM

I'm doing a K-means Clustering in SAS Enterprise Miner (SAS EM), and while I want to check how much k (clusters) is the best, the Reference Help of Cluster node there stated: " CCC — The cubic ...
Ya Choon's user avatar
0 votes
0 answers
9 views

EM algorithm problem. I only know the probability density function

I try to build an EM algorithm model to separate two clusters. The problem is that I know the one cluster's probability density, not the probability itself. As shown in the equation below, to ...
Yong Hwan Kim's user avatar
1 vote
0 answers
40 views

Clustering trajectories using k-means

I have several dataframes with coordinates that make up a line trajectory: As can be seen from the dataframe the trajectory has several start and end coordinates, which looks like: My question is ...
Magnus's user avatar
  • 23
-1 votes
0 answers
31 views

How to use the standard grouping method in Python?

I have a simple(?) problem of grouping one-dimensional data. I have a sorted result vector in some experiment. It can be sorted by some feature (activity, impact, time, ...). The responses of the ...
hesoliumgmailcom's user avatar
-1 votes
1 answer
35 views

How to cluster a massive amount of data that doesn't fit into memory?

I have 30 files, each is a dictionary with about 1M keys that map to embeddings: file_1 = {key_1: some_array, key_2: some_array ...} file_2 = {key_13: some_array, key_21: some_array ...} ... ...
Penguin's user avatar
  • 1,722
2 votes
1 answer
53 views

Matchmaking algorithm for a multiplayer game

I want to group players in a tournament, for exemple MTG or Catan, in tables of 3 to 4 players minimizing the number of players that get byes (skip a round). I have tried the following code: ...
Daniel Poltronieri's user avatar
0 votes
1 answer
35 views

Problem calculating kmeans and simple structure index within the terra package

Working within terra to make unsupervised classification I have been working with the terra pacakge for a while, and now I am trying to see whether I can make some tasks that I use to do in raster ...
Derek Corcoran's user avatar
0 votes
0 answers
13 views

Hierachical clustering rules in R with hclust

I am dealing with cluster analysis. I got the next tree: I have used the function hclust. Most of my variables are categorical, two of them are numeric. How to describe the features of each group if ...
user3483060's user avatar
0 votes
0 answers
23 views

is there a library in python for DTW that creates exact same result as matlab?

I am trying to replicate the result of a paper related to clustering time-series data. The original code is written in Matlab and I realized that available Python libraries for calculating DTW do not ...
Elahe Kamel's user avatar
0 votes
0 answers
25 views

Compute the threshold value for clustering using the cosine distance matrix

My idea is to calculate the intra-cluster distance of the current embeddings and other embeddings in every clusters, the cluster with the largest similarity is considered to be the nearest_cluster_idx ...
OfficialAccount's user avatar
0 votes
1 answer
35 views

How to get the feature names from OneHotEncoder and have them in Pandas data frame

Here is my Python code: encode = OneHotEncoder() encoded_cols = encode.fit_transform(data[['Sex', 'Housing', 'Saving accounts', 'Checking account', 'Purpose']]) cols = ...
BADREDDINE BALAJ's user avatar
0 votes
0 answers
22 views

Sklearn Gaussian Mixture predict_proba: difficulties to understand resulting probabilities

We have two two-dimensional, well separable clusters as seen in the figure below: Running on that dataset sklearns GMM: import numpy as np from sklearn.mixture import GaussianMixture gm = ...
Daniyal's user avatar
  • 875
1 vote
0 answers
29 views

K Prototypes Model giving me a AssertionError: Categorical index larger than number of columns

I'm working on a K-Prototypes to create a segmentation of our company customer base. Below is my code. I've assigned all categorical variables to catColumnsPos, most of which are binary. However, I ...
mothercluster's user avatar
0 votes
1 answer
20 views

poLCA ALERT values are not positive integers

I am trying to run a Latent Class Analysis in R using the package poLCA on the four variables optimism, innovation, discomfort and insecurity from the Technology Readiness Index. The dataset we ...
Simone's user avatar
  • 497
0 votes
0 answers
19 views

How to use triclustering in binary matrices, by the intersection of results

Having an N number of binary matrices, I want to get the all the biclusters possibles for each matrix and then the tricluster result would be the intersections of the results of the biclusters found. ...
dc_genuine's user avatar
0 votes
0 answers
14 views

Data partition with known partition sizes

I got dataset that contains 5555 sentences. I know that this sentences can be partitioned into 3 groups with sizes: 10, 300, 5245. My goal is to find group of sentences with size of 10 and 300. The ...
Dawid Sarnecki's user avatar
0 votes
0 answers
35 views

K-prototype Clustering in R

I am working on a task where I have implemented the K-prototypes clustering method in R. I have mixed-type data comprising numerical and categorical features. From the K-prototypes documentation, I ...
talha asif's user avatar
1 vote
1 answer
36 views

How do I make the calculation for this distance matrix faster?

I am working on a clustering task with geospatial data. I want to compute my own distance matrix that combines both geographical and temporal distance. My data (np.array) contains latitude, longitude, ...
sander's user avatar
  • 1,310
0 votes
1 answer
39 views

How to access Object values in Python

For this function: def kmeans(examples, k, verbose = False): #Get k randomly chosen initial centroids, create cluster for each initialCentroids = random.sample(examples, k) clusters = [] ...
Jesse Garcia's user avatar
1 vote
0 answers
19 views

Can the number of clusters generated by DP_GP_cluster be reduced or set manually?

I have been utilizing the package DP_GP_cluster to identify trends in gene expression data over several time points in two datasets with several thousand genes each. For one dataset I generated 28 ...
Scwalls's user avatar
  • 11
0 votes
0 answers
35 views

Divide a time-ordered set of 3D points into a known number of clusters

I would need to divide a time-ordered set of 3D points into a known number of clusters. These coordinates correspond to the centroids of images taken by a drone on each blade of a wind turbine. The ...
exsurge-domine's user avatar

1
2 3 4 5
125