text_html_output_1.png text_plain_output_1.png
from surprise import KNNBasic, KNNWithMeans, KNNWithZScore

algoritmo = KNNBasic(k=50, sim_options={'name': 'pearson', 'user_based': True, 'verbose': True})

algoritmo.fit(trainset)