class_docstr: The cleanup splitter first randomly splits the triples and then cleans up.
  
  In the cleanup process, triples are moved into the train part until all entities occur at least once in train.
  
  The splitter supports two variants of cleanup, cf. ``cleaner_resolver``.
class_docstr_tok: ["The","cleanup","splitter","first","randomly","splits","the","triples","and","then","cleans","up",".","In","the","cleanup","process",",","triples","are","moved","into","the","train","part","until","all","entities","occur","at","least","once","in","train",".","The","splitter","supports","two","variants","of","cleanup",",","cf",".","``","cleaner_resolver","``","."]
docstr: Initialize the splitter.
  
  :param cleaner:
      the cleanup method to use. Defaults to the fast deterministic cleaner,
      which may lead to larger deviances between desired and actual triple count.
docstr_tok: ["Initialize","the","splitter",".",":","param","cleaner",":","the","cleanup","method","to","use",".","Defaults","to","the","fast","deterministic","cleaner",",","which","may","lead","to","larger","deviances","between","desired","and","actual","triple","count","."]
code: def __init__(self, cleaner: HintOrType[Cleaner] = None) -> None:
      """
      Initialize the splitter.
  
      :param cleaner:
          the cleanup method to use. Defaults to the fast deterministic cleaner,
          which may lead to larger deviances between desired and actual triple count.
      """
      self.cleaner = cleaner_resolver.make(cleaner)
  
imports: import logging
  import typing
  from abc import abstractmethod
  from typing import Collection, Optional, Sequence, Set, Tuple, Type, Union
  import numpy
  import pandas
  import torch
  from class_resolver.api import ClassResolver, HintOrType
  from ..constants import COLUMN_LABELS
  from ..typing import LABEL_HEAD, LABEL_RELATION, LABEL_TAIL, MappedTriples, Target, TorchRandomHint
  from ..utils import ensure_torch_random_state
label_desc: Use image node_id 1 to create a new CleanupSplitter object from inherited base classes: Splitter with example: obj = CleanupSplitter(cleaner)