To learn about statistical concepts for recommending top products for a customer based on purchase trends of all customers.
To recommend top 10 products by using 3 data points i.e customer_id, item_id and purchased.
Uses cosine_similarity and csr_matrix to find the similarity between customer's behavior and recommend the next relevant product that other customers have also purchased. The script can be used to recommend together bought items based on the customer's purchase in real-time.
Additional accommodations can be made based on different use cases.
import pandas as pd
import numpy as np
from scipy.sparse import csr_matrix
from sklearn.metrics.pairwise import cosine_similarity
Can work with any data set where we have purchased history of customers with the respective product or item IDs. Simply clone and run .py file with appropriate column names.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.