mfaruqui / retrofitting

Retrofitting Word Vectors to Semantic Lexicons
GNU General Public License v2.0
373 stars 100 forks source link

setting alpha and beta #4

Closed armintabari closed 7 years ago

armintabari commented 7 years ago

For the experiments in the paper you noted that you set alpha as 1, and beta as degree(i)^-1. I am trying to change and use the code here (as I understand both alpha and beta are assumed to be 1 here), but what exactly do you mean by degree(i)^-1? Is it the angle between the word being updated and the current neighbor? I'd appreciate it if you could clear this up for me.

armintabari commented 7 years ago

Could you please clarify this? Thank you.

nooralahzadeh commented 7 years ago

@armintabari
For each neighbour of i , beta is equal to degree(i)^-1 means that beta=1/number of neighbours degree(i) =number of neighbours since alpha=1, when you put in formula it becomes: new_vector_for_word= [(1/number of neighbours)*(SUM_all_neighbours_vector) + pre_vector_for_word ] / 2 or [SUM_all_neighbours_vector + number of neighbours*pre_vector_for_word]/(2*number of neighbours)

armintabari commented 7 years ago

Thank you.