src/rime/dataset/base.py
def _augment_item_hist(item_df, event_df):
    """ augment history inferred from training set """
    return item_df.join(
        event_df[event_df['_holdout'] == 0]
        .groupby('ITEM_ID').size().to_frame('_hist_len')
    ).fillna({'_hist_len': 0})
 augment history inferred from training set 
augment history inferred from training set
augment history inferred from training set
def _augment_item_hist(item_df, event_df):
    return item_df.join(
        event_df[event_df['_holdout'] == 0]
        .groupby('ITEM_ID').size().to_frame('_hist_len')
    ).fillna({'_hist_len': 0})
def _augment_item_hist ( item_df , event_df ) : return item_df . join ( event_df [ event_df [ '_holdout' ] == 0 ] . groupby ( 'ITEM_ID' ) . size ( ) . to_frame ( '_hist_len' ) ) . fillna ( { '_hist_len' : 0 } )
augment history inferred from training set
augment history inferred from training set
""" augment history inferred from training set """
item_df
event_df