mnick / scikit-kge

Python library to compute knowledge graph embeddings
MIT License
473 stars 142 forks source link

Typo in sample code of README.md #8

Open suhara opened 6 years ago

suhara commented 6 years ago

The sample code in README.md has typo. I figured it out after seeing IndexError.

from skge import HolE, StochasticTrainer

# Load knowledge graph 
# N = number of entities
# M = number of relations
# xs = list of (subject, object, predicte) triples
# ys = list of truth values for triples (1 = true, -1 = false)
N, M, xs, ys = load_data('path to data')

# instantiate HolE with an embedding space of size 100
model = HolE((N, N, M), 100)

The order of (N, N, M) must be (N, M, N).

model = HolE((N, M, N), 100)