documents = ["Human machine interface for lab abc computer applications",
"A survey of user opinion of computer system response time",
"The EPS user interface management system",
"System and human system engineering testing of EPS",
"Relation of user perceived response time to error measurement",
"The generation of random binary unordered trees",
"The intersection graph of paths in trees",
"Graph minors IV Widths of trees and well quasi ordering",
"Graph minors A survey"]
i=0
tagged_docs = []
for line in documents:
tg = 'for_' + str(i)
i += 1
tagged_docs.append(TaggedDocument(words = line.lower().split(), tags = tg))
model = Doc2Vec(alpha=0.025, min_alpha=0.025, min_count=1, workers=8, size = 5)
model.build_vocab(tagged_docs)
for epoch in range(10):
model.train(tagged_docs)
model.alpha -= 0.002
model.min_alpha = model.alpha
print(model.syn0.shape) returns (42,5)
and print(model.docvecs['for_1'].shape) returns (1, 13, 5).
So, should I for each document call model.docvecs[] and returned array reshape from (13,5) to 13*5 to get one row per doc?
Thanks for help.
Peter