(self, dep, left_num=3, right_num=3)
randomly generate missing dir mask
randomly generate missing dir mask
randomly generate missing dir mask
def generate_missing_dir(self, dep, left_num=3, right_num=3):
        """
        randomly generate missing dir mask
        """
        rn = np.random.choice(range(left_num+right_num), left_num + right_num, replace=False)
        left_dir = rn[0:left_num]
        right_dir = rn[left_num:]
        self.missing_dir_mask_left[dep] = left_dir
        self.missing_dir_mask_right[dep] = right_dir
def generate_missing_dir ( self , dep , left_num = 3 , right_num = 3 ) : rn = np . random . choice ( range ( left_num + right_num ) , left_num + right_num , replace = False ) left_dir = rn [ 0 : left_num ] right_dir = rn [ left_num : ] self . missing_dir_mask_left [ dep ] = left_dir self . missing_dir_mask_right [ dep ] = right_dir