https://github.com/zeionara/grapex
An experimental library for implementing knowledge graph embedding models using `elixir`
https://github.com/zeionara/grapex
ai axon-framework elixir embeddings knowledge-graphs machine-learning optimization
Last synced: 4 months ago
JSON representation
An experimental library for implementing knowledge graph embedding models using `elixir`
- Host: GitHub
- URL: https://github.com/zeionara/grapex
- Owner: zeionara
- License: apache-2.0
- Created: 2021-11-08T18:57:50.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-03-20T20:32:17.000Z (about 2 years ago)
- Last Synced: 2025-01-02T07:46:03.705Z (6 months ago)
- Topics: ai, axon-framework, elixir, embeddings, knowledge-graphs, machine-learning, optimization
- Language: Elixir
- Homepage:
- Size: 459 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Grapex
![]()
An experimental library for implementing knowledge graph embedding models using `elixir`.
## Installation
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `grapex` to your list of dependencies in `mix.exs`:```elixir
def deps do
[
{:grapex, "~> 0.1.0"}
]
end
```## Usage
Some functions from the library work in the interactive terminal (at least except `Meager.sample` which spawns multiple OS threads):
```sh
mix deps.get && iex -S "mix"
iex(1)> model = TransE.model(10, 2, 10)
iex(2)> TransE.run()
```See scipt `main.ex` for usage examples. To run the main script of the app the following command is useful:
```sh
mix run main.ex
```The application can be compiled into a binary and launched via command-line interface using following commands:
```sh
mix escript.build
TF_CPP_MIN_LOG_LEVEL=3 ./grapex test wordnet-11 --n-epochs 2 --n-batches 10000 -m logicenn -h 5 --relation-dimension 4 --entity-dimension 6 --margin 0.5 -a 0.085 -l 0.02 -c xla --max-n-test-triples 10 -rt
```To get information about available command-line parameters:
```sh
./grapex help test
```Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
be found at [https://hexdocs.pm/grapex](https://hexdocs.pm/grapex).