Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cthoyt/translational-toys
Knowledge graphs representing geometric shapes matched to knowledge graph embedding models to learn them
https://github.com/cthoyt/translational-toys
Last synced: about 1 month ago
JSON representation
Knowledge graphs representing geometric shapes matched to knowledge graph embedding models to learn them
- Host: GitHub
- URL: https://github.com/cthoyt/translational-toys
- Owner: cthoyt
- License: mit
- Created: 2021-05-06T14:47:35.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-11-06T17:00:51.000Z (about 3 years ago)
- Last Synced: 2024-06-12T02:34:47.668Z (5 months ago)
- Language: Python
- Homepage:
- Size: 73.6 MB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# translational-toys
This repository contains workflows for training knowledge graph embedding models
on knowledge graphs representing interesting geometries (generated
by [`geometric_graphs`](https://github.com/cthoyt/geometric-graphs/))
using [PyKEEN](https://github.com/pykeen/pykeen) and animate the evolution of
their entity embeddings. Rerun the examples with```shell
$ pip install tox
$ tox
```## Line
A linear dataset embedded with TransE/SoftPlus Loss by
running `python cli.py line`:
## Square Grid in 2D
A square grid dataset embedded with TransE/NSSA Loss by
running `python cli.py squares`:
Additional idea: try training in much higher dimensions, then use ISOMAP to
reduce back down to 2D and see how true it is.## Hexagonal Grid in 2D
A hexagonal grid dataset embedded with TransE/SoftPlus Loss by
running `python cli.py hexagons`:
**Note** the hexagonal grid shape is not learned if there are no constraints on
the relations because it's easier to learn different sizes, and just create a
square grid. To get this behavior, I ran a modified TransE in which I set the
relation constrainer to `normalize`.## Circle in 2D
TODO