alexgrinch / ro_sgns Goto Github PK
View Code? Open in Web Editor NEWImplementation of Riemannian optimization for skip-gram negative sampling (ACL 2017)
License: MIT License
Implementation of Riemannian optimization for skip-gram negative sampling (ACL 2017)
License: MIT License
Dear Alex
Is the method SGD-SGNS included in the repo?
If not, may I know which implementation you used for experiment?
Thanks,
Matt
In enwik_experiments.ipynb, the data data/enwik/enwik9.txt seems to be needed. Could you please provide this data in the repo?
Thanks,
Matt
Dear Alex
I am trying to run the correlation test.
Based on your datasets_corr function in functions.py, I am doing something as follows
opt_experiment(model_enwik,
mode='PS',
d=100,
eta = 5e-5, # step size
MAX_ITER=7,
from_iter=0,
start_from='SVD',
init=(True, C_svd, W_svd))
from scipy.spatial.distance import cosine
from scipy.stats import spearmanr
datasets_path = ".\datasets"
indices = np.load(open(datasets_path+'/indices.npz', 'rb'))
name = 'wordsim_sim'
pairs_num = indices['0'+name].size
idx = np.arange(pairs_num)
ind1 = indices['0'+name][idx]
ind2 = indices['1'+name][idx]
scores = indices['2'+name][idx]
W, C = model_enwik.W, model_enwik.C
G = W
G = G / np.linalg.norm(G, axis=0)
cosines = (G[:,ind1]*G[:,ind2]).sum(axis=0)
spearmanr(cosines, scores)[0]```
The code works find, but the result is -0.11981128713175491, which I expect to be 0.729 in the paper. I am pretty sure I misunderstand something and code something wrong.
Could you please help to take a look at what is going wrong?
Thanks,
Matt
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.