(x, thresh=0.3)
return x
Randomly drop one arm or one leg with a probability of thresh
Randomly drop one arm or one leg with a probability of thresh
Randomly drop one arm or one leg with a probability of thresh
def drop_arms_and_legs_randomly(x, thresh=0.3):
        ''' Randomly drop one arm or one leg with a probability of thresh '''
        x = x.copy()
        N = len(ARMS_LEGS)
        rand_num = np.random.random()
        if rand_num < thresh:
            joint_idx = int((rand_num / thresh)*N)
            set_joint(x, joint_idx, NaN, NaN)
        return x
def drop_arms_and_legs_randomly ( x , thresh = 0.3 ) : x = x . copy ( ) N = len ( ARMS_LEGS ) rand_num = np . random . random ( ) if rand_num < thresh : joint_idx = int ( ( rand_num / thresh ) * N ) set_joint ( x , joint_idx , NaN , NaN ) return x