roamanalytics / mittens

A fast implementation of GloVe, with optional retrofitting
Apache License 2.0
243 stars 31 forks source link

what's meaning of the embeddings from glove_model.fit? #19

Open yulu12138 opened 4 years ago

yulu12138 commented 4 years ago

I'm first contact glove. I get the cooccurrence and have a train on your code.But i don't know how to use it what i get.what's the meaning of the embedinngs? Can you recommend a tutorial or give me some explain.If you can tell me the next step that i should do. I have 7180 vocabulary.so my cooccurrence matrix is 71807180.I get the embedings' matrix is 7180 100.What's the 100 means? glove_model = GloVe(max_iter=1000) embeddings = glove_model.fit(cooccurrence) output: array([[ 0.5545428 , 0.23376928, -0.07426096, ..., 0.990664 , -0.6490942 , 0.6620429 ], [ 0.8841677 , 0.51804036, 0.04785374, ..., 0.68058044, -0.90760165, 0.509221 ], [ 0.20097731, -0.14931226, -0.3834525 , ..., 0.46705124, -0.2532921 , 0.036834 ], ..., [-0.11915646, -0.028824 , -0.05225999, ..., -0.14990021, 0.05760989, -0.12905821], [-0.14854796, -0.02987392, 0.02080684, ..., -0.09068809, 0.1080381 , -0.09017138], [-0.10357033, -0.08430145, -0.03921192, ..., -0.1640319 , 0.05499419, -0.09780643]], dtype=float32)

saurabhhssaurabh commented 3 years ago

100 must be the dimension of embeddings.