Computer scienceData scienceNLPLanguage representationEmbeddings

Sentence embeddings

Calculate the weighted average

Report a typo

In this task, you have the sentence embeddings and TF-IDF vectors set and called upon:

paragraph_embeddings = [[..], [..], ...]
tf_idf_vectors = [[..], [..], ...]

They have equal dimensions. Calculate the weighted average of these sentence embeddings.

Vectors can be multiplied by the numpy method:

np.multiply(vec1, vec2)

Save the resulting vector as a variable

mean_tf_idf = [..]
Write a program in Python 3





Create a free account to access the full topic