Category : collaborative-filtering

Request Method: GET Request URL: http://127.0.0.1:8000/carreviews/recommendation/ Django Version: 2.0.2 Exception Type: ValueError Exception Value: Input contains NaN, infinity or a value too large for dtype(‘float32’). Here my views.py from django.shortcuts import get_object_or_404, render from .models import Review, Car from .form import ReviewForm from django.http import HttpResponseRedirect from django.urls import reverse, reverse_lazy from django.contrib.auth.models import User ..

Read more

I am working on a process for Clothing Recommendation System. Firstly, I got a problem with creating User Profiles. Does any body know about it def get_item_profile(item_id): idx = item_ids.index(item_id) item_profile = tfidf_matrix[idx:idx+1] return item_profile def get_item_profiles(ids): item_profiles_list = [get_item_profile(x) for x in ids] item_profiles = scipy.sparse.vstack(item_profiles_list) return item_profiles def build_users_profile(person_id, interactions_indexed_df): interactions_person_df = interactions_indexed_df.loc[person_id] ..

Read more

I’m having some trouble understanding how the Surprise workflow. I have a file for training (which I seek to split into training and validation), and a file for testing data. I’m having trouble understanding the difference between a Surprise Dataset and Trainset # Import data data_dir = ‘DIRECTORY_NAME’ reader = Reader(rating_scale=(1, 5)) # Create pandas ..

Read more

How can I use a full dataset as Trainset in surprise? I have found a past solution that I wish to use but I have issues when building the recommender system with surprise, let me explain my process. Loading my dataset: cols = [‘UserId’, ‘Product’,’Rating’] reader = Reader() datacolf = Dataset.load_from_df(datacf1[cols],reader) Then I have to ..

Read more