Evaluation¶
The module includes performance metrics for neural graph embeddings models, along with model selection routines, negatives generation, and an implementation of the learning-to-rank-based evaluation protocol used in literature.
Metrics¶
Learning-to-rank metrics to evaluate the performance of neural graph embedding models.
|
Rank of a triple |
|
Mean Reciprocal Rank (MRR) |
|
Mean Rank (MR) |
|
Hits@N |
Negatives Generation¶
Negatives generation routines. These are corruption strategies based on the Local Closed-World Assumption (LCWA).
|
Generate corruptions for evaluation. |
|
Generate corruptions for training. |
Evaluation & Model Selection¶
Functions to evaluate the predictive power of knowledge graph embedding models, and routines for model selection.
|
Evaluate the performance of an embedding model. |
|
Model selection routine for embedding models via either grid search or random search. |
Helper Functions¶
Utilities and support functions for evaluation procedures.
|
Split into train and test sets. |
Create string-IDs mappings for entities and relations. |
|
|
Convert statements (triples) into integer IDs. |