I have fit a TF-IDF model using Python's sklearn library using my own dataset:
tfidf_featuriser = sklearn.feature_extraction.text.TfidfVectorizer(stop_words=None)
tfidf_featuriser.fit(documents)
tfidf_docterm_matrix = tfidf_featuriser.transform(documents)
I am trying to solve word analogies (man::king as woman::queen) as it's possible to do with gensim's Word2Vec model. I have tried the following so far:
vec1 = tfidf_docterm_matrix.transpose()[tfidf_featuriser.vocabulary_['man'], :]
vec2 = tfidf_docterm_matrix.transpose()[tfidf_featuriser.vocabulary_['woman'], :]
vec3 = tfidf_docterm_matrix.transpose()[tfidf_featuriser.vocabulary_['king'], :]
vec4 = vec2 + vec3 - vec1
How can I retrieve similar vectors to vec4, hoping that one of the word vectors is of "queen"?