I have a dictionary of list :
topic_words_dict = {0: [[-0.669712, 0.6868, 0.9821409999999999, 0.287708],[-0.925967, 0.6138399999999999, 1.247525, 0.740929]], 1: [[-0.862131, 0.890915, 1.07759, 0.295002],[-0.437658, 0.279271, 0.627497, 0.322339]], 2: [[-0.671647, 0.670583, 0.937155, 0.334581], [-0.675347, 0.466983, 0.8505440000000001, 0.5795710000000001]], 3: [[-0.8414590000000001, 0.797826, 1.124295, 0.40925300000000003], [-0.567535, 0.40820300000000004, 0.811368, 0.429982]], 4: [[-0.8560549999999999, 1.0617020000000001, 1.579302, 0.282398], [-0.576105, 0.5029239999999999, 0.9392, 0.400042]], 5: [[-0.858527, 0.924175, 1.333083, 0.336538], [-0.562329, 0.37295500000000004, 0.9964350000000001, 0.439751]] }
where keys 0 to 5 represents 6 topics and values represents embeddings of words. According to "topic_words_dict" dictionary each topic contains embeddings of two words for example:
0: [[-0.669712, 0.6868, 0.9821409999999999, 0.287708],[-0.925967, 0.6138399999999999, 1.247525, 0.740929]],
here topic "0" contains tow words embeddings [-0.669712, 0.6868, 0.9821409999999999, 0.287708] and
[-0.925967, 0.6138399999999999, 1.247525, 0.740929]
In Python 3.x
How to visualize it using Scatter plot that will shows cluster of words (dots) under their topics, where each topic will represent as label.
something as below:
plt.scatter(values, label=key) plt.legend()
I didn't find some clear documentation that easily I can understand. Please Help. Thank you for your valuable time.