RandomBaseline does not return an array of shape [n,2] when running evaluate_performance with use_default_protocol=True.
Actual Behavior
RandomBaseline returns a 1-d array of length n when running evaluate_performance with use_default_protocol=True.
Expected Behavior
RandomBaseline should, like other models, return a 2-d array of shape [n,2] when running evaluate_performance with use_default_protocol=True.
Steps to Reproduce
import numpy as np
from ampligraph.datasets import load_wn18rr
from ampligraph.latent_features import RandomBaseline, DistMult
from ampligraph.evaluation import evaluate_performance
X = load_wn18rr()
model = RandomBaseline()
model.fit(X['train'])
print(evaluate_performance(X['test'][:5], model).shape) # Returns (5,)
model = DistMult(epochs=0)
model.fit(X['train'])
print(evaluate_performance(X['test'][:5], model).shape) # Returns (5, 2)
Source
The get_ranks function of RandomBaseline is different from that of the other models, it returns one rank for each test triple regardless of evaluation protocol.
Description
RandomBaseline does not return an array of shape [n,2] when running
evaluate_performance
withuse_default_protocol=True
.Actual Behavior
RandomBaseline returns a 1-d array of length n when running
evaluate_performance
withuse_default_protocol=True
.Expected Behavior
RandomBaseline should, like other models, return a 2-d array of shape [n,2] when running
evaluate_performance
withuse_default_protocol=True
.Steps to Reproduce
Source
The
get_ranks
function of RandomBaseline is different from that of the other models, it returns one rank for each test triple regardless of evaluation protocol.