Mercurial > hg > hybrid-music-recommender-using-content-based-and-social-information
diff Code/content_based.py @ 27:ae650489d3a8
Updated report
author | Paulo Chiliguano <p.e.chiilguano@se14.qmul.ac.uk> |
---|---|
date | Sun, 30 Aug 2015 15:49:27 +0100 |
parents | e4bcfe00abf4 |
children |
line wrap: on
line diff
--- a/Code/content_based.py Wed Aug 26 02:00:48 2015 +0100 +++ b/Code/content_based.py Sun Aug 30 15:49:27 2015 +0100 @@ -112,7 +112,7 @@ fn += 1 elif rating <= rating_threshold: tn += 1 - print tp, fp, fn, tn + #print tp, fp, fn, tn if tp != 0: precision = tp / (tp + fp) recall = tp / (tp + fn) @@ -138,7 +138,7 @@ topN = {} for user, song_rating in users_train[i].iteritems(): - topN[user] = top_n(sim_matrix, user, song_rating) + topN[user] = top_n(sim_matrix, user, song_rating, rating_threshold=2, N=20) elapsed_time = time.time() - start_time print 'Training execution time: %.3f seconds' % elapsed_time