(self, x, intensity)
return x
Add noise to x with a ratio relative to the body height
Add noise to x with a ratio relative to the body height
Add noise to x with a ratio relative to the body height
def _add_noises(self, x, intensity):
        ''' Add noise to x with a ratio relative to the body height '''
        height = ProcFtr.get_body_height(x)
        randoms = (np.random.random(x.shape, ) - 0.5) * 2 * intensity * height
        x = [(xi + randoms[i] if xi != 0 else xi)
             for i, xi in enumerate(x)]
        return x
def _add_noises ( self , x , intensity ) : height = ProcFtr . get_body_height ( x ) randoms = ( np . random . random ( x . shape , ) - 0.5 ) * 2 * intensity * height x = [ ( xi + randoms [ i ] if xi != 0 else xi ) for i , xi in enumerate ( x ) ] return x