资源介绍
推荐系统由基础算法到深度学习的应用参考
电影推荐系统
标签:Tensorflow,矩阵分解,惊喜,PySpark
1,用Tensorflow实现矩阵分解
1.1,定义one_batch模块
import numpy as np
import pandas as pd
def read_and_process ( filename , sep = '::' ):
col_names = [ 'user' , 'item' , 'rate' , 'timestamp' ]
df = pd . read_csv ( filename , sep = sep , header = None , names = col_names ,
engine = 'python' )
df [ 'user' ] -= 1
df [ '