commerce-recommender / src /popularity_model.py
“vineetha00”
Initial commit: E-commerce recommender system using SVD
1849db4
raw
history blame contribute delete
160 Bytes
def get_top_n_popular_items(df, n=10):
top = df['product_id'].value_counts().head(n).reset_index()
top.columns = ['product_id', 'count']
return top