Hello all,
I have been able to successfully run a time series model through the python API with relative ease:
error{"message": "Column DT has not been analyzed for time series modeling with the specified multiseries id columns ['Source']."}
---
For reference, my test data looks like this:
DT Source Value
01-01-2000 f1 1
01-01-2000 f2 100
01-02-2000 f1 2
01-02-2000 f2 105
...
You should add a step in order to wait for 200 code. Because time partitioning could take some time, if you send the command before it is completed it produces error. Check the code below. Each STP must be applied separate steps in REST API.
STP
multiseries(POST)
BODY-Json
{
"datetimePartitionColumn": "PERIOD",
"multiseriesIdColumns": ["SERIAL_ID"]
}
STP
getresponse(GET)
BODY
{
"datetimePartitionColumn": "PERIOD",
"multiseriesIdColumns": ["SERIAL_ID"]
}
TEST
{
var project_id = pm.variables.get("projectId");
var res = JSON.parse(responseBody);
if (pm.response.code === 200){
detectedMultiseriesIdColumns = res.detectedMultiseriesIdColumns.length;
if (detectedMultiseriesIdColumns =="1" ) {
postman.setNextRequest("run");
console.log("OK");
}
else{
console.log(detectedMultiseriesIdColumns.length);
setTimeout(function(){},[20000]);
postman.setNextRequest("multiseries");
}
}
else{
setTimeout(function(){},[20000]);
postman.setNextRequest("getresponse");
console.log("getrestrepeat");
}
STP
run (PATCH)
BODY
{
"target": "TARGET",
"mode": "quick",
"featureDerivationWindowStart": -6,
"featureDerivationWindowEnd": 0,
"forecastWindowStart": 1,
"forecastWindowEnd": 3,
"numberOfBacktests": 2,
"useTimeSeries": true,
"datetimePartitionColumn": "PERIOD",
"multiseriesIdColumns": [
"SERIAL_ID"
],
"cvMethod": "datetime",
"blendBestModels": false,
"windowsBasisUnit": "MONTH"
}