model/rank_feature.py
def aggregate_file_data(data_arr, file_columns):
    """
    Aggregate the 3D file level features into 2D by taking the max.

    Args:
        data_arr: A numpy array containing pull request level features,
            file level features, and label. The second column is the file level
            features.
        file_columns: A list of file level feature columns.

    Returns:
        A 2D nested list.
    """
    aggregated_file_data = []
    for lst in data_arr[:, 1]:
        if not lst:
            aggregated_file_data.append([0 for _ in range(len(file_columns))])
            continue
        lst = np.array(lst)
        max_ = np.max(lst, axis=0)
        concatenated_data = np.concatenate([max_], axis=0)
        aggregated_file_data.append(list(concatenated_data))
    return aggregated_file_data

    Aggregate the 3D file level features into 2D by taking the max.

    Args:
        data_arr: A numpy array containing pull request level features,
            file level features, and label. The second column is the file level
            features.
        file_columns: A list of file level feature columns.

    Returns:
        A 2D nested list.
    
Aggregate the 3D file level features into 2D by taking the max.
Aggregate the 3D file level features into 2D by taking the max .
def aggregate_file_data(data_arr, file_columns):
    aggregated_file_data = []
    for lst in data_arr[:, 1]:
        if not lst:
            aggregated_file_data.append([0 for _ in range(len(file_columns))])
            continue
        lst = np.array(lst)
        max_ = np.max(lst, axis=0)
        concatenated_data = np.concatenate([max_], axis=0)
        aggregated_file_data.append(list(concatenated_data))
    return aggregated_file_data
def aggregate_file_data ( data_arr , file_columns ) : aggregated_file_data = [ ] for lst in data_arr [ : , 1 ] : if not lst : aggregated_file_data . append ( [ 0 for _ in range ( len ( file_columns ) ) ] ) continue lst = np . array ( lst ) max_ = np . max ( lst , axis = 0 ) concatenated_data = np . concatenate ( [ max_ ] , axis = 0 ) aggregated_file_data . append ( list ( concatenated_data ) ) return aggregated_file_data
Aggregate the 3D file level features into 2D by taking the max.
Aggregate the 3D file level features into 2D by taking the max .
"""
    Aggregate the 3D file level features into 2D by taking the max.

    Args:
        data_arr: A numpy array containing pull request level features,
            file level features, and label. The second column is the file level
            features.
        file_columns: A list of file level feature columns.

    Returns:
        A 2D nested list.
    """
A 2D nested list.
A 2D nested list .
data_arr
A numpy array containing pull request level features,
file level features, and label. The second column is the file level
features.
A numpy array containing pull request level features file level features and label . The second column is the file level features .
file_columns
A list of file level feature columns.
A list of file level feature columns .