Auth Token from Settings & Models page in app. Must be provided as: Bearer <API Auth Token>
Two values are required for the request body, with an optional third:
beta: value balancing exploration (3-5) and exploitation of known good areas (0). Recommend 3data: string of an array of JSON objects defining the model table, including headers. The direction of the optimisation is defined in the Weight field.config [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 full table, defined row by row, with 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, Output 2, ... , Output N 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. For the Type fields, the values must be "Input", "Output" or "Output Constraint".
Weight field definition: The Weight field is used to define two model parameters:
The relative magnitude compares and scales the contribution of each Output based on the absolute value of the Weight field. For example, if there are two Outputs with Weights of -3 and 6:
Double quotation marks (") should be used within the data 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 two outputs for this particular example model.
| Model Name | Input 1 | Input 2 | Output 1 | Output 2 |
|---|---|---|---|---|
| Type | Input | Input | Output | Output |
| Min | 0 | 0 | -1 | -2 |
| Max | 10 | 20 | 1 | 2 |
| Step | 0 | 0 | 0 | 0 |
| Weight | 1 | 1 | 6 | -3 |
| 1 | 1.173 | 8.222 | 0.5 | 1.5 |
Schema for request body format for Multi Objective requests
0 <= x <= 6"'{\"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}}"