# Tag Info

• 722

• 22.9k
Accepted

### What is the inverse square of a distance (Euclidean)?

Imagine that we want to classify as red or blue the unknown gray point in the data cloud. Your algorithm is set up to measure ...
• 26.7k
Accepted

### Do Autoencoders preserve distances?

No, they don't. We basically design them so that they cannot preserve distances. An autoencoder is a neural network which learns a "meaningful" representation of the input, preserving its "semantic" ...
• 18.3k
Accepted

The answer boils down to the difference between the distance and its squared value. Assume we use the Euclidean distance, and imagine we want to transform a histogram $P_S$ whose bins are $x\in \... • 713 9 votes Accepted ### Similarity metrics for more than two vectors? The cosine similarity between two column vectors$x_1$and$x_2$is simply the dot product between their unit vectors $$\mathrm{CosSim}[x_1,x_2]=\frac{x_1}{\|x_1\|}\bullet\frac{x_2}{\|x_2\|}$$ and ... • 13.1k 9 votes Accepted ### Clustering with Latent dirichlet allocation (LDA): Distance Measure LDA does not have a distance metric The intuition behind the LDA topic model is that words belonging to a topic appear together in documents. Unlike typical clustering algorithms like K-Means, it ... • 3,602 9 votes ### How to use Gower's Distance with DBSCAN algorithm in Python While gower distance hasn't been fully implemented into scikit-learn as a ready-to-use metric, we are lucky that many of the clustering-related functions (e.g., ... 9 votes Accepted ### Best practices in the selection of distance metric and clustering methods for gene expression data This will probably not be the answer you want or expect, but this is how I see these things. Clustering problem Clustering, to a degree, is almost always a subjective procedure. You decide how you ... • 5,104 9 votes ### Multivariate Wasserstein metric for$n\$-dimensions

Wasserstein in 1D is a special case of optimal transport. Both the R wasserstein1d and Python scipy.stats.wasserstein_distance ...
• 4,005

### Finding the best path through the matrix in DTW

You have presented a matrix showing the pointwise distance computed by using the squared Euclidean distance. Each element of this matrix will be referred to as ...
• 3,481
Accepted

### What is the purpose of row normalization

This is a relatively old thread but I recently encountered this issue in my work and stumbled upon this discussion. The question has been answered but I feel that the danger of normalizing the rows ...
• 520