How to use the planout.Ops function in planout

To help you get started, we’ve selected a few planout examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github YahooArchive / mendel / examples / planout-example / PlanoutAssignment.js View on Github external
assign(params, args) {
        /*
        Planout uses deterministic hashing to choose assignments. This assures
        that the same visitorId will always get the same selection. In addition to
        the visitorId, Planout concatenates the params name ('layer_1' or 'layer_2')
        with the visitorId to assure that selections are not correlated across params.
        */
        params.set('layer_1', new Planout.Ops.Random.UniformChoice({
                choices: [
                    false, // if selected will show base
                    "layer_1_bucket_A",
                    "layer_1_bucket_B"
                ],
                unit: args.visitorId
            })
        );
        params.set('layer_2', new Planout.Ops.Random.UniformChoice({
                choices:  [
                    false, // if selected will show base
                    "layer_2_bucket_A",
                    "layer_2_bucket_B",
                    "layer_2_bucket_C"
                ],
                unit: args.visitorId
github YahooArchive / mendel / examples / planout-example / PlanoutAssignment.js View on Github external
/*
        Planout uses deterministic hashing to choose assignments. This assures
        that the same visitorId will always get the same selection. In addition to
        the visitorId, Planout concatenates the params name ('layer_1' or 'layer_2')
        with the visitorId to assure that selections are not correlated across params.
        */
        params.set('layer_1', new Planout.Ops.Random.UniformChoice({
                choices: [
                    false, // if selected will show base
                    "layer_1_bucket_A",
                    "layer_1_bucket_B"
                ],
                unit: args.visitorId
            })
        );
        params.set('layer_2', new Planout.Ops.Random.UniformChoice({
                choices:  [
                    false, // if selected will show base
                    "layer_2_bucket_A",
                    "layer_2_bucket_B",
                    "layer_2_bucket_C"
                ],
                unit: args.visitorId
            })
        );
    }
github rawls238 / react-experiments / __tests__ / utils / experimentUtils.js View on Github external
assign(params, args) {
    params.set('foo',
      new planout.Ops.Random.UniformChoice({
        'choices': ['Variation A', 'Variation B'],
        'unit': args.id
      })
    );

    params.set('test2',
      new planout.Ops.Random.UniformChoice({
        'choices': ['Num1', 'Num2'],
        'unit': args.id
      })
    );
  }
github rawls238 / react-experiments / __tests__ / utils / experimentUtils.js View on Github external
assign(params, args) {
    params.set('foo',
      new planout.Ops.Random.UniformChoice({
        'choices': ['Variation A', 'Variation B'],
        'unit': args.id
      })
    );

    params.set('test2',
      new planout.Ops.Random.UniformChoice({
        'choices': ['Num1', 'Num2'],
        'unit': args.id
      })
    );
  }
github facebook / planout / alpha / js / examples / experiment_verification.js View on Github external
experiment.assign = function(params, args) {
    params.set('group_size', new planout.Ops.Random.UniformChoice({ 'choices': [1, 10], 'unit': args.userid}));
    params.set('specific_goal', new planout.Ops.Random.BernoulliTrial({'p': 0.8, 'unit': args.userid}));
    if (params.get('specific_goal')) {
      params.set('ratings_per_user_goal', new planout.Ops.Random.UniformChoice({ 'choices': [8, 16, 32, 64], 'unit': args.userid}));
      params.set('ratings_goal', params.get('group_size') * params.get('ratings_per_user_goal'));
    }
  };
  experiment.configure_logger = function() { return; }
github facebook / planout / alpha / js / examples / sample_planout_es5.js View on Github external
assign: function(params, args) {
    params.set('foo', new planout.Ops.Random.UniformChoice({ 'choices': ['Variation A', 'Variation B'], 'unit': args.id }));
  },
  configure_logger: function() {
github facebook / planout / alpha / js / examples / experiment_verification.js View on Github external
experiment.assign = function(params, args) {
    params.set('group_size', new planout.Ops.Random.UniformChoice({ 'choices': [1, 10], 'unit': args.userid}));
    params.set('specific_goal', new planout.Ops.Random.BernoulliTrial({'p': 0.8, 'unit': args.userid}));
    if (params.get('specific_goal')) {
      params.set('ratings_per_user_goal', new planout.Ops.Random.UniformChoice({ 'choices': [8, 16, 32, 64], 'unit': args.userid}));
      params.set('ratings_goal', params.get('group_size') * params.get('ratings_per_user_goal'));
    }
  };
  experiment.configure_logger = function() { return; }

planout

PlanOut is a framework and programming language for online field experimentation

MIT
Latest version published 3 years ago

Package Health Score

54 / 100
Full package analysis