Reputation: 11
I am new to Apache Mahout recommender. The use case involves providing suggestions to users based on their purchase history. I am planning to use the following information :
To identify users with similar purchase pattern/time of purchase and give them more preference, do I have to make custom data model for every user? I was planning to import from the database periodically to recreate the data model. Is there a way to dynamically give preference like mentioned below:
Currently I am using the sample code provided. (A lot of modifications are needed)
UserSimilarity similarity = new PearsonCorrelationSimilarity(model);
UserNeighborhood neighborhood = new ThresholdUserNeighborhood(0.1, similarity, model);
UserBasedRecommender recommender = new GenericUserBasedRecommender(model, neighborhood, similarity);
List<RecommendedItem> recommendations = recommender.recommend(74, 10);
Upvotes: 1
Views: 184
Reputation: 658
In general, to achieve what you are sugguesting you need to do a step on your data where you add a feature like t_since_last_purchase
which in an integer 0 -> inf. E.g. days since last purchase.
This feature, time, will be another user feature which is correlated.
I think you are looking at some of the older Map-Reduce based reccomenders- which are in fact first class- but given your use case, you might want to check out coorelated cooccurence based reccomenders which have a significant benefit of being able to look at multiple activities of the user (in your case, location, previous purchases, time).
Upvotes: 1