---

title: AB Test Agents


keywords: fastai
sidebar: home_sidebar

summary: "RL Agents to Take actions in A/B Test Environments."
description: "RL Agents to Take actions in A/B Test Environments."
nb_path: "nbs/rl/agents/ab_test_agent.ipynb"
---
<!--

#################################################
### THIS FILE WAS AUTOGENERATED! DO NOT EDIT! ###
#################################################
# file to edit: nbs/rl/agents/ab_test_agent.ipynb
# command to build the docs after a change: nbdev_build_docs

-->

<div class="container" id="notebook-container">
        
    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h2 id="ABTestRunner" class="doc_header"><code>class</code> <code>ABTestRunner</code><a href="https://github.com/RecoHut-Projects/recohut/tree/master/recohut/rl/agents/ab_test_agent.py#L12" class="source_link" style="float:right">[source]</a></h2><blockquote><p><code>ABTestRunner</code>(<strong><code>bandit_returns</code></strong>:<code>List</code>[<code>float</code>], <strong><code>batch_size</code></strong>:<code>int</code>=<em><code>1000</code></em>, <strong><code>batches</code></strong>:<code>int</code>=<em><code>10</code></em>, <strong><code>simulations</code></strong>:<code>int</code>=<em><code>100</code></em>)</p>
</blockquote>
<p>Class that is used to run simulations of split tests.</p>
<p>Attributes:
    bandit_returns: List of average returns per bandit.
    batch_size: Number of examples per batch.
    batches: Number of batches.
    simulations: Number of simulations.</p>
<p>Methods:
    init_bandits: Prepares everything for new simulation.
    run: Runs the simulations and tracks performance.</p>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<blockquote><p>References:1. <a href="https://nbviewer.org/github/sparsh-ai/stanza/blob/S543002/2021-06-19-methods-for-effective-online-testing.ipynb">https://nbviewer.org/github/sparsh-ai/stanza/blob/S543002/2021-06-19-methods-for-effective-online-testing.ipynb</a></p>
</blockquote>

</div>
</div>
</div>
</div>
 

