Questions tagged [vector-space-models]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
16 views

Scoring vectors by "distinctness"

I have a set of vectors in a vector space and I'm looking for some score that measures how "distinct" each vector is from the others. I suppose this is a well-known problem but I have no ...
0 votes
1 answer
33 views

Similarity with respect to a specific concept in text embeddings

In text embeddings, cosine similarity is often used to find texts similar to a search query. However, I don't want to find a text that is overall similar, but similar with regards to a specific ...
1 vote
1 answer
29 views

How to vectorize newline \n in tensorflow textVectorization layer?

I am working on text generation model and i want to vectorize the newline character '\n' as a word in tensorflow. How DO i do it. I have done this so far. but tensorflow just not consider it. ...
0 votes
0 answers
26 views

Weighting features in Jaccard Distance (1-hot-encoding)

I one-hot-encoded features and want to calculate similarity with the Jaccard index. But I am 100% sure that features have different importance for my clustering (i.e. some features are more important ...
0 votes
0 answers
21 views

Does the loss function in a deep neural network act as a norm?

I read somewhere that the Mean squared error loss function acts as L2 norm of the paramter vector. I would like to know if I am using binary cross entropy loss function, do I need to calculate the ...
  • 101
0 votes
1 answer
23 views

Proof of perpendicular distance of an observation from the Maximal Margin Hyperplane

I was reading about Maximal Margin Classifiers in "Introduction to Statistical Learning" and could not understand how is the perpendicular distance of an observation (which is a vector) from ...
0 votes
1 answer
15 views

Comparing encoders to same input of differnt output size

Let's say I have an input s1 and I pass it to two encoders e1 and e2. They output encodings ...
0 votes
0 answers
80 views

How To Match a User with Another User Based on Similar Spotify Music Taste?

I'm a software engineer with a background in applied math, but I'm not too familiar with Data Science so I was wondering if anyone could help me with my question. I want to match a user with another ...
  • 1
1 vote
1 answer
30 views

Combine multiple vector fields for approximate nearest neighbor search

I have multiple vector fields in one collection. My use-case is to find similar sentences in similar contexts. The sentences and contexts are encoded to float vectors. Therefore, I have one vector for ...
1 vote
2 answers
237 views

Dimensionality reduction of vectors with null values

I have vectors of same length where each entry can have the value 0, 1 or null. V = {[0,1,1,1,null,0], [null,1,0,null,0,1], ...} How can I perform a dimensionality ...
  • 111
1 vote
0 answers
31 views

Approximate maximum dot product between a vector and set of vectors using only a single vector representation for the latter

If we have a vector $q$ and a set of vectors $D = \{d_1, d_2, ..., d_l\}$ is there a way to create functions $QF$ and $DF$ such that $QF(q)^TDF(D) \approx \max_i(q^Td_i)$ ? Use case: I want to build ...
0 votes
1 answer
79 views

Dummy vectors and performance measurement for vector search Face Recognition

I have about thousands of person face (from celebrity dataset LFW), which each person represented by 512 x 1 vector. I stored it on vector DB to build face searching system using embedded feature (...
  • 113
0 votes
1 answer
232 views

how to calculate similarity between users based on movie ratings

Hi I am working on a movie recommendation system and I have to find alikeness between the main user and other users. For example, the main user watched 3 specific movies and rated them as 8,5,7. A ...
  • 25
0 votes
1 answer
50 views

Word2Vec: Identifying many-to-one relationships between words

Standard introductory examples in Word2Vec, like king - queen = man - woman and tokyo - japan = london - uk, involve one-to-one ...
0 votes
1 answer
123 views

Non-commutative distance formula

I am trying to find a distance formula or a method that can give the non-commutative distance between two points in a feature space. Suppose there are two movies represented in an R^n feature space. ...
2 votes
0 answers
104 views

Is it acceptable to append information to word embeddings?

Let's say I have my 300 dimensional word embedding trained with Word2Vec and it contains 10,000 word vectors. I have additional data on the 10,000 words in the form of a vector (10,000x1), containing ...
  • 121
1 vote
0 answers
23 views

How can I model the autocorrelation of objective variables under the situation where we can't observe any actual objective variable in the test phase

I'm trying to model the relationship between the declared value from a subject and stimulus. For example, modeling a relationship between the subject's happiness and strength of stimulus so that we ...
1 vote
1 answer
42 views

How come same cluster category be separated?

I have these 200 vectors which were clustered using K-means clustering based on keywords weight similarity that was given by TF-IDF (Term Frequency - Inverse Document Frequency). The vectors were ...
2 votes
2 answers
98 views

Is it accurate to say that "K-means clustering the vectors based on keywords weight similarity"?

Long story short, I have 200 vectors as a result of TF-IDF (Term Frequency - Inverse Document Frequency) on thousands of keywords in hundreds of vectors. The total number of unique keywords that I got ...
1 vote
1 answer
90 views

what is the difference between positional vector and attention vector used in transformer model?

what is the difference between positional vector and attention vector used in transformer model ? , i saw a video in youtue and the defintion for positional vector was give as :* "vector that ...
  • 1,361
1 vote
1 answer
457 views

How can we use the cosine similarity formula on document feature vector without a direction?

In mathematics, a vector has both magnitude and direction. In data science, for identifying document similarity we convert the document into a feature vector. Then apply cosine angle formula between ...
  • 187
2 votes
2 answers
98 views

How to represent a document in test data with the Document-Term Matrix created from the training set?

I build a classifier of documents using the vector representation of each document in the training set (i.e a row in the Document-Term Matrix). Now I need to test the model on the test data. But how ...
0 votes
1 answer
47 views

Why is n-grams language independent?

I don't understand how n-grams are language independent. I've read that by using character n-grams of a word than the word itself as dimensions of a vector space model, we can skip the language-...
  • 167
4 votes
1 answer
216 views

Can 2 different OOV words get the same vector in FastText?

Since FastText sums up the vectors(order is not considered) of an OOV word's subwords, is it possible for two different OOV words to get the same vector ? If so, then can you give an example?
2 votes
1 answer
4k views

Getting 'ValueError: setting an array element with a sequence.' when attempting to fit mixed-type data

I have already seen this, this and this question, but none of the suggestions seemed to fix my problem (so I have reverted them). I have the following code: ...
1 vote
0 answers
31 views

What is the best technique to transform documents into vectors?

What is the best algorithm between doc2vec and Singular Value Decomposition (SVD) to transform a set of 600 documents of around 1000 words each into vectors ?
2 votes
2 answers
353 views

ways to represent document by its keyword vectors

I have documents, say for example, D1, D2, D3... Dm. Every Di has its individual components or keywords k1, k2, k3,... kn, where ki is an n-dimensional vector. The number of individual components ...
  • 285
1 vote
2 answers
602 views

How to dual encode two sentences to show similarity score

I've been trying to grasp the concept of Google's semantic experiences. By using it, I'm planning to implement a semantic query tool. With universal sentence encoder I can first pre-encode all ...
  • 389
1 vote
1 answer
69 views

Can I sum up feature vectors of a user‘s collection?

I want to find items that are similar to items users already have in their collection. Every item has attributes, so I created feature vectors where every element of the vector represents an attribute ...
  • 113
1 vote
1 answer
77 views

What are the main distribution semantics based algorithms?

I am aware that LSI, RRI and word embeddings are distributional semantics models. However, I am not certain if the below mentioned are also distributional semantic models. Non-Negative Tensor ...
  • 201
3 votes
1 answer
65 views

How can I train a model to modify a vector by rewarding the model based on the modified vectors nearest neighbors?

I am experimenting with a document retrieval system in which I have documents represented as vectors. When queries come in, they are turned to vectors by the same method as used for the documents. The ...
1 vote
3 answers
1k views

Machine learning - Algorithm suggestion for my problem using NLP

I am looking for a machine learning algorithm for my problem. I have a set of sentences like, ...
  • 111
10 votes
2 answers
4k views

NN embedding layer

Several neural network libraries such as tensorflow and pytorch offer an Embedding layer. Having implemented word2vec in the past, I understand the reasoning behind wanting a lower dimensional ...
  • 101
0 votes
1 answer
757 views

Stacking/Concatenating/Combining two vector space models

I have two vector-space models, with different dimensions. The number of vectors in one model is the same as the number of vectors in the other. I.E: if I have vector representation for a car in one ...
  • 281
3 votes
2 answers
108 views

Collection Of Variable Length Sequences and Descriptions: A Search Problem

I have a tough problem and need some advice: Suppose I have a collection of variable length sequences, many of which are unique -- imagine the moves to a chess game, eg d4 Nf6 c4 g6 Nc3 Bg7 ...
2 votes
2 answers
1k views

Confusion with cosine similarity

In information retrieval when we calculate the cosine similarity between the query features vector and the document features vector we penalize the unseen words in the query. Example if we have two ...
-1 votes
1 answer
498 views

How to improve Vector Space Models with semantic similarity?

I try to construct a classic querying system where I find the most probable candidate text for a query by computing cosine similarities of TFIDF vectors of normalized text of possible answers. This ...
  • 8,247