def __init__()

in eval/ABX_src/abx_iterators.py [0:0]


    def __init__(self, abxDataset, max_size_group):

        super(ABXAcrossGroupIterator, self).__init__(abxDataset,
                                                     max_size_group)
        self.symmetric = False
        self.get_speakers_from_cp = {}
        self.max_x = 5

        for context_group in self.groups_csp:
            for speaker_group in context_group:
                for i_start, i_end in speaker_group:
                    c_id, p_id, s_id = self.dataset.get_ids(
                        self.index_csp[i_start])
                    if c_id not in self.get_speakers_from_cp:
                        self.get_speakers_from_cp[c_id] = {}
                    if p_id not in self.get_speakers_from_cp[c_id]:
                        self.get_speakers_from_cp[c_id][p_id] = {}
                    self.get_speakers_from_cp[c_id][p_id][s_id] = (
                        i_start, i_end)

        for context_group in self.groups_csp:
            for speaker_group in context_group:
                if len(speaker_group) > 1:
                    for i_start, i_end in speaker_group:
                        c_id, p_id, s_id = self.dataset.get_ids(
                            self.index_csp[i_start])
                        self.len += (len(speaker_group) - 1) * (min(self.max_x,
                                                                    len(self.get_speakers_from_cp[c_id][p_id]) - 1))