BT

New Early adopter or innovator? InfoQ has been working on some new features for you. Learn more

Facebook Open-Sources PlanOut, a Framework for Online Field Experiments

| by Sergio De Simone Follow 5 Followers on Apr 25, 2014. Estimated reading time: 2 minutes |

PlanOut is Facebook's language for online field experiments supporting "A/B tests," factorial designs, as well as more complex experiments. According to Facebook, PlanOut makes possible to separate experimental design from application code and allows experimenters to concisely describe their designs.

PlanOut is implemented through an open source Python-based framework available on GitHub. Its main ability is providing randomized values for parameters that control an online service so that experimenters do not need to use constants to manage UI or feature alternatives and just let PlanOut determine the values of those parameters.

The PlanOut framework includes:

  • Extensible Python classes for defining experiments that make it easy to implement randomized assignments, and automatically log important data.
  • A system for managing multiple mutually exclusive experiments, including follow-on experiments.
  • A reference implementation of the PlanOut interpreter, which lets you serialize, store, and execute experiment definitions.
  • A compiler that transforms the PlanOut domain specific language into serialized PlanOut code.

An example of experiment provided on PlanOut's GitHub page is:

class MyExperiment(SimpleExperiment):
  def assign(self, params, userid):
    params.button_color = UniformChoice(choices=['#ff0000', '#00ff00'],
      unit=userid)
    params.button_text = UniformChoice(choices=['I voted', 'I am a voter'],
      unit=userid)

The objective of a PlanOut experiment is describing how units, e.g. users, should get mapped to service parameters. In the example given above, a button's color and text are uniformly randomized across users.

Once an experiment is defined, it can be queried from the application code to find out what values should be used for the current user:

my_exp = MyExperiment(userid=42)
color = my_exp.get('button_color')
text = my_exp.get('button_text')

The framework ensures that values are correctly randomized and that each unit (in the example, the userid) will always map onto the same parameter values.

An additional advantage of using PlanOut is that as soon as an experiment parameters are accessed, the relevant data required to analyze the experiment are automatically logged.

PlanOut also addresses the need of running multiple experiments on the same parameters through parameter namespaces. Namespaces allow running experiments both sequentially, as in iterative testing, or in parallel, as when different teams are experimenting with the same aspects of the service.

Facebook claims to be using PlanOut to run over a thousand experiments each day that involve hundreds of millions of people, although they are using a different implementation of the language written in Hack.

Online field experiments are an approach to testing design alternatives, better attribute outcomes to causes, and estimate effects that help decision makers understand how people react to changes and use their services.

You can also check InfoQ "A/B testing" section for more great content about online field experiments.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Java? by Aravind Yarram

Is there a Java equivalent available?

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

1 Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT