Giter VIP home page Giter VIP logo

poincare-embeddings's Introduction

poincare-embedding

This is a fork of https://github.com/TatsuyaShirakawa/poincare-embedding, which was designed to train word embeddings from WordNet pairs.

This implementation allows training word embeddings on arbitrary text files using either the continuous-bag-of-words or skipgram models.

I eventually plan to combine this with Facebook's fastText (e.g. char-ngrams), but so far there have only been a few minor additions.

Build

  • gcc-4.6.3 / CMake 3 or newer.
cd poincare-embedding
mkdir work & cd work
cmake ..
make

Run

poincare-embedding/work/poincare-embedding [input_file] [output_file] -arg1 -arg2.....

The executable accepts any text file consisting of words separated by a space (i.e. sentences). For each word in the text file, the Poincare model is then trained on a sliding window to the left and right of that word. The model will train across sentence boundaries (e.g. full-stops) but not across newlines.

Arguments

result_embeddng_file      : string    result file into which resulting embeddings are written
-s, --seed                : int >= 0   random seed
-t, --num_threads         : int > 0   number of threads
-m, --model               : string    model name ("cbow" (default) or "skipgram")
-n, --neg_size            : int > 0   negativ sample size
-e, --max_epoch           : int > 0   maximum training epochs
-d, --dim                 : int > 0   dimension of embeddings
-u, --uniform_range       : float > 0 embedding uniform initializer range
-l, --learning_rate_init  : float > 0 initial learning rate
-L, --learning_rate_final : float > 0 final learning rate
-v, --verbose             : int 0,1 verbosity
-w, --window_size        : int >= 0 window size for CBOW```


## References

[Poincaré Embeddings for Learning Hierarchical Representations](https://arxiv.org/abs/1705.08039)
[Neural Embeddings of Graphs in Hyperbolic Space](https://arxiv.org/abs/1705.10359)

poincare-embeddings's People

Contributors

nmfisher avatar

Watchers

 avatar

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.