Auth Token from Settings & Models page in app. Must be provided as: Bearer <API Auth Token>
Three values are required for the request body, with an optional fourth:
beta: value balancing exploration (3-5) and exploitation of known good areas (0). Recommend 3opt_sel: binary value defining direction of optimisation. 1 = maximisation, 2 = minimisationdata: string of an array of JSON objects defining the model table, including headersconfig [Optional]: Model table headers as JSON. If config is used, data contains only the data rows without headers, following the same format as described below.data detailed definition:
When not using the config parameter to handle the model headers, the data field contains a table, defined row by row, which contains two sections: the headers, defining the model, and the previous trials data. Both the headers and the previous trials data are provided to the API call as a single string.
The table column names are used as the keys to define each row as a JSON object. These JSON objects are then inserted into an array, and the array is converted to a string. This can be achieved in python by converting a Pandas DataFrame to a JSON using record-wise orientation, i.e., df.to_json(orient='records').
The columns names are: Model Name, Input 1, Input 2, ... , Input N, Output 1 The header rows, in order, are: Type, Min, Max, Step, Weight
Every cell within the table must have a value. For Min, Max, and Step, the default value should be 0. For Weight, the default value should be 1. Weight is not used for single objective optimisation requests, but must be included in the table regardless. For the Type fields, the values must be "Input", "Output" or "Output Constraint".
Double quotation marks (") should be used within the string, escaped (\") to ensure correct processing in the API. Previous trial data values should be provided as strings, as shown in the example (although providing them as numbers may work fine).
The table below converts into the string shown in the Example section. There are the column titles, followed by 5 rows of headers, followed by a single row of previous trial data. There are two inputs and one output for this particular example model.
| Model Name | Input 1 | Input 2 | Output 1 |
|---|---|---|---|
| Type | Input | Input | Output |
| Min | 0 | 0 | -1 |
| Max | 10 | 20 | 1 |
| Step | 0 | 0 | 0 |
| Weight | 1 | 1 | 1 |
| 1 | 6.239 | 19.446 | 0.3 |
Schema for request body format for Single Objective requests
0 <= x <= 61 <= x <= 2Must be a multiple of 1"'{\"Name\":\"Model Name\",\"Input 1\": {\"Type\": \"Input\", \"Min\": 0, \"Max\": 10, \"Step\": 0, \"Weight\": 1}, \"Input 2\": {\"Type\": \"Input\", \"Min\": 0, \"Max\": 20, \"Step\": 0, \"Weight\": 1}, \"Output 1\": {\"Type\": \"Output\", \"Min\": -1, \"Max\": 1, \"Step\": 0, \"Weight\": 1}, \"Output 2\": {\"Type\": \"Output\", \"Min\": -2, \"Max\": 2, \"Step\": 0, \"Weight\": -1}}"