Git Product home page Git Product logo

Comments (1)

mdekstrand avatar mdekstrand commented on May 17, 2024

Everything seems to be working pretty well for algorithms that randomize some part of their training - we can provide a seed, and it works.

What isn't quite there is support for algorithms that randomize in their recommendations or predictions. Right now, randomization is unpredictable, particularly in the case of parallel batch recommendation.

To make algorithms with random recommendations reproducible, I propose to leverage NumPy's flexible SeedSequence. If the user instantiates Random with rng='user', then it will:

  • Spawn a child of the global seed sequence and save it for later use
  • For each recommendation request, spawn a child of that sequence with the user ID as the next element of the spawn key, and use it to initialize an RNG to randomize the recommendations

This will achieve two things:

  • Recommendations will be unpredictable per-user - by the time the user ID is mixed into the entropy, and the result used to seed a PRNG, the resulting bitstream is difficult to predict
  • The same initial seed and the same user ID will produce the same recommendation list, regardless of parallelism or subprocess computations.

Experiment designs that require multiple recommendation lists per user may have a problem. If @kluver or @KimuraTian (or anyone else) has thoughts here, would love to hear them before doing this.

from lkpy.

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.