SymetryML Documentation
Exploration

Estimate conditional density distribution

Compute a histogram-based conditional density estimate — the distribution of a target attribute given a conditioning attribute — for one attribute pair per `values[]` entry. Synchronous — the result is returned directly in this response, not via a job. - **Exactly 2 `inputAttributeNames` values per entry, in order**: `[conditionalAttribute, targetAttribute]`. Any count other than 2 raises a `500` (an uncaught exception, not a clean validation error). - **Histograms must be enabled on the project** (`histogramEnabled`/`buildHistogram`, e.g. via `enableHistogram=true` on project creation), or every entry fails with a `400`. The request body is an **ExploreContext** object: `{"values": [<MLContext>, ...]}` — one `MLContext` entry per attribute pair to estimate.

POST
/{user}/projects/{project}/conditionalDensityEstimate

Compute a histogram-based conditional density estimate — the distribution of a target attribute given a conditioning attribute — for one attribute pair per values[] entry. Synchronous — the result is returned directly in this response, not via a job.

  • Exactly 2 inputAttributeNames values per entry, in order: [conditionalAttribute, targetAttribute]. Any count other than 2 raises a 500 (an uncaught exception, not a clean validation error).
  • Histograms must be enabled on the project (histogramEnabled/buildHistogram, e.g. via enableHistogram=true on project creation), or every entry fails with a 400.

The request body is an ExploreContext object: {"values": [<MLContext>, ...]} — one MLContext entry per attribute pair to estimate.

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

Query Parameters

tps?integer

Thread pool size for parallel histogram computation

Default10
useLocal?boolean

For a federated project, use the local project instead of resolving a peer

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/conditionalDensityEstimate?useLocal=true" \  -H "Content-Type: application/json" \  -d '{    "values": [      {        "inputAttributeNames": [          "Iris_setosa",          "sepal_length"        ],        "targets": [],        "extraParameters": {          "hist_bins": "10"        }      }    ]  }'

{  "statusCode": 200,  "statusString": "OK",  "values": {    "densityList": {      "values": [        {          "attrName": "conditional_pair[Iris_setosa,sepal_length]",          "min": 0,          "max": 1,          "width": 0.3333333333333333,          "histogram": [            0,            0,            0          ],          "valueForMissing": -1        }      ]    }  }}

{  "statusCode": 400,  "statusString": "Histograms for project id[nbra_prj_iris] for Customer id [c1] are not enabled",  "values": {}}

{  "statusCode": 500,  "statusString": "Generic Exception [java.lang.Exception: There should be 2 and only 2 attributes specified [0]]",  "values": {}}