Code Monkey home page Code Monkey logo

Comments (2)

cwhsu-google avatar cwhsu-google commented on August 9, 2024

Thank you for using RecSim and sorry for the bug in the chocolate/kale example. The following is the correct version of generate_response(). As you can see we mess up kale_mean and choc_mean here but the code in https://github.com/google-research/recsim/blob/master/recsim/environments/long_term_satisfaction.py is correct.

def generate_response(self, doc, response):
response.clicked = True

linear interpolation between choc and kale.

engagement_loc = (doc.kaleness * self._user_state.kale_mean
+ (1 - doc.kaleness) * self._user_state.choc_mean)
engagement_loc *= self._user_state.satisfaction
engagement_scale = (doc.kaleness * self._user_state.kale_stddev
+ ((1 - doc.kaleness)
* self._user_state.choc_stddev))
log_engagement = np.random.normal(loc=engagement_loc,
scale=engagement_scale)
response.engagement = np.exp(log_engagement)

We will update the repository shortly. Let me know if you still have questions.

from recsim.

rmitsch avatar rmitsch commented on August 9, 2024

No, that's it. Thanks for your response!

from recsim.

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.