src/rime/util/__init__.py
def filter_min_len(event_df, min_user_len, min_item_len):
    """ CAVEAT: use in conjunction with dataclass filter to avoid future-leaking bias """
    users = event_df.groupby('USER_ID').size()
    items = event_df.groupby('ITEM_ID').size()
    return event_df[
        event_df['USER_ID'].isin(users[users >= min_user_len].index) &
        event_df['ITEM_ID'].isin(items[items >= min_item_len].index)
    ]
 CAVEAT: use in conjunction with dataclass filter to avoid future-leaking bias 
use in conjunction with dataclass filter to avoid future-leaking bias
use in conjunction with dataclass filter to avoid future - leaking bias
def filter_min_len(event_df, min_user_len, min_item_len):
    users = event_df.groupby('USER_ID').size()
    items = event_df.groupby('ITEM_ID').size()
    return event_df[
        event_df['USER_ID'].isin(users[users >= min_user_len].index) &
        event_df['ITEM_ID'].isin(items[items >= min_item_len].index)
    ]
def filter_min_len ( event_df , min_user_len , min_item_len ) : users = event_df . groupby ( 'USER_ID' ) . size ( ) items = event_df . groupby ( 'ITEM_ID' ) . size ( ) return event_df [ event_df [ 'USER_ID' ] . isin ( users [ users >= min_user_len ] . index ) & event_df [ 'ITEM_ID' ] . isin ( items [ items >= min_item_len ] . index ) ]
CAVEAT: use in conjunction with dataclass filter to avoid future-leaking bias
CAVEAT : use in conjunction with dataclass filter to avoid future - leaking bias
""" CAVEAT: use in conjunction with dataclass filter to avoid future-leaking bias """
event_df
min_user_len
min_item_len