Recommendation systems
This function will use the parameters set at the beginning of the views.py
file:
nminimumrates=5 numrecs=5 recmethod = 'loglikelihood'
This defines the minimum number of movies to rate before obtaining recommendations, the number of recommendations to show to the user, and the recommendation system method respectively. To show recommendations the user can click on the Recommendations button on the top bar:
This action will trigger the movies_recs
function in the views.py
file (through the corresponding URL defined in the urls.py
file):
def movies_recs(request): userprofile = None if request.user.is_superuser: return render_to_response( 'books_recsys_app/superusersignin.html', RequestContext(request)) elif request.user.is_authenticated(): userprofile = UserProfile.objects.get(user=request.user) else: return render_to_response( 'books_recsys_app/pleasesignin.html', RequestContext(request)) ratedmovies...