NicolasHug / Surprise

A Python scikit for building and analyzing recommender systems
http://surpriselib.com
BSD 3-Clause "New" or "Revised" License
6.34k stars 1.01k forks source link

AndreasK9 #402

Open AndreasK9 opened 2 years ago

AndreasK9 commented 2 years ago

Description

Hello Nicolas,

i work with your library for an introductory course in Data Science. Problem is, that i can not get any valid results with the KNN-Prediction Algorithms. Every time i run these Algorithms the mean is calculated. I have created my own Dataset. Sorry to get in contact but i am desperate. With using SVD or SVDpp i get predictions for the users.

Regards, Andreas

Steps/Code to Reproduce

reader = Reader(rating_scale=(0,100)) data = Dataset.load_from_df(df2[['bon',"hauptgruppe","anzahl"]].astype(str), reader) trainset = data.build_full_trainset()

algo = KNNBasic() algo.fit(trainset)

pred1=algo.predict(str(0),str(0)) print (pred1)

User and item are existing: grafik grafik

Expected Results

That the user and the item will be identified and a prediction can be made, like in the examples.

Actual Results

grafik

Versions