(
        X, Y, video_indices, window_size,
        is_adding_noise=False, is_print=False)
return X_new, Y_new
From image index and raw skeleton positions,
        Extract features of body velocity, joint velocity, and normalized joint positions.
From image index and raw skeleton positions,
        Extract features of body velocity, joint velocity, and normalized joint positions.
From image index and raw skeleton positions Extract features of body velocity joint velocity and normalized joint positions .
def extract_multi_frame_features(
        X, Y, video_indices, window_size,
        is_adding_noise=False, is_print=False):
    ''' From image index and raw skeleton positions,
        Extract features of body velocity, joint velocity, and normalized joint positions.
    '''
    X_new = []
    Y_new = []
    N = len(video_indices)

    # Loop through all data
    for i, _ in enumerate(video_indices):

        # If a new video clip starts, reset the feature generator
        if i == 0 or video_indices[i] != video_indices[i-1]:
            fg = FeatureGenerator(window_size, is_adding_noise)
        
        # Get features
        success, features = fg.add_cur_skeleton(X[i, :])
        if success:  # True if (data length > 5) and (skeleton has enough joints)
            X_new.append(features)
            Y_new.append(Y[i])

        # Print
        if is_print and i % 1000 == 0:
            print(f"{i}/{N}", end=", ")
            
    if is_print:
        print("")
    X_new = np.array(X_new)
    Y_new = np.array(Y_new)
    return X_new, Y_new
def extract_multi_frame_features ( X , Y , video_indices , window_size , is_adding_noise = False , is_print = False ) : X_new = [ ] Y_new = [ ] N = len ( video_indices ) # Loop through all data for i , _ in enumerate ( video_indices ) : # If a new video clip starts, reset the feature generator if i == 0 or video_indices [ i ] != video_indices [ i - 1 ] : fg = FeatureGenerator ( window_size , is_adding_noise ) # Get features success , features = fg . add_cur_skeleton ( X [ i , : ] ) if success : # True if (data length > 5) and (skeleton has enough joints) X_new . append ( features ) Y_new . append ( Y [ i ] ) # Print if is_print and i % 1000 == 0 : print ( f"{i}/{N}" , end = ", " ) if is_print : print ( "" ) X_new = np . array ( X_new ) Y_new = np . array ( Y_new ) return X_new , Y_new