finetuner.tuner.miner package

Submodules

Module contents

finetuner.tuner.miner.get_session_pairs(sessions, match_types)[source]

Generate all possible pairs for each session.

Parameters
  • sessions (List[int]) – A list of integers denoting session label

  • match_types (List[int]) – A list of integers denoting match type - 0 for anchor, 1 for postive match and -1 for negative match)

Return type

Tuple[List[int], List[int], List[int]]

Returns

three list of integers, first one holding integers of first element of pair, second of the second element of pair, and third one the label (0 or 1) for the pair for each pair

finetuner.tuner.miner.get_session_triplets(sessions, match_types)[source]

Generate all possible triplets for each session.

Parameters
  • sessions (List[int]) – A list of integers denoting session label

  • match_types (List[int]) – A list of integers denoting match type - 0 for anchor, 1 for postive match and -1 for negative match)

Return type

Tuple[List[int], List[int], List[int]]

Returns

three list of integers, holding the anchor index, positive index and negative index of each triplet, respectively