Machine Learning Forecast¶
Get the predition results of the deployed machine learning algorithm model.
Request Format¶
POST https://{apigw-address}/ml-service/v1.0/forecasts?action=run&orgId={}&serviceId={}
Request Parameters (URI)¶
Name  | 
Location (Path/Query)  | 
Required or Not  | 
Data Type  | 
Description  | 
|---|---|---|---|---|
orgId  | 
Query  | 
true  | 
String  | 
Organization ID which the user belongs to. How to get orgId >>  | 
serviceId  | 
Query  | 
true  | 
String  | 
Service ID that is generated after deploying the algorithm model. How to get serviceId >>  | 
Request Parameters (Body)¶
Name  | 
Required or Not  | 
Data Type  | 
Description  | 
|---|---|---|---|
parameters  | 
true  | 
String  | 
Business parameters for the algorithm model in JSON format. The parameters and values must match with the requirement of the model.  | 
Response Parameters¶
Name  | 
Data Type  | 
Description  | 
|---|---|---|
data  | 
Object(String)  | 
Returned prediction results in JSON format. Data type of the results can be basic data types, complex types, and array.  | 
Sample 1¶
Request Sample¶
url: https://{apigw-address}/ml-service/v1.0/forecasts?action=run&orgId=o15475450989191&serviceId=f40fbb09-ce20-463f-bb18
method: POST
requestBody:
{
    "parameters":{
"ColumnNames": [
        "age",
        "workclass",
        "fnlwgt",
        "education",
        "education-num",
        "marital-status",
        "occupation",
        "relationship",
        "race",
        "sex",
        "capital-gain",
        "capital-loss",
        "hours-per-week",
        "native-country"
      ],
      "Values": [
        [
          "0",
          "value",
          "0",
          "value",
          "0",
          "value",
          "value",
          "value",
          "value",
          "value",
          "0",
          "0",
          "0",
          "value"
        ],
        [
          "0",
          "value",
          "0",
          "value",
          "0",
          "value",
          "value",
          "value",
          "value",
          "value",
          "0",
          "0",
          "0",
          "value"
        ]
      ]
 }
}
Return Sample¶
{
  "status": 0,
  "msg": "Success",
  "data": {
        "ColumnNames": [
          "Scored Labels",
          "Scored Probabilities"
        ],
        "ColumnTypes": [
          "String",
          "Numeric"
        ],
        "Values": [
          [
            "value",
            "0"
          ],
          [
            "value",
            "0"
          ]
        ]
  }
}