Domanda

I'm looking for a library I can use to match my users to other Django models based on answers to questions-- also my own django model.

So I'd like something customizable, with good documentation/support, and hopefully not too hard to implement!

Does anyone have any good recommendations? I've looked over Crab and Django-recommender, but neither seem to be very well documented.

basically what I have is two survey applications, with corresponding, but not identical, questions and answers. E.g. a question in app1 could be "how many nights a week do you drink?" and a question in app2 could be "how many nights a week do you expect to drink?", with a foreign key to the first question in the instance. I want to take the responses to these questions and use them to pair users from each set with each other, to give the users in group 2 recommendations based on what the users in group 1 already use.

È stato utile?

Soluzione

They covered this subject in the free Stanford ML class. Check the videos for chapter XVI at http://www.ml-class.org/course/video/preview_list

Although the implementation discussed is Matlab/Octave it should be not difficult to implement in Python, even easier if you are using Numpy

Altri suggerimenti

There are some good books out there on the subject of social media combined with Python.

A very flexible solution that works in any coding language (including Python) is the Abracadabra Recommender API.

Basically it is a Recommender Algorithms as a Service library. The setup is very straightforward: you only need to send HTTP calls (which you can do with Django) to the API endpoint url to train your model and to receive recommendations. View the docs how.

With the Abracadabra Recommender API, when using Python, you first add data to your model:

# These code snippets use an open-source library. http://unirest.io/python
response = unirest.post("https://noodlio-abracadabra-recommender-systems-v1.p.mashape.com/add/subjects?recommenderId=rec1&subjectId=See+docs",
  headers={
    "X-Mashape-Key": "<required>",
    "Accept": "application/json",
    "Content-Type": "application/json"
  }
)

Then you train the model by rating or liking subjects (for instance movies):

# These code snippets use an open-source library. http://unirest.io/python
response = unirest.post("https://noodlio-abracadabra-recommender-systems-v1.p.mashape.com/rate/subject?recommenderId=rec1&subjectId=gameofthrones&subjectWeight=10&userId=user1",
  headers={
    "X-Mashape-Key": "<required>",
    "Accept": "application/json",
    "Content-Type": "application/json"
  }
)

Once done, then you receive recommendations based on Content-Based, Collaborative or Hybrid filtering as follows:

# These code snippets use an open-source library. http://unirest.io/python
response = unirest.post("https://noodlio-abracadabra-recommender-systems-v1.p.mashape.com/recommend?method=content&recommenderId=rec1&userId=user1",
  headers={
    "X-Mashape-Key": "<required>",
    "Accept": "application/json",
    "Content-Type": "application/json"
  }
)

You can view more example in other languages, including Angular, React, Javascript, NodeJS, Curl, Java, Python, Objective-C, Ruby, .NET... on the API homepage.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top