2018-12-10
阅读量:
689
推荐系统用python可视化导入
可视化导入:
import matplotlib.pyplot as plt
import seaborn as sns
sns.set_style('white')
%matplotlib inline
# plot graph of 'num of ratings column'
plt.figure(figsize =(10, 4))
ratings['num of ratings'].hist(bins = 70)
# plot graph of 'ratings' column
plt.figure(figsize =(10, 4))
ratings['rating'].hist(bins = 70)
# Sorting values according to
# the 'num of rating column'
moviemat = data.pivot_table(index ='user_id',
columns ='title', values ='rating')
moviemat.head()
ratings.sort_values('num of ratings', ascending = False).head(10)






评论(0)


暂无数据
推荐帖子
0条评论
0条评论
0条评论