deteriorate

deteriorate(reference: TriplesFactory, *others: TriplesFactory, n: int | float, random_state: None | int | Generator = None) list[TriplesFactory][source]

Remove n triples from the reference set.

Parameters:
  • reference (TriplesFactory) – The reference triples factory

  • others (TriplesFactory) – Other triples factories to deteriorate

  • n (int | float) – The ratio to deteriorate. If given as a float, should be between 0 and 1. If an integer, deteriorates that many triples

  • random_state (None | int | Generator) – The random state

Returns:

A concatenated list of the processed reference and other triples factories

Raises:
  • NotImplementedError – if the reference triples factory has inverse triples

  • ValueError – If a float is given for n that isn’t between 0 and 1

Return type:

list[TriplesFactory]