SymetryML Documentation
Encoders

Create encoder

Create a new, empty Encoder for the calling customer. The request body is optional; when present it's a `KSVSMap`-shaped JSON object whose first entry may set `minTrimSize` (a bin is only used if it has at least this many observations; unset entries below the trim size fall back to the encoder's overall mean). Defaults to `1` if omitted.

POST
/{user}/encoders/create

Create a new, empty Encoder for the calling customer. The request body is optional; when present it's a KSVSMap-shaped JSON object whose first entry may set minTrimSize (a bin is only used if it has at least this many observations; unset entries below the trim size fall back to the encoder's overall mean). Defaults to 1 if omitted.

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

Query Parameters

encodername*string
targetName*string

The attribute name this encoder is trained against.

encoderType?string

Single-character target attribute type: B (binary, default) or C (continuous).

Default"B"

Value in

  • "B"
  • "C"

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/encoders/create?encodername=superenc0&targetName=clicked" \  -H "Content-Type: application/json" \  -d '{    "values": [      {        "minTrimSize": "10"      }    ]  }'
{  "statusCode": 201,  "statusString": "Encoder[superenc0] with Target[clicked0] created for Customer[c1]",  "values": {}}

{  "statusCode": 400,  "statusString": "java.lang.IllegalArgumentException: Invalid Encoder Name: string len == 0",  "values": {}}

{  "statusCode": 409,  "statusString": "Customer[c1] already has Encoder[superenc1].",  "values": {}}