<jupyter_start><jupyter_text>SettingsIn the three subsequent cells you find the numbers to reproduce Figures 1, 2, and 3. Run the cell of your choice and then continue below.<jupyter_code># Numbers for Figure 1

c = [50.0,]
b = [1.0,]
N = [1000,]
p = [0.01,]

# min max step formatting
minmaxstep = {
    'a': [1.0, 100.0, 1.0, '.0f'],
    'p': [0.005, 0.16, 0.005, '.3f'],
    'b': [0.5, 10.0, 0.5, '.1f'],
    'N': [100, 100000, 100, '.0f'],
}

# Numbers for Figure 2

c = [33.0, 33.0, 33.0, 33.0]
b = [6.0, 6.0, 1.0, 1.0]
N = [1413, 120154, 102208, 8693070]
p = [0.196, 0.029, 0.196, 0.029]

# min max step formatting
minmaxstep = {
    'a': [0.5, 100.0, 0.5, '.1f'],
    'p': [0.001, 0.2, 0.001, '.3f'],
    'b': [0.5, 10.0, 0.5, '.1f'],
    'N': [1000, 10000000, 1, '.0f'],
}

# Numbers for Figure 3

c = [33.0, 33.0, 33.0, 33.0]
b = [6.0, 6.0, 1.0, 1.0]
N = [221, 121346, 16005, 8779273]
p = [0.048, 0.0032, 0.048, 0.0032]

# min max step formatting
minmaxstep = {
    'a': [0.5, 100.0, 0.5, '.1f'],
    'p': [0.0002, 0.1, 0.0002, '.3f'],
    'b': [0.5, 10.0, 0.5, '.1f'],
    'N': [200, 10000000, 1, '.0f'],
}<jupyter_output><empty_output><jupyter_text>Interactive PlotThe next cell presents an interactive plot, depicting bounds, individual testing, binary splitting and the mixed 2SG & 1SG strategies.The points on the 2SG(...) curve are labeled by the respective strategy. E.g. `(0,21), (42,7), (0,0)` indicates that of the three subpopulations, the first is tested using 1SG(21), the second with 2SG(42,7) and the third is not tested at all.The 1SG strategy can be uncommented in [util.py](/edit/util.py).<jupyter_code>a = np.array(c)/np.array(b)

# starting parameters
params0 = {
    'a': a,
    'p': np.array(p),
    'b': np.array(b),
    'N': np.array(N),
}

ph = PlotHelper(params0)

n_subpop = len(params0['a'])
wgts = {}
for i in range(n_subpop):
    for k in params0.keys():
        slider_type = widgets.IntSlider if k == 'N' else widgets.FloatSlider
        wgts[f'{k}_{i!s}'] = slider_type(value=params0[k][i],
                                         min=minmaxstep[k][0],
                                         max=minmaxstep[k][1],
                                         step=minmaxstep[k][2],
                                         readout_format=minmaxstep[k][3]
                                        )
    
interact(ph.call, **wgts)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.188907422852377, 'fraction_numerical': 0.1213511259382819, 'mean_word_length': 2.4222539229671898, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 9, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '58805', 'license': 'MIT', 'n_tokens_mistral': 1138, 'n_tokens_neox': 952, 'n_words': 267, 'path': 'pooltesting_plot.ipynb', 'repo_name': 'g-pichler/group-testing', 'size': '2398'}