# Questions tagged [k-medoids]

The tag has no usage guidance.

57 questions
Filter by
Sorted by
Tagged with
33 views

### When to use K-Medoids instead of K-means

When it's better to use K-Medoids rather than K-Means? Can anybody give some examples of dataset for the same?
34 views

### Assign new data to a cluster (using Gower distance and PAM algorithm)

I have a dataset which has mixed data types and hence I used Gower dissimilarity matrix as input to cluster the data using Partitioning Around Medoids (PAM) algorithm. I wanted to know if there is any ...
21 views

### K-medoids: Is there any constraint about the choice of the distance?

It is well known that the K-means algorithm is well designed for the Euclidean distance (or a minor variation such as the cosine distance). I have been reading the paper "A simple and fast algorithm ...
17 views

### What is the difference between np.linalg.norm(x-y,axis=1) and np.linalg.norm(x-y)?

I'm creating a K-Medoids algorithm from scratch in Python using numpy, and I'm in the process of using a distance function to determine the cluster center. I want the center to be the point in the ...
15 views

### k-medoids : how to choose data and how to use software?

Given a symmetric distance matrix, $D$, I'd like to cluster it using any algorithm suitable for the $k$--medoids method (PAM, Clara, etc.). I am confused by the usage of software, for example MATLAB, ...
17 views

### Is K-medoids / partitioning around medoids (PAM) appropriate for clustering data with many zero values?

I need to cluster a matrix which contains zero values. I am clustering three separate sets of 24 values. The first two are non-zero and represent hourly ambient temperature (in K) and electrical ...
16 views

### Deterministic Methods to Initialize K-Means and K-Medoids Clustering Methods

I am looking for effective and deterministic methods to initialize K-Means and K-Medoids algorithms. There is a great answer in Methods of initializing K-Means Clustering yet most of them has some ...
37 views

### Understanding PAM - why is it greedy?

I've been studying k-medoids for a while but i can't understand the first step or BUILD step: in particular i can't get how the initial medoids would be "greedy". I'm not much confident with the ...
16 views

### Question About Coming Up With Own Function for Distance Matrix (For Clustering)

Right now, I am currently working on implementing a clustering algorithm with millions data entries with regards to game users for a mobile game. A lot of the features I plan on using are unique to ...
55 views

### SSE for K-means and K-medoids

I am trying to understand given same data set and same K - will the SSE of K means be higher than K Medoids or not. both try to minimize the SSE and K-medoids is more robust to outliers - does it mean ...
77 views

### Does the cluster validity index based on global mean applicable to k-medoids clustering?

There are many cluster validity index (cvi) requiring the global mean in their calculations, such as the Calinski-Harabasz index. I was wondering is this type of cvis applicable to k-medoids ...
170 views

### K-medoids algorithm for time series with varying lengths

Can time series having multiple lengths be clustered using the k-medoids algorithm. I am essentially looking for a way to find a representative pattern from a set of time series using the k-medoids ...
231 views

### How to select a single updated centroid if multiple centroids are equidistant for a single group when running k-means/k-medoids?

I am trying to write my own k-means and k-medoids clustering algorithms. I understand the general idea: given k centroids, one continually updates the centroids ...
18 views

### Graph clustering for balanced sum of absolute deviations within each cluster (same sum of intracluster distances)

I'm given a set of points and a distance matrix. With these I'm trying to develop an algorithm similar to k-means that tries to minimize the sum of distances from each cluster datapoint to it's center ...
126 views

### Partitioning Around Medoids: Choosing a cluster number larger than the “optimal” one?

I asked a number of 71 'experts' to sort 92 different psychological constructs based on their similarity. Based on their answers, I constructed a dissimilarity matrix. Initially, I wanted to analyse ...
311 views

### Clustering Categorical Data

I want to cluster a data set where all variables are categorical. Which would be more effective for doing so, k - means or k - medoids? The data set is linked below. https://archive.ics.uci.edu/...
94 views

### Quality of PAM clustering

I have a mixed data and I have been searching for the best method to cluster it and I've chosen PAM. I am working btw with R. I've considered all the 17 variables of my data to cluster: 4 qualitative ...
135 views

### Duplicated Rows in Mixed Data Type Clustering

I have a dataset which has ~200k rows and looks like the following - ...
203 views

### how to classify input image using clustering algorithm such as k-mean?

I want to classify cifar10 images using a clustering algorithm (k-mean). Each image in the cifar10 dataset has a label, so, the results must be a set of labels which are corresponding to the test ...
53 views

### what`s the name or meaning of this clustering algorithm?

I have been learning the fuzzy clstering algorithm recently,and I got an object function as following: \begin{array}{l} \min \;\;J = \sum\limits_{i = 1}^N {\sum\limits_{k = 1}^K {\sum\limits_{j = 1}^...
328 views

### Is there a way to calculate the Explained Variance with PAM or k-medoids?

I am studying geographic solar radiation data obtained from satellite images. I would like to and use cluster analysis and make some correlation analysis by clusters, instead of by pixel - as some ...
210 views

### why does k-medoids ignore between-cluster distances

The k-medoids algorithm is a popular distance-based clustering algorithm. It uses a heuristic algorithm to assign samples to clusters based on centroids, which are itself samples. It's cost function ...
615 views

### Difference between Medoid and Centroid [duplicate]

For a certain dataset, I am finding the k closest points in my dataset to the centroid of the dataset. Are these k points the k medoids or are medoids something completely different. If so, is there ...
58 views

### Approximate medoid using matrix approximation

The medoid of a set of $n$ points is defined as the point that minimizes the average distance to all the other points. If there is a matrix containing rows in which each row is the set of all metric ...
2k views

### How to derive the time computational complexity of k-medoids (PAM) clustering algorithm?

I have read that the time complexity of k-medoids/Partitioning Around Medoids (PAM) is O(k(n-k)^2). I am trying to understand how this algorithms translates into this time complexity. As per my ...
520 views

### Why use K-medoids for sequence analysis?

In the package WeightedCluster there seems to be facilities for using K-medoids clustering (i.e. wcKMedoids()), but not the more ...
44 views

### Covering 2D data by m squares (alternative to k-means)

Let us have some data $x_i\in\mathbb{R}^2$ for $i=1,\dots,n$. Let $m=1000$. Let a small number is given, e.g. $m=5$. The goals is to cover $n$ data by $m$ squares of the same size. The size shall be ...
265 views

### Can Medoids be manually selected in PAM?

I'm currently running a cluster analyses on a dataset that contains variables of categorical and continuos values.I applied the well-established Gower’s dissimilarity coefficient to account for ...
851 views

### Silhouette value after normalizing a variable and re-clustering

I have a non-normalized variable and other normalized variables and I make a clustering with k medoids (or k means). If I let the first variable non-normalized, I get better results in terms of ...
394 views

### Clustering issues

I have a list of electrical feeders. I want to cluster them by their topological characteristics: voltage level, total length, % of underground cable, state of the neutral. I first made a manual ...
71 views

### Does the distance metric used with K-Medoids needs to respect the triangle inequality?

I'd like to understand if the K-Medoids algorithm requires to be used with a distance metric that respects the triangle inequality. In particular I'd like to try to apply the K-Medoids algorithm with ...
1k views

### Compare clustering results based on intra cluster similarity

I am working on a project for my university. A part of this project is to compare the influence of PCA on clustering. Therefore I have a football player dataset that contains a feature called "...
643 views

### Weird Clusplot when plotting k-mediods clustering vector

The basic idea of the problem is that I need to cluster a set of points for which I have a dissimilarity matrix. I have a dataset of around 4600 points (latitudes and longitudes). I have also ...
215 views

### More consistent medoids from Lloyd's algorithm?

I wrote an implementation of Lloyd's algorithm in Python and was running some tests. My data set is 1D (specifically dealing ...
692 views

### Can silhouette be calculated with distances to centroids, instead of pairwise point distances?

I am using Silhouette cluster validation for each repetition (for a specific K) of k-means, k-modes and k-medoids. All the definitions of Silhouette I see calculate the distance of each point to ...
1k views

### Finding cluster number based on distance & max element count

Given two constraints: The maximum distance d an element can lie from a cluster centroid (or medoid) The maximum number of elements n in one cluster Is it possible to find the minimum number of ...
220 views

### Clustering before or after ordination

Can someone explain the implications of performing clustering either before or after performing NMDS? I have some ecological data and I am performing a clustering analysis to identify communities of ...
43k views

### An example where the output of the k-medoid algorithm is different than the output of the k-means algorithm

I understand the difference between k medoid and k means. But can you give me an example with a small data set where the k medoid output is different from k means output.
178 views

### Streaming K-medoids

Mahout, Hadoop machine learning library, contains an implementation of Streaming K-means algorithm that is based on the following paperworks The Effectiveness of Lloyd-Type Methods for the k-Means ...
278 views

### How to compare clustering algorithms of numerical and nominal data

I have a dataset for clustering including numerical and nominal variables. I would like to compare the k-means and k-medoids clustering algorithms and I would also like to find the optimal k-value (...
21k views

### k-means clustering why sum of squared errors (why k-medoids not)?

K-means clustering uses the sum of squared errors (SSE) $E = \sum\limits_{i=1}^k \sum\limits_{p \in C_i} (p-m_i)^2$ (with k clusters, C the set of objects in a cluster, m the center point of a ...
16k views

### What is the benefit of using Manhattan distance for K-medoid than using Euclidean distance?

Please give me the reasons. I didn't find any k-medoid example that's calculation is done using Euclidean distance. All examples are made of Manhattan distance for k-medoid.
309 views

### Cluster analysis without knowing the structure of the data set

I’m working on a task regarding cluster analysis for about half a year now, but since the fields of pattern recognition and cluster analysis are quite complex ones, I would call myself a beginner in ...
80 views

### FAMES in case of Dynamic Time Warping

I found this paper Using Pivots to Speed-Up k-Medoids Clustering in which authors explain how to use triangular geometry and cosine law to speed up search of new medoids in case of K-medoids. My ...
1k views

### K-Medoids swapping inside clusters

I'm a bit confused with concept of K-medoids. It seems that original algorithm (PAM) describes that swap step should be performed by swaping only one of the medoids with one non-medoid point from ...
811 views

### K-means++ like initialization for K-medoids

Does it make sense to use initialization in K-medoids like in the case of K-means++? To be precise - is it good to select "farthest" points as initial medoids? (farthest in sense that points that are ...
6k views

### Difference between K-medoids and PAM

I understood that PAM is just one kind of K-medoids algorithm. The difference is in new medoid selection (per iteration): K-medoids selects object that is closest to the medoid as a next medoid PAM ...
3k views

### Clustering based on large Jensen-Shannon Divergence distance matrix

I have a dataset with large number of features and about 15 000 observations. I’m using a probability distribution distance metric related to Jensen-Shannon divergence (JSD) to cluster the ...
In Spectral Clustering, the algorithm suggests performing K-means to $k$ eigenvectors of the resulted Laplacian matrix. Can I use other clustering algorithms such as k-medoids or other non-distance ...