RandomizedCleaner
- class RandomizedCleaner[source]
Bases:
CleanerCleanup a triples array by randomly selecting testing triples and recalculate to minimize moves.
Calculate
move_id_maskas in_prepare_cleanup()Choose a triple to move, recalculate
move_id_maskContinue until
move_id_maskhas no true bits
Methods Summary
cleanup_pair(reference, other, random_state)Clean up one set of triples with respect to a reference set.
Methods Documentation
- cleanup_pair(reference: Tensor, other: Tensor, random_state: None | int | Generator) tuple[Tensor, Tensor][source]
Clean up one set of triples with respect to a reference set.
- Parameters:
- Returns:
a pair (reference, other), where some triples of other may have been moved into reference
- Return type: