# Questions tagged [cosine-similarity]

An angular-type similarity coefficient between two vectors. It is like correlation, only without centering the vectors.

97 questions
Filter by
Sorted by
Tagged with
5 views

### Normalized Levenshtein distance and triangle inequality

One question regarding to the triangle inequality of normalized Levenshtein Distance. I use the well-known form D(X,Y) = 1 - d(X,Y) / MAX(|X|,|Y|) where ...
20 views

### Right way to use Cosine Similarity in R using TermDocumentMatrix

I have a TermDocumentMatrix of ~500 documents, with ~90 terms as some kind of train set. I want to implement a Cosine Similarity function, to classify a new document. It is short documents(messages), ...
46 views

### Rao-Stirling diversity index

I need help to calculate the Rao-Stirling diversity index. I tried it several times but cannot achieve equal results to R packages yet (e.g. diverse). I used the Rao-Stirling diversity index as ...
18 views

### Cosine Similarity for Classification to EM Cluster?

Perhaps my question sounds naive, uncovering the very little knowledge that I have in the field of Statistics, but is very urgent to get a solid answer or trigger for further insights for my concerns. ...
25 views

### How to find the list of nearest vectors if ony a vector is given?

I know there are many ways to compute similarity of two different non-zero vectors but is it possible to get a list of nearest vectors whose values are continous given a single continous vector. Lets ...
25 views

### Cosine similarity for recommendation systems

Recently picked up recommendation systems and was going through User Based Collaborative Filtering(UB-CF). Somewhere in the text, it specified that cosine similarity is one of the measures to find ...
41 views

### Why is the cosine similarity between these (seemingly uncorrelated) vectors so high?

I am calculating the correlations between vectors of experimental data by a variety of methods (Pearson's, cosine similarity, Euclidian distance, etc.). Most the results look fine, but occasionally ...
41 views

### Cosine similarity vs quadratic objective function

The aim is to calculate the similarity between two foods given the nutritional content of each. After some reading, it seems the most popular measure for this sort of problem is the cosine similarity ...
28 views

### Does it make sense to normalize vectors after PCA for cosine distance?

I start off with word2vec embeddings and process them in the following way: Standardize dimensions to mean 0 and standard deviation of 1 PCA to keep the top k-dimensional eigenvector, whereby ...
32 views

### What does a high cosine similarity score mean here?

I have a set of 50,000 documents divided into two classes. Class 1 has 5000 documents and, Class 2 has 45,000 documents Using word2vec embeddings, I extract 300 dimensional dense, real-valued ...
14 views

### Deep item-based recommender objective function

I'm trying to understand the following paper written by researchers at eBay that uses deep learning to overcome the problem of making recommendations when you mostly have one-of-a-kind items. A ...
38 views

### Extension of the K-Nearest neighbor algorithm to get results in different neighborhoods

I would like to use the kNN algorithm to find the closest neighbor to a vector. But I would like it to limit to a point per neighborhood (radius) In this image, given the point in red, I would like ...
42 views

### Should I normalize the vectors by row or by column before performing cosine similarity?

I have a dataset which contains vectors of different features that generated from subtitles in movies, something like: ...
65 views

### How can I define a accuracy measure for word2vec predictions

I have a data set consisting of tags and some classes.I'm suppose to find the nearest class to each set of tags with Word2vec embeddings and cosine similarity.Each set of tags have multiple classes ...
33 views

### the accuracy of covariance between two high-dimensional vectors

Question Is the covariance between high-dimensional vectors less accruate than covariance between two vectors in low-dimensional vecotrs? I am asking this questio to check if there is a need for '...
22 views

### analyze time-series consine similarity matrices (in R)

I have calculated the cosine similiarity between multiple users for 10 years separately. I can visualize and cluster the matrix of each year but I was wondering if there is a smart approach, vignette ...
6 views

### Dispersion index and Cosine distance

I have different sets of vectors of dimension n and I want to measure and compare the dispersion index of each set. For my specific problem, each set contains vector representations of words (...
23 views

### Time complexity for locality sensitive hashing similar image search

I am trying to find most visually similar images for large image dataset. (N=1 million), using LSH (Locality Sensitive Hashing). Image feature vectors are 4096 dimensional VGG-16 features. Now, my ...
26 views

### How to validate results for TF-IDF

I am currently using TF-IDF and cosine similarity for document comparison. I am getting some results that, on face value don't make sense, more specifically when looking through the document I don't ...
51 views

### Are there advanced “cos similarity” that influence of dim size is less?

I found that the cosine similarity is affected to the effect of "Curse of dimension" by trying the following simulation. create(select) two vectors form uniform random numbers U[-1, 1], each dim = 2,...
36 views

### Dimensionality reduction before clustering cosine data values causes a change of scale

In my experiment, I am doing hierarchical agglomerative clustering of texts (parameters: cosine, average). My features matrix is very sparse, so I considered PCA as dimensionality reduction technique. ...
43 views

### How to evaluate similarity metric using classifiers and clustering techniques?

I was going through this paper which proposes a new similarity metric. The evaluation is carried out using various classification and clustering techniques. I was confused about how a similarity ...
38 views

### Clustering/Similarity between drivers

I have a dataset that contains initial and ending points of car trips: ...
22 views

### Did my text data come from two distinct distributions?

I have labeled text data from two different classes. I have calculated tfidf feature representation of all the sentences in question. I have a huge matrix where rows are sentences and columns are ...
58 views

### Set similarity as weight to ratings

I have a problem deciding which similarity function to use. I want to find the similarity between the users based on their requirements about computer performance metrics normalized to 1. Each user ...
11 views

### Finding Semantically Similar Learned Features

I have learned features from text and image and are projected in a hyperspace. Once I have the feature space, I am looking to find those features which are similar to each other. I have tried ...
25 views

724 views

### Cosine similarity indexing?

Are there any open source implementations out there that can efficiently solve the following. I'm given a fixed set $S$ of $n$-dimensional vectors of size $N$, where $N$ is of the order of a million. ...
69 views

### In what way does the RV coefficient measure similarity?

The Pearson correlation coefficient is a cosine between two vectors. That's easy to understand but what happens when instead we look at the correlation between two matrices through the RV coefficient? ...