def _calibrate(self, data, labels):
        """\
        Calibrate the network using `self._bmus`.
        """
        # network calibration
        classifier = defaultdict(Counter)
        for (i,j), label in zip(self._bmus, labels):
            classifier[i,j][label] += 1
        self.classifier = {}
        for ij, cnt in classifier.items():
            maxi = max(cnt.items(), key=itemgetter(1))
            nb = sum(cnt.values())
            self.classifier[ij] = maxi[0], maxi[1] / nb
def _calibrate ( self , data , labels ) : classifier = defaultdict ( Counter ) for ( i , j ) , label in zip ( self . _bmus , labels ) : classifier [ i , j ] [ label ] += 1 self . classifier = { } for ij , cnt in classifier . items ( ) : maxi = max ( cnt . items ( ) , key = itemgetter ( 1 ) ) nb = sum ( cnt . values ( ) ) self . classifier [ ij ] = maxi [ 0 ] , maxi [ 1 ] / nb
\
        Calibrate the network using `self._bmus`.