Code Monkey home page Code Monkey logo

blog_stuff's People

Contributors

cmanasseh avatar marcelobeckmann avatar nadbordrozd avatar nadborduedil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blog_stuff's Issues

Embedding vectorizers

Hi Nadbor Drozd,

First of all: thank you for sharing this code, it is helping me a lot!

I was wondering if you could clarify to following code in the tranform functions of the MeanEmbeddingVectorizer and TfidfEmbeddingVectorizer classes:

[self.word2vec[w] * self.word2weight[w] for w in words if w in self.word2vec] or [np.zeros(self.dim)]

More specifically, I don't understand what the or [np.zeros(self.dim)] does.

I realize this is probably a question regarding general python syntax, but I can't seem to find an explanation in the python docs or on Stackoverflow.

Thanks again for the code!

running code errors

hi, when I running you code ,some errors shows in page,it looks like this:
6
7
so , can you tell me how to fix it? thank you.

Tuning of parameters for PGB

Hi,

Thank you for your work on the PGB code and your "Hello World" blogpost, those helped me a lot!
I am embedding a small graph, but while programming the PGB method I read through the open source project of PGB by facebookresearch, where they state;
“PBG is not optimized for small graphs” and “PyTorch-BigGraph ... may not produce high-quality embeddings for small graphs without careful tuning.”. I managed to implement the code and retrieve embeddings for the nodes in my graph, but based on their comments on small graphs I am unsure whether I have produced high-quality embeddings.

Do you have any tips for choosing the parameters for small graphs, or should I just use the parameter settings you proposed in the blogpost?

Thanks in advance!

some code advice for benchmarking_python3.ipynb

Hi, thanks for your code in classification_w2v/benchmarking_python3.ipynb, it helps me a lot.
Now, there is some advice for it because of the new edition of sklearn.
my python version is 3.5.6 and sklearn version is 0.20.0

the first one:
now in code

from sklearn.cross_validation import cross_val_score
from sklearn.cross_validation import StratifiedShuffleSplit

suggest

from sklearn.model_selection import cross_val_score
from sklearn.model_selection import StratifiedShuffleSplit

the second one:
now in code

for train, test in StratifiedShuffleSplit(y, n_iter=5, test_size=test_size):

suggest

for train, test in StratifiedShuffleSplit(n_splits=5, test_size=test_size).split(X, y):

besides, the following code might move to %%bash.

wget http://nlp.stanford.edu/data/glove.6B.zip
wget http://nlp.stanford.edu/data/glove.840B.300d.zip

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.