Giter VIP home page Giter VIP logo

Comments (4)

albietz avatar albietz commented on September 28, 2024

Hi, the function loss just gives you the loss for a given triplet, which in this case is given by the negative log-likelihood according to the BPR model. What you're showing in the image corresponds to gradient updates, which you can find in the BPREngine::update function (see https://github.com/quora/qmf/blob/master/qmf/bpr/BPREngine.cpp#L178).

Hope this helps,
Alberto

from qmf.

jackyhawk avatar jackyhawk commented on September 28, 2024

Thanks very much Alberto.

And I just made a mistake, what i want to say is the lossderitive in the training presss,which is
https://github.com/quora/qmf/blob/master/qmf/bpr/BPREngine.cpp#L243
https://github.com/quora/qmf/blob/master/qmf/bpr/BPREngine.cpp#L183

just as you mentioned in the update function.

however the lossDerivative is not the same as the highlight part in the picture:

http://photo27.hexun.com/p/2019/0201/632421/b_vip_11118BF2E45A1C8033DC6DA3576F7A2C.jpg

i wonder whether we should use this expression:

1.0 / (1.0 + exp(scoreDifference))

or this expression:
exp(-scoreDifference) / (1.0 + exp(-scoreDifference)); (and it is the same as: e^(-Xuij) / (1+ e ^(-Xuij) ) )

to calculate the loss deritive?

from qmf.

albietz avatar albietz commented on September 28, 2024

Those two expressions are in fact equal :)

from qmf.

jackyhawk avatar jackyhawk commented on September 28, 2024

Got it, Thanks very much Alberto.

from qmf.

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.