{
"cells": [
{
"cell_type": "markdown",
"id": "b33d3cbc",
"metadata": {
"code_folding": [],
"hidden_ranges": [],
"originalKey": "bbfd01ea-97cb-4830-ab6d-60236151a3cd",
"papermill": {
"duration": 0.003076,
"end_time": "2024-05-02T22:27:32.802472",
"exception": false,
"start_time": "2024-05-02T22:27:32.799396",
"status": "completed"
},
"showInput": false,
"tags": []
},
"source": [
"# Multi-task Bayesian Optimization\n",
"\n",
"This tutorial uses synthetic functions to illustrate Bayesian optimization using a multi-task Gaussian Process in Ax. A typical use case is optimizing an expensive-to-evaluate (online) system with supporting (offline) simulations of that system.\n",
"\n",
"Bayesian optimization with a multi-task kernel (Multi-task Bayesian optimization) is described by Swersky et al. (2013). Letham and Bakshy (2019) describe using multi-task Bayesian optimization to tune a ranking system with a mix of online and offline (simulator) experiments.\n",
"\n",
"This tutorial produces the results of Online Appendix 2 from [that paper](https://arxiv.org/pdf/1904.01049.pdf).\n",
"\n",
"The synthetic problem used here is to maximize the Hartmann 6 function, a classic optimization test problem in 6 dimensions. The objective is treated as unknown and are modeled with separate GPs. The objective is noisy.\n",
"\n",
"Throughout the optimization we can make nosiy observations directly of the objective (an online observation), and we can make noisy observations of a biased version of the objective (offline observations). Bias is simulated by passing the function values through a piecewise linear function. Offline observations are much less time-consuming than online observations, so we wish to use them to improve our ability to optimize the online objective."
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "ce21ddaf",
"metadata": {
"code_folding": [],
"execution": {
"iopub.execute_input": "2024-05-02T22:27:32.809834Z",
"iopub.status.busy": "2024-05-02T22:27:32.809561Z",
"iopub.status.idle": "2024-05-02T22:27:35.985729Z",
"shell.execute_reply": "2024-05-02T22:27:35.984977Z"
},
"hidden_ranges": [],
"originalKey": "3ce827be-d20b-48d3-a6ff-291bd442c748",
"papermill": {
"duration": 3.194117,
"end_time": "2024-05-02T22:27:35.999505",
"exception": false,
"start_time": "2024-05-02T22:27:32.805388",
"status": "completed"
},
"tags": [],
"vscode": {
"languageId": "python"
}
},
"outputs": [
{
"data": {
"text/html": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"[INFO 05-02 22:27:35] ax.utils.notebook.plotting: Injecting Plotly library into cell. Do not overwrite or delete cell.\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"[INFO 05-02 22:27:35] ax.utils.notebook.plotting: Please see\n",
" (https://ax.dev/tutorials/visualizations.html#Fix-for-plots-that-are-not-rendering)\n",
" if visualizations are not rendering.\n"
]
},
{
"data": {
"text/html": [
" \n",
" "
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import os\n",
"import time\n",
"\n",
"from copy import deepcopy\n",
"from typing import Optional\n",
"\n",
"import numpy as np\n",
"\n",
"import torch\n",
"\n",
"from ax.core.data import Data\n",
"from ax.core.experiment import Experiment\n",
"from ax.core.generator_run import GeneratorRun\n",
"from ax.core.multi_type_experiment import MultiTypeExperiment\n",
"from ax.core.objective import Objective\n",
"from ax.core.observation import ObservationFeatures, observations_from_data\n",
"from ax.core.optimization_config import OptimizationConfig\n",
"from ax.core.parameter import ParameterType, RangeParameter\n",
"from ax.core.search_space import SearchSpace\n",
"from ax.metrics.hartmann6 import Hartmann6Metric\n",
"from ax.modelbridge.factory import get_sobol\n",
"from ax.modelbridge.registry import Models, MT_MTGP_trans, ST_MTGP_trans\n",
"from ax.modelbridge.torch import TorchModelBridge\n",
"from ax.modelbridge.transforms.convert_metric_names import tconfig_from_mt_experiment\n",
"from ax.plot.diagnostic import interact_batch_comparison\n",
"from ax.runners.synthetic import SyntheticRunner\n",
"from ax.utils.common.typeutils import checked_cast\n",
"from ax.utils.notebook.plotting import init_notebook_plotting, render\n",
"\n",
"init_notebook_plotting()"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "e2ec274f",
"metadata": {
"execution": {
"iopub.execute_input": "2024-05-02T22:27:36.066542Z",
"iopub.status.busy": "2024-05-02T22:27:36.066075Z",
"iopub.status.idle": "2024-05-02T22:27:36.069525Z",
"shell.execute_reply": "2024-05-02T22:27:36.068860Z"
},
"papermill": {
"duration": 0.038216,
"end_time": "2024-05-02T22:27:36.070850",
"exception": false,
"start_time": "2024-05-02T22:27:36.032634",
"status": "completed"
},
"tags": [],
"vscode": {
"languageId": "python"
}
},
"outputs": [],
"source": [
"SMOKE_TEST = os.environ.get(\"SMOKE_TEST\")"
]
},
{
"cell_type": "markdown",
"id": "627f75a0",
"metadata": {
"code_folding": [],
"hidden_ranges": [],
"originalKey": "76100312-e604-46ed-a123-9b0296ced6ff",
"papermill": {
"duration": 0.031989,
"end_time": "2024-05-02T22:27:36.134814",
"exception": false,
"start_time": "2024-05-02T22:27:36.102825",
"status": "completed"
},
"showInput": false,
"tags": []
},
"source": [
"## 1. Define Metric classes\n",
"For this example, the online system is optimizing a Hartmann6 function. The Metric objects for these are directly imported above. We create analagous offline versions of this metrics which are identical but have a transform applied (a piecewise linear function). We construct Metric objects for each of them."
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "30da249e",
"metadata": {
"code_folding": [],
"execution": {
"iopub.execute_input": "2024-05-02T22:27:36.201500Z",
"iopub.status.busy": "2024-05-02T22:27:36.200849Z",
"iopub.status.idle": "2024-05-02T22:27:36.205227Z",
"shell.execute_reply": "2024-05-02T22:27:36.204677Z"
},
"hidden_ranges": [],
"originalKey": "2315ca64-74e5-4084-829e-e8a482c653e5",
"papermill": {
"duration": 0.03955,
"end_time": "2024-05-02T22:27:36.206527",
"exception": false,
"start_time": "2024-05-02T22:27:36.166977",
"status": "completed"
},
"tags": [],
"vscode": {
"languageId": "python"
}
},
"outputs": [],
"source": [
"# Create metric with artificial offline bias, for the objective\n",
"# by passing the true values through a piecewise linear function.\n",
"\n",
"\n",
"class OfflineHartmann6Metric(Hartmann6Metric):\n",
" def f(self, x: np.ndarray) -> float:\n",
" raw_res = super().f(x)\n",
" m = -0.35\n",
" if raw_res < m:\n",
" return (1.5 * (raw_res - m)) + m\n",
" else:\n",
" return (6.0 * (raw_res - m)) + m"
]
},
{
"cell_type": "markdown",
"id": "2a6dd13f",
"metadata": {
"originalKey": "b0e2089f-a7a3-4a8b-b8b3-ab6d75ca7f09",
"papermill": {
"duration": 0.032225,
"end_time": "2024-05-02T22:27:36.270828",
"exception": false,
"start_time": "2024-05-02T22:27:36.238603",
"status": "completed"
},
"showInput": false,
"tags": []
},
"source": [
"## 2. Create experiment\n",
"\n",
"A MultiTypeExperiment is used for managing online and offline trials together. It is constructed in several steps:\n",
"\n",
"1. Create the search space - This is done in the usual way.\n",
"2. Specify optimization config - Also done in the usual way.\n",
"3. Initialize Experiment - In addition to the search_space and optimization_config, specify that \"online\" is the default trial_type. This is the main trial type for which we're optimizing. Optimization metrics are defined to be for this type and new trials assume this trial type by default.\n",
"4. Establish offline trial_type - Register the \"offline\" trial type and specify how to deploy trials of this type.\n",
"5. Add offline metrics - Create the offline metrics and add them to the experiment. When adding the metrics, we need to specify the trial type (\"offline\") and online metric name it is associated with so the model can link them.\n",
"\n",
"Finally, because this is a synthetic benchmark problem where the true function values are known, we will also register metrics with the true (noiseless) function values for plotting below."
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "759ac4d9",
"metadata": {
"code_folding": [],
"execution": {
"iopub.execute_input": "2024-05-02T22:27:36.336839Z",
"iopub.status.busy": "2024-05-02T22:27:36.336272Z",
"iopub.status.idle": "2024-05-02T22:27:36.342450Z",
"shell.execute_reply": "2024-05-02T22:27:36.341897Z"
},
"hidden_ranges": [],
"originalKey": "39504f84-793e-4dae-ae55-068f1b762706",
"papermill": {
"duration": 0.040734,
"end_time": "2024-05-02T22:27:36.343762",
"exception": false,
"start_time": "2024-05-02T22:27:36.303028",
"status": "completed"
},
"tags": [],
"vscode": {
"languageId": "python"
}
},
"outputs": [],
"source": [
"def get_experiment(include_true_metric=True):\n",
" noise_sd = 0.1 # Observations will have this much Normal noise added to them\n",
"\n",
" # 1. Create simple search space for [0,1]^d, d=6\n",
" param_names = [f\"x{i}\" for i in range(6)]\n",
" parameters = [\n",
" RangeParameter(\n",
" name=param_names[i],\n",
" parameter_type=ParameterType.FLOAT,\n",
" lower=0.0,\n",
" upper=1.0,\n",
" )\n",
" for i in range(6)\n",
" ]\n",
" search_space = SearchSpace(parameters=parameters)\n",
"\n",
" # 2. Specify optimization config\n",
" online_objective = Hartmann6Metric(\n",
" \"objective\", param_names=param_names, noise_sd=noise_sd\n",
" )\n",
" opt_config = OptimizationConfig(\n",
" objective=Objective(online_objective, minimize=True)\n",
" )\n",
"\n",
" # 3. Init experiment\n",
" exp = MultiTypeExperiment(\n",
" name=\"mt_exp\",\n",
" search_space=search_space,\n",
" default_trial_type=\"online\",\n",
" default_runner=SyntheticRunner(),\n",
" optimization_config=opt_config,\n",
" )\n",
"\n",
" # 4. Establish offline trial_type, and how those trials are deployed\n",
" exp.add_trial_type(\"offline\", SyntheticRunner())\n",
"\n",
" # 5. Add offline metrics that provide biased estimates of the online metrics\n",
" offline_objective = OfflineHartmann6Metric(\n",
" \"offline_objective\", param_names=param_names, noise_sd=noise_sd\n",
" )\n",
" # Associate each offline metric with corresponding online metric\n",
" exp.add_tracking_metric(\n",
" metric=offline_objective, trial_type=\"offline\", canonical_name=\"objective\"\n",
" )\n",
"\n",
" return exp"
]
},
{
"cell_type": "markdown",
"id": "d3e015da",
"metadata": {
"code_folding": [],
"hidden_ranges": [],
"originalKey": "5a00218e-c27d-4d6f-bef0-3e562217533a",
"papermill": {
"duration": 0.032476,
"end_time": "2024-05-02T22:27:36.408359",
"exception": false,
"start_time": "2024-05-02T22:27:36.375883",
"status": "completed"
},
"showInput": false,
"tags": []
},
"source": [
"## 3. Vizualize the simulator bias\n",
"\n",
"These figures compare the online measurements to the offline measurements on a random set of points, for the objective metric. You can see the offline measurements are biased but highly correlated. This produces Fig. S3 from the paper."
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "1c436156",
"metadata": {
"execution": {
"iopub.execute_input": "2024-05-02T22:27:36.475360Z",
"iopub.status.busy": "2024-05-02T22:27:36.474857Z",
"iopub.status.idle": "2024-05-02T22:27:36.849894Z",
"shell.execute_reply": "2024-05-02T22:27:36.849182Z"
},
"originalKey": "8260b668-91ef-404e-aa8c-4bf43f6a5660",
"papermill": {
"duration": 0.410466,
"end_time": "2024-05-02T22:27:36.851687",
"exception": false,
"start_time": "2024-05-02T22:27:36.441221",
"status": "completed"
},
"tags": [],
"vscode": {
"languageId": "python"
}
},
"outputs": [
{
"data": {
"application/vnd.plotly.v1+json": {
"config": {
"linkText": "Export to plot.ly",
"plotlyServerURL": "https://plot.ly",
"showLink": false
},
"data": [
{
"hoverinfo": "none",
"line": {
"color": "black",
"dash": "dot",
"width": 2
},
"mode": "lines",
"showlegend": false,
"type": "scatter",
"visible": true,
"x": [
-3.1211418784524083,
2.402447351729291
],
"y": [
-3.1211418784524083,
2.402447351729291
]
},
{
"error_x": {
"array": [
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196
],
"color": "rgba(128,177,211,0.4)",
"type": "data"
},
"error_y": {
"array": [
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196,
0.196
],
"color": "rgba(128,177,211,0.4)",
"type": "data"
},
"hoverinfo": "text",
"marker": {
"color": "rgba(128,177,211,1)"
},
"mode": "markers",
"name": "In-sample",
"showlegend": true,
"text": [
"Arm 0_0
Batch 1: 1.771 [1.575, 1.967]
Batch 0: -0.251 [-0.447, -0.055]
Parameterization:
x0: 0.0
x1: 0.0
x2: 0.0
x3: 0.0
x4: 0.0
x5: 0.0",
"Arm 0_1
Batch 1: -0.618 [-0.814, -0.422]
Batch 0: -0.557 [-0.753, -0.361]
Parameterization:
x0: 0.5
x1: 0.5
x2: 0.5
x3: 0.5
x4: 0.5
x5: 0.5",
"Arm 0_2
Batch 1: 1.545 [1.349, 1.741]
Batch 0: -0.103 [-0.299, 0.093]
Parameterization:
x0: 0.75
x1: 0.25
x2: 0.25
x3: 0.25
x4: 0.75
x5: 0.75",
"Arm 0_3
Batch 1: -1.12 [-1.316, -0.924]
Batch 0: -0.85 [-1.046, -0.654]
Parameterization:
x0: 0.25
x1: 0.75
x2: 0.75
x3: 0.75
x4: 0.25
x5: 0.25",
"Arm 0_4
Batch 1: 0.862 [0.666, 1.058]
Batch 0: -0.007 [-0.203, 0.189]
Parameterization:
x0: 0.375
x1: 0.375
x2: 0.625
x3: 0.875
x4: 0.375
x5: 0.125",
"Arm 0_5
Batch 1: 1.889 [1.693, 2.085]
Batch 0: 0.047 [-0.149, 0.243]
Parameterization:
x0: 0.875
x1: 0.875
x2: 0.125
x3: 0.375
x4: 0.875
x5: 0.625",
"Arm 0_6
Batch 1: 1.032 [0.836, 1.228]
Batch 0: -0.204 [-0.400, -0.008]
Parameterization:
x0: 0.625
x1: 0.125
x2: 0.875
x3: 0.625
x4: 0.625
x5: 0.875",
"Arm 0_7
Batch 1: -0.469 [-0.665, -0.273]
Batch 0: -0.472 [-0.668, -0.276]
Parameterization:
x0: 0.125
x1: 0.625
x2: 0.375
x3: 0.125
x4: 0.125
x5: 0.375",
"Arm 0_8
Batch 1: 0.522 [0.326, 0.718]
Batch 0: -0.239 [-0.435, -0.043]
Parameterization:
x0: 0.1875
x1: 0.3125
x2: 0.9375
x3: 0.4375
x4: 0.5625
x5: 0.3125",
"Arm 0_9
Batch 1: 1.801 [1.605, 1.997]
Batch 0: -0.101 [-0.297, 0.095]
Parameterization:
x0: 0.6875
x1: 0.8125
x2: 0.4375
x3: 0.9375
x4: 0.0625
x5: 0.8125",
"Arm 0_10
Batch 1: -0.502 [-0.698, -0.306]
Batch 0: -0.395 [-0.591, -0.199]
Parameterization:
x0: 0.9375
x1: 0.0625
x2: 0.6875
x3: 0.1875
x4: 0.3125
x5: 0.5625",
"Arm 0_11
Batch 1: -1.355 [-1.551, -1.159]
Batch 0: -0.998 [-1.194, -0.802]
Parameterization:
x0: 0.4375
x1: 0.5625
x2: 0.1875
x3: 0.6875
x4: 0.8125
x5: 0.0625",
"Arm 0_12
Batch 1: 1.227 [1.031, 1.423]
Batch 0: -0.115 [-0.311, 0.081]
Parameterization:
x0: 0.3125
x1: 0.1875
x2: 0.3125
x3: 0.5625
x4: 0.9375
x5: 0.4375",
"Arm 0_13
Batch 1: 0.159 [-0.037, 0.355]
Batch 0: -0.244 [-0.440, -0.048]
Parameterization:
x0: 0.8125
x1: 0.6875
x2: 0.8125
x3: 0.0625
x4: 0.4375
x5: 0.9375",
"Arm 0_14
Batch 1: 1.331 [1.135, 1.527]
Batch 0: -0.164 [-0.360, 0.032]
Parameterization:
x0: 0.5625
x1: 0.4375
x2: 0.0625
x3: 0.8125
x4: 0.1875
x5: 0.6875",
"Arm 0_15
Batch 1: 0.62 [0.424, 0.816]
Batch 0: -0.049 [-0.245, 0.147]
Parameterization:
x0: 0.0625
x1: 0.9375
x2: 0.5625
x3: 0.3125
x4: 0.6875
x5: 0.1875",
"Arm 0_16
Batch 1: -0.502 [-0.698, -0.306]
Batch 0: -0.443 [-0.639, -0.247]
Parameterization:
x0: 0.09375
x1: 0.46875
x2: 0.46875
x3: 0.65625
x4: 0.28125
x5: 0.96875",
"Arm 0_17
Batch 1: 1.715 [1.519, 1.911]
Batch 0: -0.111 [-0.307, 0.085]
Parameterization:
x0: 0.59375
x1: 0.96875
x2: 0.96875
x3: 0.15625
x4: 0.78125
x5: 0.46875",
"Arm 0_18
Batch 1: 1.694 [1.498, 1.890]
Batch 0: -0.01 [-0.206, 0.186]
Parameterization:
x0: 0.84375
x1: 0.21875
x2: 0.21875
x3: 0.90625
x4: 0.53125
x5: 0.21875",
"Arm 0_19
Batch 1: -0.261 [-0.457, -0.065]
Batch 0: -0.325 [-0.521, -0.129]
Parameterization:
x0: 0.34375
x1: 0.71875
x2: 0.71875
x3: 0.40625
x4: 0.03125
x5: 0.71875",
"Arm 0_20
Batch 1: -1.793 [-1.989, -1.597]
Batch 0: -1.088 [-1.284, -0.892]
Parameterization:
x0: 0.46875
x1: 0.09375
x2: 0.84375
x3: 0.28125
x4: 0.15625
x5: 0.84375",
"Arm 0_21
Batch 1: 1.684 [1.488, 1.880]
Batch 0: -0.166 [-0.362, 0.030]
Parameterization:
x0: 0.96875
x1: 0.59375
x2: 0.34375
x3: 0.78125
x4: 0.65625
x5: 0.34375",
"Arm 0_22
Batch 1: 1.627 [1.431, 1.823]
Batch 0: -0.004 [-0.200, 0.192]
Parameterization:
x0: 0.71875
x1: 0.34375
x2: 0.59375
x3: 0.03125
x4: 0.90625
x5: 0.09375",
"Arm 0_23
Batch 1: 0.306 [0.110, 0.502]
Batch 0: -0.447 [-0.643, -0.251]
Parameterization:
x0: 0.21875
x1: 0.84375
x2: 0.09375
x3: 0.53125
x4: 0.40625
x5: 0.59375",
"Arm 0_24
Batch 1: 1.339 [1.143, 1.535]
Batch 0: 0.048 [-0.148, 0.244]
Parameterization:
x0: 0.15625
x1: 0.15625
x2: 0.53125
x3: 0.84375
x4: 0.84375
x5: 0.65625",
"Arm 0_25
Batch 1: -0.429 [-0.625, -0.233]
Batch 0: -0.287 [-0.483, -0.091]
Parameterization:
x0: 0.65625
x1: 0.65625
x2: 0.03125
x3: 0.34375
x4: 0.34375
x5: 0.15625",
"Arm 0_26
Batch 1: 1.333 [1.137, 1.529]
Batch 0: -0.037 [-0.233, 0.159]
Parameterization:
x0: 0.90625
x1: 0.40625
x2: 0.78125
x3: 0.59375
x4: 0.09375
x5: 0.40625",
"Arm 0_27
Batch 1: 1.479 [1.283, 1.675]
Batch 0: 0.023 [-0.173, 0.219]
Parameterization:
x0: 0.40625
x1: 0.90625
x2: 0.28125
x3: 0.09375
x4: 0.59375
x5: 0.90625",
"Arm 0_28
Batch 1: 0.775 [0.579, 0.971]
Batch 0: -0.118 [-0.314, 0.078]
Parameterization:
x0: 0.28125
x1: 0.28125
x2: 0.15625
x3: 0.21875
x4: 0.71875
x5: 0.53125",
"Arm 0_29
Batch 1: 0.602 [0.406, 0.798]
Batch 0: -0.205 [-0.401, -0.009]
Parameterization:
x0: 0.78125
x1: 0.78125
x2: 0.65625
x3: 0.71875
x4: 0.21875
x5: 0.03125",
"Arm 0_30
Batch 1: -0.266 [-0.462, -0.070]
Batch 0: -0.415 [-0.611, -0.219]
Parameterization:
x0: 0.53125
x1: 0.03125
x2: 0.40625
x3: 0.46875
x4: 0.46875
x5: 0.28125",
"Arm 0_31
Batch 1: 1.673 [1.477, 1.869]
Batch 0: -0.158 [-0.354, 0.038]
Parameterization:
x0: 0.03125
x1: 0.53125
x2: 0.90625
x3: 0.96875
x4: 0.96875
x5: 0.78125",
"Arm 0_32
Batch 1: -1.515 [-1.711, -1.319]
Batch 0: -1.076 [-1.272, -0.880]
Parameterization:
x0: 0.046875
x1: 0.265625
x2: 0.703125
x3: 0.546875
x4: 0.140625
x5: 0.921875",
"Arm 0_33
Batch 1: 1.46 [1.264, 1.656]
Batch 0: -0.07 [-0.266, 0.126]
Parameterization:
x0: 0.546875
x1: 0.765625
x2: 0.203125
x3: 0.046875
x4: 0.640625
x5: 0.421875",
"Arm 0_34
Batch 1: 1.779 [1.583, 1.975]
Batch 0: -0.029 [-0.225, 0.167]
Parameterization:
x0: 0.796875
x1: 0.015625
x2: 0.953125
x3: 0.796875
x4: 0.890625
x5: 0.171875",
"Arm 0_35
Batch 1: -2.558 [-2.754, -2.362]
Batch 0: -1.725 [-1.921, -1.529]
Parameterization:
x0: 0.296875
x1: 0.515625
x2: 0.453125
x3: 0.296875
x4: 0.390625
x5: 0.671875",
"Arm 0_36
Batch 1: -2.674 [-2.870, -2.478]
Batch 0: -1.595 [-1.791, -1.399]
Parameterization:
x0: 0.421875
x1: 0.140625
x2: 0.078125
x3: 0.421875
x4: 0.265625
x5: 0.796875",
"Arm 0_37
Batch 1: 1.848 [1.652, 2.044]
Batch 0: -0.052 [-0.248, 0.144]
Parameterization:
x0: 0.921875
x1: 0.640625
x2: 0.578125
x3: 0.921875
x4: 0.765625
x5: 0.296875",
"Arm 0_38
Batch 1: 1.475 [1.279, 1.671]
Batch 0: 0.079 [-0.117, 0.275]
Parameterization:
x0: 0.671875
x1: 0.390625
x2: 0.328125
x3: 0.171875
x4: 0.515625
x5: 0.046875",
"Arm 0_39
Batch 1: 1.466 [1.270, 1.662]
Batch 0: -0.003 [-0.199, 0.193]
Parameterization:
x0: 0.171875
x1: 0.890625
x2: 0.828125
x3: 0.671875
x4: 0.015625
x5: 0.546875",
"Arm 0_40
Batch 1: 1.692 [1.496, 1.888]
Batch 0: 0.009 [-0.187, 0.205]
Parameterization:
x0: 0.234375
x1: 0.078125
x2: 0.265625
x3: 0.984375
x4: 0.703125
x5: 0.734375",
"Arm 0_41
Batch 1: 0.469 [0.273, 0.665]
Batch 0: -0.271 [-0.467, -0.075]
Parameterization:
x0: 0.734375
x1: 0.578125
x2: 0.765625
x3: 0.484375
x4: 0.203125
x5: 0.234375",
"Arm 0_42
Batch 1: 1.658 [1.462, 1.854]
Batch 0: -0.135 [-0.331, 0.061]
Parameterization:
x0: 0.984375
x1: 0.328125
x2: 0.015625
x3: 0.734375
x4: 0.453125
x5: 0.484375",
"Arm 0_43
Batch 1: 1.563 [1.367, 1.759]
Batch 0: -0.079 [-0.275, 0.117]
Parameterization:
x0: 0.484375
x1: 0.828125
x2: 0.515625
x3: 0.234375
x4: 0.953125
x5: 0.984375",
"Arm 0_44
Batch 1: 1.212 [1.016, 1.408]
Batch 0: -0.156 [-0.352, 0.040]
Parameterization:
x0: 0.359375
x1: 0.453125
x2: 0.890625
x3: 0.109375
x4: 0.828125
x5: 0.609375",
"Arm 0_45
Batch 1: 1.212 [1.016, 1.408]
Batch 0: -0.214 [-0.410, -0.018]
Parameterization:
x0: 0.859375
x1: 0.953125
x2: 0.390625
x3: 0.609375
x4: 0.328125
x5: 0.109375",
"Arm 0_46
Batch 1: -0.236 [-0.432, -0.040]
Batch 0: -0.265 [-0.461, -0.069]
Parameterization:
x0: 0.609375
x1: 0.203125
x2: 0.640625
x3: 0.359375
x4: 0.078125
x5: 0.359375",
"Arm 0_47
Batch 1: 1.955 [1.759, 2.151]
Batch 0: -0.088 [-0.284, 0.108]
Parameterization:
x0: 0.109375
x1: 0.703125
x2: 0.140625
x3: 0.859375
x4: 0.578125
x5: 0.859375",
"Arm 0_48
Batch 1: 1.062 [0.866, 1.258]
Batch 0: -0.192 [-0.388, 0.004]
Parameterization:
x0: 0.078125
x1: 0.234375
x2: 0.796875
x3: 0.140625
x4: 0.421875
x5: 0.078125",
"Arm 0_49
Batch 1: 1.473 [1.277, 1.669]
Batch 0: -0.08 [-0.276, 0.116]
Parameterization:
x0: 0.578125
x1: 0.734375
x2: 0.296875
x3: 0.640625
x4: 0.921875
x5: 0.578125"
],
"type": "scatter",
"visible": true,
"x": [
1.7709799366626573,
-0.6183428177292003,
1.5451822779727549,
-1.1201009080265538,
0.8616208765735647,
1.8894351913117144,
1.031692600204884,
-0.46854956893175415,
0.5222339279382423,
1.8008298529357458,
-0.5022750810058635,
-1.3553812628290602,
1.2267613611495427,
0.1586027536035745,
1.3311285228907859,
0.6204730129215946,
-0.5016038435656316,
1.7153913625759658,
1.6940110682469187,
-0.2607624600612736,
-1.7929402979853508,
1.6835981304485819,
1.6266724316462038,
0.3058715737407025,
1.3387777415987228,
-0.4287298093764184,
1.3326022268309778,
1.4785900121611988,
0.7749604977561696,
0.6024910271629633,
-0.26602604165000376,
1.6731388850896798,
-1.5148212718244969,
1.459741700350226,
1.7788988003830541,
-2.5578963826787464,
-2.6740696407168763,
1.8479770321560522,
1.4746978815717466,
1.4657177889228044,
1.6921018642668362,
0.46864200073148166,
1.6576569931962297,
1.5626569505083054,
1.2117287081786194,
1.2115821298958052,
-0.23642925494063355,
1.9553751139937592,
1.0621401259756436,
1.4725851705744895
],
"y": [
-0.25064651301639324,
-0.5565282668821931,
-0.10256876835223126,
-0.8496403981539268,
-0.007317524327131009,
0.046765414668477605,
-0.20444750387161487,
-0.4719932442819901,
-0.23861405251388332,
-0.10114395208434904,
-0.3946323024301487,
-0.998146497530846,
-0.11522625071057742,
-0.2444468796086437,
-0.16396367238246565,
-0.048742584372764186,
-0.44316664294246355,
-0.11060195396228256,
-0.009508787880031096,
-0.3247271948484765,
-1.0883405340999637,
-0.166157493312186,
-0.0037764933097924535,
-0.4469768658506291,
0.0480466954100946,
-0.2865898297817986,
-0.0372555505384446,
0.023286625654482057,
-0.11834670750706197,
-0.20503217865636894,
-0.4148353163300385,
-0.15829582912792162,
-1.0764584827407113,
-0.07044991673393525,
-0.029427483063499592,
-1.7254711497819315,
-1.5948494242909983,
-0.05224051409976109,
0.07878631882842405,
-0.002837048278515962,
0.009034016314822353,
-0.27090760089255606,
-0.13452766341500655,
-0.07942694705023044,
-0.15648342495089565,
-0.21420903204506814,
-0.26546990317256736,
-0.08838170456115313,
-0.19240534708971557,
-0.07997050047230908
]
}
],
"layout": {
"annotations": [
{
"showarrow": false,
"text": "Show CI",
"x": 1.125,
"xanchor": "left",
"xref": "paper",
"y": 0.9,
"yanchor": "middle",
"yref": "paper"
}
],
"height": 500,
"hovermode": "closest",
"showlegend": false,
"template": {
"data": {
"bar": [
{
"error_x": {
"color": "#2a3f5f"
},
"error_y": {
"color": "#2a3f5f"
},
"marker": {
"line": {
"color": "#E5ECF6",
"width": 0.5
},
"pattern": {
"fillmode": "overlay",
"size": 10,
"solidity": 0.2
}
},
"type": "bar"
}
],
"barpolar": [
{
"marker": {
"line": {
"color": "#E5ECF6",
"width": 0.5
},
"pattern": {
"fillmode": "overlay",
"size": 10,
"solidity": 0.2
}
},
"type": "barpolar"
}
],
"carpet": [
{
"aaxis": {
"endlinecolor": "#2a3f5f",
"gridcolor": "white",
"linecolor": "white",
"minorgridcolor": "white",
"startlinecolor": "#2a3f5f"
},
"baxis": {
"endlinecolor": "#2a3f5f",
"gridcolor": "white",
"linecolor": "white",
"minorgridcolor": "white",
"startlinecolor": "#2a3f5f"
},
"type": "carpet"
}
],
"choropleth": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "choropleth"
}
],
"contour": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0.0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1.0,
"#f0f921"
]
],
"type": "contour"
}
],
"contourcarpet": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "contourcarpet"
}
],
"heatmap": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0.0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1.0,
"#f0f921"
]
],
"type": "heatmap"
}
],
"heatmapgl": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0.0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1.0,
"#f0f921"
]
],
"type": "heatmapgl"
}
],
"histogram": [
{
"marker": {
"pattern": {
"fillmode": "overlay",
"size": 10,
"solidity": 0.2
}
},
"type": "histogram"
}
],
"histogram2d": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0.0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1.0,
"#f0f921"
]
],
"type": "histogram2d"
}
],
"histogram2dcontour": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0.0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1.0,
"#f0f921"
]
],
"type": "histogram2dcontour"
}
],
"mesh3d": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "mesh3d"
}
],
"parcoords": [
{
"line": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "parcoords"
}
],
"pie": [
{
"automargin": true,
"type": "pie"
}
],
"scatter": [
{
"fillpattern": {
"fillmode": "overlay",
"size": 10,
"solidity": 0.2
},
"type": "scatter"
}
],
"scatter3d": [
{
"line": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatter3d"
}
],
"scattercarpet": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattercarpet"
}
],
"scattergeo": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattergeo"
}
],
"scattergl": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattergl"
}
],
"scattermapbox": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattermapbox"
}
],
"scatterpolar": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterpolar"
}
],
"scatterpolargl": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterpolargl"
}
],
"scatterternary": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterternary"
}
],
"surface": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0.0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1.0,
"#f0f921"
]
],
"type": "surface"
}
],
"table": [
{
"cells": {
"fill": {
"color": "#EBF0F8"
},
"line": {
"color": "white"
}
},
"header": {
"fill": {
"color": "#C8D4E3"
},
"line": {
"color": "white"
}
},
"type": "table"
}
]
},
"layout": {
"annotationdefaults": {
"arrowcolor": "#2a3f5f",
"arrowhead": 0,
"arrowwidth": 1
},
"autotypenumbers": "strict",
"coloraxis": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"colorscale": {
"diverging": [
[
0,
"#8e0152"
],
[
0.1,
"#c51b7d"
],
[
0.2,
"#de77ae"
],
[
0.3,
"#f1b6da"
],
[
0.4,
"#fde0ef"
],
[
0.5,
"#f7f7f7"
],
[
0.6,
"#e6f5d0"
],
[
0.7,
"#b8e186"
],
[
0.8,
"#7fbc41"
],
[
0.9,
"#4d9221"
],
[
1,
"#276419"
]
],
"sequential": [
[
0.0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1.0,
"#f0f921"
]
],
"sequentialminus": [
[
0.0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1.0,
"#f0f921"
]
]
},
"colorway": [
"#636efa",
"#EF553B",
"#00cc96",
"#ab63fa",
"#FFA15A",
"#19d3f3",
"#FF6692",
"#B6E880",
"#FF97FF",
"#FECB52"
],
"font": {
"color": "#2a3f5f"
},
"geo": {
"bgcolor": "white",
"lakecolor": "white",
"landcolor": "#E5ECF6",
"showlakes": true,
"showland": true,
"subunitcolor": "white"
},
"hoverlabel": {
"align": "left"
},
"hovermode": "closest",
"mapbox": {
"style": "light"
},
"paper_bgcolor": "white",
"plot_bgcolor": "#E5ECF6",
"polar": {
"angularaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"bgcolor": "#E5ECF6",
"radialaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
}
},
"scene": {
"xaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
},
"yaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
},
"zaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
}
},
"shapedefaults": {
"line": {
"color": "#2a3f5f"
}
},
"ternary": {
"aaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"baxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"bgcolor": "#E5ECF6",
"caxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
}
},
"title": {
"x": 0.05
},
"xaxis": {
"automargin": true,
"gridcolor": "white",
"linecolor": "white",
"ticks": "",
"title": {
"standoff": 15
},
"zerolinecolor": "white",
"zerolinewidth": 2
},
"yaxis": {
"automargin": true,
"gridcolor": "white",
"linecolor": "white",
"ticks": "",
"title": {
"standoff": 15
},
"zerolinecolor": "white",
"zerolinewidth": 2
}
}
},
"title": {
"text": "Repeated arms across trials"
},
"updatemenus": [
{
"buttons": [
{
"args": [
{
"visible": [
true,
true
]
},
{
"xaxis.range": [
-3.1211418784524083,
2.402447351729291
],
"yaxis.range": [
-3.1211418784524083,
2.402447351729291
]
}
],
"label": "objective",
"method": "update"
}
],
"x": 0,
"xanchor": "left",
"y": 1.125,
"yanchor": "top"
},
{
"buttons": [
{
"args": [
{
"error_x.thickness": 2,
"error_x.width": 4,
"error_y.thickness": 2,
"error_y.width": 4
}
],
"label": "Yes",
"method": "restyle"
},
{
"args": [
{
"error_x.thickness": 0,
"error_x.width": 0,
"error_y.thickness": 0,
"error_y.width": 0
}
],
"label": "No",
"method": "restyle"
}
],
"x": 1.125,
"xanchor": "left",
"y": 0.8,
"yanchor": "middle"
}
],
"width": 530,
"xaxis": {
"linecolor": "black",
"linewidth": 0.5,
"mirror": true,
"range": [
-3.1211418784524083,
2.402447351729291
],
"title": {
"text": "Batch 1"
},
"zeroline": false
},
"yaxis": {
"linecolor": "black",
"linewidth": 0.5,
"mirror": true,
"range": [
-3.1211418784524083,
2.402447351729291
],
"title": {
"text": "Batch 0"
},
"zeroline": false
}
}
},
"text/html": [
"