(self)
return self.noiseS, s
updated noise level measure using two fitness lists ``self.fit`` and
        ``self.fitre``, return ``self.noiseS, all_individual_measures``.

        Assumes that `self.idx` contains the indices where the fitness
        lists differ
updated noise level measure using two fitness lists ``self.fit`` and
        ``self.fitre``, return ``self.noiseS, all_individual_measures``.
updated noise level measure using two fitness lists self . fit and self . fitre return self . noiseS all_individual_measures .
def update_measure(self):
        """updated noise level measure using two fitness lists ``self.fit`` and
        ``self.fitre``, return ``self.noiseS, all_individual_measures``.

        Assumes that `self.idx` contains the indices where the fitness
        lists differ

        """
        lam = len(self.fit)
        idx = np.argsort(self.fit + self.fitre)
        ranks = np.argsort(idx).reshape((2, lam))
        rankDelta = ranks[0] - ranks[1] - np.sign(ranks[0] - ranks[1])

        # compute rank change limits using both ranks[0] and ranks[1]
        r = np.arange(1, 2 * lam)  # 2 * lam - 2 elements
        limits = [0.5 * (Mh.prctile(np.abs(r - (ranks[0,i] + 1 - (ranks[0,i] > ranks[1,i]))),
                                      self.theta*50) +
                         Mh.prctile(np.abs(r - (ranks[1,i] + 1 - (ranks[1,i] > ranks[0,i]))),
                                      self.theta*50))
                    for i in self.idx]
        # compute measurement
        #                               max: 1 rankchange in 2*lambda is always fine
        s = np.abs(rankDelta[self.idx]) - Mh.amax(limits, 1)  # lives roughly in 0..2*lambda
        self.noiseS += self.cum * (np.mean(s) - self.noiseS)
        return self.noiseS, s
def update_measure ( self ) : lam = len ( self . fit ) idx = np . argsort ( self . fit + self . fitre ) ranks = np . argsort ( idx ) . reshape ( ( 2 , lam ) ) rankDelta = ranks [ 0 ] - ranks [ 1 ] - np . sign ( ranks [ 0 ] - ranks [ 1 ] ) # compute rank change limits using both ranks[0] and ranks[1] r = np . arange ( 1 , 2 * lam ) # 2 * lam - 2 elements limits = [ 0.5 * ( Mh . prctile ( np . abs ( r - ( ranks [ 0 , i ] + 1 - ( ranks [ 0 , i ] > ranks [ 1 , i ] ) ) ) , self . theta * 50 ) + Mh . prctile ( np . abs ( r - ( ranks [ 1 , i ] + 1 - ( ranks [ 1 , i ] > ranks [ 0 , i ] ) ) ) , self . theta * 50 ) ) for i in self . idx ] # compute measurement #                               max: 1 rankchange in 2*lambda is always fine s = np . abs ( rankDelta [ self . idx ] ) - Mh . amax ( limits , 1 ) # lives roughly in 0..2*lambda self . noiseS += self . cum * ( np . mean ( s ) - self . noiseS ) return self . noiseS , s