in [ ] = #initialize sample user rating matrix urm data_sparse max_pid urm shape[ max_uid urm shape[ #compute svd of the input user ratings matrix usvt compute_svd(urmkutest [ #get estimated rating for test user print("predicted ratings:"utest_recommended_items compute_estimated_matrix(urmusvtutestktruefor user in utestprint("recommendation for user with user id {}format(user)rank_value for in utest_recommended_items[user, : ]song_details small_set[small_set so_index_value =idrop_duplicates('so_index_ value')[['title','artist_name']print("the number {recommended song is {by {}format(rank_valuelist(song_ details['title'])[ ],list(song_details['artist_name'])[ ])rank_value+= the recommendations made by the matrix factorization based system are also shown in figure - if you refer to the jupyter notebook for the codeyou will observe that the user with id is the same one for whom we performed the item similarity based recommendations earlier refer to the notebook for further details on how the different functions we used earlier have been implemented and used for our recommendationsnote how the recommendations have changed from the previous two systems it looks like this user might like listening to some coldplay and radioheaddefinitely interestingfigure - recommendation using the matrix factorization based recommender we used one of the simplest matrix factorization algorithms for our use caseyou can try to find out other more sophisticated implementation of the matrix factorization routinewhich will lead to different recommendation system another topic which we have ignored bit is the conversion of song play count into measure of "implicit feedbackthe system that we chose is acceptable but is far from perfect there is lot of literature that discusses the handling of this issue we encourage you to find different ways of handling it and experiment with various measures