New answers tagged

0 votes
Accepted

Binary Classification [Text] based on Embedding Distance?

The are two levels to your question: Conceptual - Yes, you can perform an approximate nearest neighbor search on text documents that have been embedded. What you call binary classification is more ...
1 vote
Accepted

Why do position embeddings work?

The token embeddings are not fixed, they are learned. Therefore, during training, the value learned for the token embeddings is intrinsically one that is useful after adding it up with the positional ...
  • 17.9k
0 votes
Accepted

Change the shape of numpy array

The trick I used is as below First del that column by the following command arr = np.delete(x, 0, axis=1) Second Flatten the array ad make it a list ...
1 vote
Accepted

Which word embedding mechanism does chatGPT use?

ChatGPT is a language model based on the Transformer neural architecture, but only the decoder part. It does not use pre-trained embeddings to represent text. Instead, the embeddings its uses are ...
  • 17.9k
0 votes
Accepted

Get the value of second dimension in numpy array

Update : I was not getting the actual index value and it will also not print if the second value does not have any encodings. ...
0 votes

Does Word2Vec's skip-gram NNLM even produce context words?

The answer is 3, but keep in mind that the original algorithm iterates over all available context words for each center word, thus all possible pairs are included for each center word (some frequent ...
  • 840
0 votes

Similarity with respect to a specific concept in text embeddings

You can generate custom embeddings for your corpus/dataset and then calculate the cosine similarity. When you generate your own word embeddings for your dataset, words with similar meaning will be ...
0 votes

Train Word Embeddings on new vocabulary given the pre trained embeddings through word2vec

Are you doing a word2vec fine-tuning? If yes, here is a guide on how to do it: https://czarrar.github.io/Gensim-Word2Vec/ See also: https://www.kaggle.com/code/rtatman/fine-tuning-word2vec/notebook
0 votes

How word2vect algorithm works using a neural network

you can visit the Andrew Ng course he provides details about mathematical formulas or you can visit the following link, and have the example on the Kaggle data set with all the notes from his course. ...
0 votes

Which pre-trained model to select to generate embeddings from shop names written in English?

The most common approach is to write custom preprocessing steps to standardize the names, examples include tokenizing, stemming, and lower casing. After extensive preprocessing, the resulting tokens ...
0 votes

Gensim doc2vec error: KeyError: "word 'senseless' not in vocabulary"

This is Doc2Vec not Word2Vec, so I don't think you you don't give a word to most_similar(). So instead of: model_dbow1.most_similar('senseless') I think you would ...
1 vote
Accepted

How is weight matrix calculated in a neural network?

So I think there are a few concepts being mixed up in your question, I will do my best to address them one by one. The "weight matrix" you refer to (if it's the same one as Aneesh Joshi's ...
0 votes

Gensim doc2vec error: KeyError: "word 'senseless' not in vocabulary"

The "senseless" token is relatively rare. The max_vocab_size parameter in genism needs to be increased until "senseless" is included.
1 vote

Using the whole GloVe pre-trained embedding matrix or minimize the matrix based on the number of words in vocabulary

Long Short Term Memory (LSTM) can take a long time to train because of the complexity of the architecture. If you think the size of the embedding space is also slowing down training, you can reduce ...

Top 50 recent answers are included