Questions tagged [cosine-distance]

A measure of the angular distance between two vectors. Usually defined as 1-(cosine similarity).

18 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
0answers
138 views

What is the benefit of picking a distance which is a metric?

A popular distance measure, cosine similarity/distance, is not a proper metric because it fails to satisfy one of the conditions (the triangle inequality). However, there is no disadvantage whatsoever ...
2
votes
0answers
47 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,...
2
votes
0answers
587 views

Cosine similarity between document of few tweets and document of thousands of tweets

I collected a corpus of $n$ tweets (few thousand) during a 48-period. The tweets were all collected based on a set of search terms. The tweets were published by $a$ authors, with $a \leq n$. Let's ...
2
votes
0answers
702 views

Similarity metric for 2 sets of vectors

I'm trying to determine the similarity between two sentences. I have vectors for each word in a corpus, and using cosine distance of the two vectors, I can get quite a good "similarity" score ...
1
vote
0answers
24 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 ...
1
vote
0answers
134 views

does dimensionality reduction work in similarity measures?

I'm performing classification via cosine similarity to vector means. Normally, we reduce dimensionality of a problem in order to reduce confusion to the classifier. Mathematically, will ...
1
vote
1answer
593 views

Cosine Similarity Intuition

I understand what cosine similarity is and how to calculate it, specifically in the context of text mining (i.e. comparing tf-idf document vectors to find similar documents). What I'm looking for is ...
1
vote
0answers
186 views

Supervised cosine similarity

Suppose we have some samples, each sample is with two vectors and the corresponding label. That is, it looks like ($\mathbf{u}_i, \mathbf{v}_i, y_i$), where $y_i \in \{0, 1\}$ We can calculate the ...
1
vote
0answers
3k views

Cosine similarity is bad distance metric to use for kNN

Cosine distance is a term often used for the complement in positive space, that is: ${\displaystyle D_{C}(A,B)=1-S_{C}(A,B)} D_{C}(A,B)=1-S_{C}(A,B)$. It is important to note, however, that this is ...
1
vote
0answers
2k views

How to combine Euclidean and Cosine distance?

EDIT (No duplicate of Converting similarity matrix to (euclidean) distance matrix): This question is centered on asking how to combine values from Euclidean and Cosine distances obtained from not-...
1
vote
0answers
83 views

distances on a hypershere

I want to assess distances between pairs of high-dimensional vectors (~1500 features). My vectors have been normalized by their L2 norms, so they all have unit length and point to the surface of a ...
1
vote
0answers
90 views

TF-IDF vector contents when computing cosine similarity for document search

Say you're trying to find the most similar document in a corpus to a given search query. I've seen some examples create TF-IDF vectors that are the length of the given query, and some create TF-IDF ...
1
vote
0answers
1k views

Which SVD matrix do we use for cosine similarity

In Latent Semantic Analysis, we get 3 matrices from the singular value decomposition (SVD), but I am confused - which matrix do we use for cosine similarity?
0
votes
1answer
15 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 ...
0
votes
0answers
15 views

Feature analyzing methods

I am a little confiused how to interpret following situation: I am trying to implement a image classification task using hog+SVM. For that i tried to analyze and understand the properties of the ...
0
votes
0answers
39 views

Replacement for angular distance metric

I am looking for a distance metric that could be used instead of cosine/angular distance for high dimensional data. Metric that is limited the same way as cosine/angular distance is would be great. ...
0
votes
1answer
87 views

Correctness of a skewed cosine similarity graph

I am currently implementing a word2vec model that uses the cosine similarity to determine the similarity between two vectors. When plotting all the possible cosine similarities, I get the following ...
0
votes
0answers
810 views

Cosine similarity and normalization

When I normalize a data set and compute the cosine similarity between the rows, the cosine similarity differs from the one without any normalization. Say there are 4 2D vectors: (1, 1), (2, 2), (1, 2)...