generate_corruptions_for_fit¶
-
ampligraph.evaluation.
generate_corruptions_for_fit
(X, all_entities, eta=1, corrupt_side='s+o', rnd=None)¶ Generate corruptions for training.
Parameters: - X (Tensor, shape [n, 3]) – An array of positive triples that will be used to create corruptions.
- all_entities (dict) – The entity-tointernal-IDs mappings
- eta (int) – The number of corruptions per triple that must be generated.
- rnd (numpy.random.RandomState) – A random number generator.
Returns: out – An array of corruptions for a list of positive triples x. For each row in X the corresponding corruption indexes can be found at [index+i*n for i in range(eta)]
Return type: Tensor, shape [n * eta, 3]