Git Product home page Git Product logo

sdae-recommendation's Introduction

SDAE-recommendation system


这是master branch, 另有个tfrecord的branch,里面有个'完整版'文件夹,是整理好的代码和说明。


Master branch

  • 运行 trainMLPrec.py,模型部分主要在MLPrec.py里面。即trainMLPrec.py->MLPrec.py.
  • *tfrecords的是使用tfrecords文件读取数据的相应代码。整体速度比使用placeholder+feed ndarry格式数据的形式快15%。
  • SDAE的协同过滤只实现了一层。运行train.py,可以训练,训练完一层后面就会报错。trian.py->SDAE.py->DAE.py的结构。

MLPrec网络结构:

  • 电影评分数据集,ml-100k
  • Users Net
    • 4层编码层,得到U,再接4层解码层,得到重建值。共8层。
    • 每层输入:上一层的特征+用户特征(side information,年龄、职业),+ 表示拼接。
      • 对第一层,“上一层特征”指该用户对各商品的评分。
    • 每层都是全连接层。wx+b -> batchnormalization -> sigmoid ->输出。
    • 这样sigmoid的输出是0-1的,decoder最后一层输出不加sigmoid
    • L2正则化,对各层w和b。
  • Items Net和UsersNet结构完全一样,得到V
    • 商品特征是电影流派
  • 用户年龄特征maxabs_rescale到0-1,用户职业和电影流派是one-hot编码。
  • 总loss: mse(R-UV), UsersNet重建误差,ItemsNet重建误差,正则项,||U||,||V||的加权和
    • mse是矩阵各元素误差平方的均值,只针对R有评分的项计算。(mask是sign(abs(x))取到的)
    • ||U||的定义文献没有明说,我是取得U各行(代表各用户)norm的均值。
  • 训练时候,每个batch读batch_size个用户和他们对应的batch_size个评分,用部分的side information和R去训练网络。

sdae-recommendation's People

Contributors

hello-world-zsp avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.