def items_recommendation(): # Recommendations for Toby data = { 'recommendations': get_recommendations(CRITICS, 'Toby', sim_pearson), 'recommendations_evclid': get_recommendations(CRITICS, 'Toby', sim_distance), 'critics': CRITICS, 'film_names': FILM_NAMES } return render_to_template('recommendation_items.yammy', **data)
def items_suggestions(): movies = transform_prefs(CRITICS) matches = top_matches(movies, 'Superman Returns') recommended_critics = get_recommendations(movies, 'Superman Returns') data = { 'matches': matches, 'recommended_critics': recommended_critics } return render_to_template('recommendation_items_suggestions.yammy', **data)