热线电话:13121318867

登录
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)

61.1675
2
关注作者
收藏
评论(0)

发表评论

暂无数据
推荐帖子