Code Monkey home page Code Monkey logo

Comments (3)

guoguibing avatar guoguibing commented on July 20, 2024

Thanks for your feedback.

After checking the code and the original paper, the code below

DenseVector pu = P.row(u);
double rui = trainMatrix.get(u, i);
DenseMatrix pp = pu.outer(pu);
sum_cpp = sum_cpp.add(pp);

says sum_cpp is the sum of p_u p_u^t, i.e., the \bar{A} in the paper. Since \bar{A} is not dependent on r_ui, I don't know why you suggest to put it in the if condition.

What do you think?

from librec.

rkempter avatar rkempter commented on July 20, 2024

Sorry, didn't see that you responded!

It is written in the paper that \bar{A} = P_{U_i}.dot(P_{U_i}.T), the U_i means only all users that gave a rating to item i. Therefore, only if r_ui is larger than 0, meaning that we have a rating, we should add them to \bar{A}. Otherwise, you could precompute \bar{A} and don't need to do it in every item step. I added below the important section of the algorithm as an image. Hope my explanation helps.

screen shot 2015-04-27 at 12 41 06

from librec.

guoguibing avatar guoguibing commented on July 20, 2024

@466152112 @wubin7019088 what do you think?

from librec.

Related Issues (20)

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.