SymetryML Documentation
Predictions

Predict from an inline data frame

Synchronous prediction against a small inline `DataFrame` (as opposed to `dss/predict`, which predicts from/to registered data sources via an async job). Each row is predicted individually; the response's `KSVSMap` has one entry per input row, in the same order. If any input attribute name isn't recognized by the model, the request still succeeds — unrecognized attributes are silently ignored; only when **every** attribute name is unrecognized does the call fail with `500 "No known input attributes"`.

POST
/{user}/projects/{project}/predict/{model}

Synchronous prediction against a small inline DataFrame (as opposed to dss/predict, which predicts from/to registered data sources via an async job). Each row is predicted individually; the response's KSVSMap has one entry per input row, in the same order. If any input attribute name isn't recognized by the model, the request still succeeds — unrecognized attributes are silently ignored; only when every attribute name is unrecognized does the call fail with 500 "No known input attributes".

Authorization

SymetryMLAuth
AuthorizationBearer <token>

HMAC-SHA256 signature-based authentication: requests are signed with your secret key and sent with the Customer-ID, Sym-date, Authorization, Content-MD5 and sym-version headers. See SymetryML REST API Security for the signature algorithm and a complete example.

In: header

Path Parameters

user*string

User/Customer identifier

project*string

Project identifier

model*string

Model identifier

Query Parameters

impute?boolean

Enable data imputation for missing values

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/c1/projects/nbra_prj_iris/predict/nbra_prj_iris_build_1" \  -H "Content-Type: application/json" \  -d '{    "attributeNames": [      "sepal_length",      "sepal_width",      "petal_length",      "petal_width"    ],    "attributeTypes": [      "C",      "C",      "C",      "C"    ],    "data": [      [        "1",        "2.0",        "1.5",        "0.5"      ]    ],    "errorHandling": 1  }'
{  "statusCode": 200,  "statusString": "OK",  "values": {    "KSVSMap": {      "values": [        {          "z1LTz0": "true",          "resU": "1",          "res": "1",          "z0": "-7.090267021166173",          "normZ": "0.5773283017945733",          "resZ": "-4.879413036493274"        }      ]    }  }}

{  "statusCode": 400,  "statusString": "Cannot Find Project id[unknownRtlm] for Customer id [c1]",  "values": {}}

{  "statusCode": 500,  "statusString": "No known input attributes",  "values": {}}