Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

manage.py command for populating recommended products #20

Closed
codeinthehole opened this issue Apr 12, 2011 · 5 comments
Closed

manage.py command for populating recommended products #20

codeinthehole opened this issue Apr 12, 2011 · 5 comments

Comments

@codeinthehole
Copy link
Contributor

Write a manage.py command that populates the product recommendation models
based on the data within order history. Just follow the rules for "customers who
bought x, bought y"

Create a service that takes in a basket, and returns the a set of recommended products

@AndrewIngram
Copy link
Contributor

Is pre-populating the data necessary? The database queries involved don't seem especially complicated or slow, but then I haven't tried this before on large datasets (ie millions of order line rows).

On the flip-side, keeping the ProductRecommendation model will work for more advanced recommendation algorithms too.

@codeinthehole
Copy link
Contributor Author

I think it is worth doing this in a batch job as we have some projects lined up with millions of products, and I'd like to keep this fast. We also have projects where these recommendations come from another source, and so it makes sense to store the relationships in a standard structure.

Having said that, it would still be useful to write a simple extension to the basket page that does the queries at runtime. The same query logic would be needed for the batch job, so it's a valuable exercise. It's worth starting with that and then extending it to populate the recommendation tables.

@john-parton
Copy link
Contributor

I will be implementing this feature in an upcoming project, does anyone have a partially working implementation?

@john-parton
Copy link
Contributor

For anyone reading this, I ended up using elastic's "more like this" functionality to dynamically generate recommended products. The overall fidelity of recommendations might be less than manually specified products, but the dramatic reduction in data entry burden was considered a reasonable trade off for my application.

@sasha0
Copy link
Member

sasha0 commented May 8, 2017

I believe within just simple lookup in the order history we can't get relevant products, because customers often buy unrelated products in the same order.

To get list of similar products, we'll have to design quite more complex algorithm, which is potential topic for the new issue we'd create once we get to implement this.

@sasha0 sasha0 closed this as completed May 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants