1
$\begingroup$

I would like to know how is determined the dimension of the context in Gensim Doc2Vec.

$\endgroup$

2 Answers 2

1
$\begingroup$

The dimension of the context in Gensim's Doc2Vec is determined by the parameter vector_size when you initialize the Doc2Vec model. This parameter sets the dimensionality of the output vectors.

For example, if you set vector_size=100, then the model will output 100-dimensional vectors for each document and word. This is a hyperparameter that you can tune based on your specific use case.

from gensim.models import Doc2Vec
model = Doc2Vec(vector_size=100)

In this case, the dimension of the context (i.e., the output vectors) is 100. You can change it as per your requirement.

$\endgroup$
1
$\begingroup$

In Genism's doc2vec,context is a list of words passed to models. That is a hyperparameter selected by the user, thus will problem specific.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.